vtdata library
Static Public Member Functions | List of all members
Triangulate_d Class Reference

Static Public Member Functions

static bool Process (const DLine2 &contour, DLine2 &result)
 
static double Area (const DLine2 &contour)
 
static bool InsideTriangle (double Ax, double Ay, double Bx, double By, double Cx, double Cy, double Px, double 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. This version uses doubles instead of floats.

Member Function Documentation

double Triangulate_d::Area ( const DLine2 contour)
static

compute area of a contour/polygon

bool Triangulate_d::InsideTriangle ( double  Ax,
double  Ay,
double  Bx,
double  By,
double  Cx,
double  Cy,
double  Px,
double  Py 
)
static

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

bool Triangulate_d::Process ( const DLine2 contour,
DLine2 result 
)
static

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