C# Class SharpNav.PolyMesh.Polygon

Each polygon is a collection of vertices. It is the basic unit of the PolyMesh
Exibir arquivo Open project: Robmaister/SharpNav

Public Methods

Method Description
ContainsVertex ( int vertex ) : bool

Determine if the vertex is in polygon.

MergeWith ( Polygon other, int startEdge, int otherStartEdge, int temp ) : void

Merges another polygon with this one.

Polygon ( int numVertsPerPoly, Area area, RegionId regionId )

Initializes a new instance of the Polygon class.

Method Details

ContainsVertex() public method

Determine if the vertex is in polygon.
public ContainsVertex ( int vertex ) : bool
vertex int The Vertex.
return bool

MergeWith() public method

Merges another polygon with this one.
public MergeWith ( Polygon other, int startEdge, int otherStartEdge, int temp ) : void
other Polygon The other polygon to merge into this one.
startEdge int This starting edge for this polygon.
otherStartEdge int The starting edge for the other polygon.
temp int A temporary vertex buffer. Must be at least numVertsPerPoly long.
return void

Polygon() public method

Initializes a new instance of the Polygon class.
public Polygon ( int numVertsPerPoly, Area area, RegionId regionId )
numVertsPerPoly int The number of vertices per polygon.
area Area The AreaId
regionId RegionId The RegionId