Click or drag to resize
AB4D logo

PolygonAnalyzer Class

PolygonAnalyzer can be used to analyzed a 2D polygon that is defined by a list of 2D positions.
Inheritance Hierarchy
SystemObject
  Ab3d.UtilitiesPolygonAnalyzer

Namespace: Ab3d.Utilities
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public class PolygonAnalyzer

The PolygonAnalyzer type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyBoundingBox Gets polygon bounding box
Public propertyFirstVertex First PolygonVertex in a double linked list of positions.
Public propertyIsClockwise Gets true is polygon positions are oriented in a clockwise direction. The value of this property is also determined by the Y axis direction that is up by default (this is set by IsYAxisUp).
Public propertyIsClosed Gets true if polygons is closed
Public propertyIsPolygonConvex Gets true if polygon is convex
Public propertyIsYAxisUp Gets or sets a Boolean that specifies if Y axis is pointing up (true by default). This affects the value of IsClockwise property.
Public propertyOriginalPoints Gets a list of positions
Public propertyPointsCount Gets points count
Public propertyPolygonArea Gets polygon area
Top
Methods
 NameDescription
Public methodAnalyze Analyzes this polygon again and recalculates its properties.
Public methodCreateReversedPolygonAnalyzer Returns a PolygonAnalyzer that is created by reversing the order of positions in this PolygonAnalyzer
Public methodDump Dumps the text that describes the individual vertices in this PolygonAnalyzer into the Visual Studio Output window
Public methodGetDumpString Gets a string the describes the individual vertices in this PolygonAnalyzer.
Public methodGetEnumerator Gets an enumerator that can be used to iterate through all PolygonVertex items in the polygon defined by this PolygonAnalyzer.
Public methodIsPointInsidePolygon Returns true when the specified point is inside the polygon defined by this PolygonAnalyzer.
Public methodOptimizeVertices OptimizeVertices removes duplicate vertices (that follow one another) and remove vertices that lie on the same line.
Public methodRemoveVertex Removes the specified vertex from this polygon.
Top
See Also