Click or drag to resize
Ab4d.SharpEngine logo

PolygonAnalyzer Class

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

Namespace: Ab4d.SharpEngine.Common
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public class PolygonAnalyzer

The PolygonAnalyzer type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyBoundingBoxMax Gets maximum position in the bounding box
Public propertyBoundingBoxMin Gets minimum position in the 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