vtdata library
 All Classes Files Functions Variables Enumerations Enumerator Pages
Static Public Member Functions | List of all members
Triangulate_f Class Reference

Static Public Member Functions

static bool Process (const FLine2 &contour, FLine2 &result)
 
static bool Process (const FLine3 &contour, FLine3 &result)
 
static bool Process (const FLine3 &contour, std::vector< int > &result)
 
static float Area (const FLine2 &contour)
 
static float Area (const FLine3 &contour)
 
static bool InsideTriangle (float Ax, float Ay, float Bx, float By, float Cx, float Cy, float Px, float Py)
 

Detailed Description

Static class to triangulate any contour/polygon efficiently. Does not support polygons with holes. Also provides two useful helper methods, one which computes the area of a polygon, and another which does an efficent point in a triangle test.

Member Function Documentation

float Triangulate_f::Area ( const FLine2 contour)
static

compute area of a contour/polygon

bool Triangulate_f::InsideTriangle ( float  Ax,
float  Ay,
float  Bx,
float  By,
float  Cx,
float  Cy,
float  Px,
float  Py 
)
static

decide if point Px/Py is inside triangle defined by (Ax,Ay) (Bx,By) (Cx,Cy)

bool Triangulate_f::Process ( const FLine2 contour,
FLine2 result 
)
static

triangulate a contour/polygon, places results in STL vector as series of triangles.