|
Rasterfarm-SDK
|
#include <polygon.h>
Public Member Functions | |
| TessellationSimple (Mesh::TriangleMesh *pMesh, Mesh::FaceIndex iFace, const Vertex2fArray &hullContour) | |
| void | tessellate () |
| void | greedyClipTrianglesConvex () |
| void | traverseStripTriangles () |
| void | traverseFanTrianglesConvex () |
| Mesh::TriangleIndexArray | findTriangles (Mesh::FaceIndex iFace) |
Static Public Member Functions | |
| static void | tessellate (Mesh::TriangleMesh *pMesh, Mesh::FaceIndex iFace, const Vertex2fArray &contour) |
| static bool | getOrientation (Circulator< Vertex2fArray > circulator) |
| static bool | getOrientation (const Vertex2fArray &c, uint index) |
| static HeapArray< bool > | getOrientation (const Vertex2fArray &contour) |
| static HeapArray< float > | getDeterminant (const Vertex2fArray &contour) |
| static HeapArray< float > | getAngle (const Vertex2fArray &contour) |
| static float | getAngleSum (const Vertex2fArray &contour, uint index) |
| static HeapArray< float > | getAngleSum (const Vertex2fArray &contour) |
| static bool | isSelfIntersecting (const Vertex2fArray &contour) |
| static bool | isSelfTangent (const Vertex2fArray &contour) |
| static HeapArray< Vertex2fArray > | decomposeSelfIntersecting (const Vertex2fArray &contour) |
Public Attributes | |
| const Mesh::FaceIndex | iFace |
Protected Attributes | |
| Mesh::TriangleMesh *const | pMesh |
| Vertex2fArray | hull |
| Mesh::VertexIndexArray | iHull |
Tessellates a simple polygon, meaning no-holes nor intersections.
| TessellationSimple::TessellationSimple | ( | Mesh::TriangleMesh * | pMesh, |
| Mesh::FaceIndex | iFace, | ||
| const Vertex2fArray & | hullContour ) |
Tessellates a single hull(Island). NOTE: Triangulation is the only currently supported form of tessellation.
| Pointer | to a TriangleMesh, must not be null. |
| index | of the TriangleMesh::face to populate. |
| A | CCW oriented non-intersecting contour. |
|
static |
| Mesh::TriangleIndexArray TessellationSimple::findTriangles | ( | Mesh::FaceIndex | iFace | ) |
|
static |
|
static |
|
static |
Will compute the sum of all angles formed-by adjacent contours up-to and including the given index.
|
static |
|
static |
Will compute the orientation for the vertex of the given index for the contour. NOTE: The contour's orientation
|
static |
Will compute the orientation for the vertex of the given index for the contour. NOTE: The contour's orientation
|
static |
| void TessellationSimple::greedyClipTrianglesConvex | ( | ) |
Create triangle edges using an algorithm that clips triangles by order of adjacent-edge angles * adjacent-edge determinants. This algorithm has a worst-case runtime of O(n^2).
|
static |
This method can be used to help validate a valid Polygon before object construction.
| An | array of 2d vertices forming a contour of size > 3. |
|
static |
This method can be used to help validate a valid Polygon before object construction.
| An | array of 2d vertices forming a contour of size > 3. |
| void TessellationSimple::tessellate | ( | ) |
Given the non-intersecting hul, populate the given TriangleMesh with a corresponding Face and associated objects to form a tessellation.
|
static |
| void TessellationSimple::traverseFanTrianglesConvex | ( | ) |
Triangulate the hull using an algorithm that creates a triangle-fan. by traversal of the contour. This algorithm has a worst-case runtime of O(n).
| void TessellationSimple::traverseStripTriangles | ( | ) |
Triangulate the hull using an algorithm that creates a triangle-strip. by traversal of the contour. This algorithm has a worst-case runtime of O(n).
|
protected |
The hull.
| const Mesh::FaceIndex TessellationSimple::iFace |
|
protected |
The vertex indices of the hull.
|
protected |