Public Member Functions

 Triangulator (Vector3[] vertices)
 
 Triangulator (Vector3[] vertices, int start, int vertexCount)
 
void Select (int start, int vertexCount)
 
void FindWinding ()
 Call this to find the winding order of the polygon. More...
 
float GetArea ()
 Gets the area of the polygon to triangulate. More...
 
void AddTriangle (int a, int b, int c)
 
int[] Triangulate ()
 
void Triangulate (int[] triangles, int triangleCount, int offset)
 

Public Attributes

bool Clockwise
 True if the verts go around clockwise. In most cases this depends on which direction the polygon was drawn in. More...
 
int[] Triangles
 
Vector3[] Vertices
 
int VertexCount
 
int VertexOffset
 
TriangulationVertex Current
 

Private Member Functions

float GetSignedArea ()
 Gets the area of the polygon to triangulate. Note: may be negative. More...
 
bool InsideTriangleAnti (TriangulationVertex A, TriangulationVertex B, TriangulationVertex C, TriangulationVertex P)
 
bool InsideTriangle (TriangulationVertex A, TriangulationVertex B, TriangulationVertex C, TriangulationVertex P)
 

Private Attributes

int TriangleIndex
 

Constructor & Destructor Documentation

Blaze.Triangulator.Triangulator ( Vector3[]  vertices)
inline
Blaze.Triangulator.Triangulator ( Vector3[]  vertices,
int  start,
int  vertexCount 
)
inline

Member Function Documentation

void Blaze.Triangulator.AddTriangle ( int  a,
int  b,
int  c 
)
inline
void Blaze.Triangulator.FindWinding ( )
inline

Call this to find the winding order of the polygon.

float Blaze.Triangulator.GetArea ( )
inline

Gets the area of the polygon to triangulate.

float Blaze.Triangulator.GetSignedArea ( )
inlineprivate

Gets the area of the polygon to triangulate. Note: may be negative.

bool Blaze.Triangulator.InsideTriangle ( TriangulationVertex  A,
TriangulationVertex  B,
TriangulationVertex  C,
TriangulationVertex  P 
)
inlineprivate
bool Blaze.Triangulator.InsideTriangleAnti ( TriangulationVertex  A,
TriangulationVertex  B,
TriangulationVertex  C,
TriangulationVertex  P 
)
inlineprivate
void Blaze.Triangulator.Select ( int  start,
int  vertexCount 
)
inline
int [] Blaze.Triangulator.Triangulate ( )
inline
void Blaze.Triangulator.Triangulate ( int[]  triangles,
int  triangleCount,
int  offset 
)
inline

Member Data Documentation

bool Blaze.Triangulator.Clockwise

True if the verts go around clockwise. In most cases this depends on which direction the polygon was drawn in.

TriangulationVertex Blaze.Triangulator.Current
int Blaze.Triangulator.TriangleIndex
private
int [] Blaze.Triangulator.Triangles
int Blaze.Triangulator.VertexCount
int Blaze.Triangulator.VertexOffset
Vector3 [] Blaze.Triangulator.Vertices