Rasterfarm-SDK
Loading...
Searching...
No Matches
TessellationComplex Class Reference

#include <polygon.h>

Inheritance diagram for TessellationComplex:
TessellationSimple

Public Member Functions

void tessellate ()
 
- Public Member Functions inherited from TessellationSimple
 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, const HeapArray< Vertex2fArray > &contour)
 
static void tessellate (Mesh::TriangleMesh *pMesh, Mesh::FaceIndex iFace, const Vertex2fArray &hullContour, const HeapArray< Vertex2fArray > &holeContour)
 
static void tessellate (Mesh::TriangleMesh *pMesh, Mesh::FaceIndex iFace, const Vertex2fArray &hullContour, const Vertex2fArray &holeContour)
 
static Primitive2D::SegmentArray::const_iterator checkForIntersection (const Primitive2D::Segment &seg, const Primitive2D::SegmentArray &array)
 
static bool checkForIntersection (const Vertex2f &vA, const Vertex2f &vB, const Vertex2f &vC, const Primitive2D::SegmentArray &array)
 
static Primitive2D::SegmentArray getIntersectingSegments (const Ray &ray, const Primitive2D::SegmentArray &array)
 
static Primitive2D::SegmentArray createSegmentsFromContours (const HeapArray< Vertex2fArray > &contour)
 
static uint getHoleParent (const HeapArray< Vertex2fArray > &contour, uint contourIndex)
 
static uint getDepth (const HeapArray< Vertex2fArray > &contour, uint contourIndex)
 
- Static Public Member Functions inherited from TessellationSimple
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< floatgetDeterminant (const Vertex2fArray &contour)
 
static HeapArray< floatgetAngle (const Vertex2fArray &contour)
 
static float getAngleSum (const Vertex2fArray &contour, uint index)
 
static HeapArray< floatgetAngleSum (const Vertex2fArray &contour)
 
static bool isSelfIntersecting (const Vertex2fArray &contour)
 
static bool isSelfTangent (const Vertex2fArray &contour)
 
static HeapArray< Vertex2fArraydecomposeSelfIntersecting (const Vertex2fArray &contour)
 

Protected Member Functions

 TessellationComplex (Mesh::TriangleMesh *pMesh, Mesh::FaceIndex iFace, const Vertex2fArray &hullContour, const Vertex2fArray &holeContour)
 

Protected Attributes

Vertex2fArray hole
 
Mesh::VertexIndexArray iHole
 
- Protected Attributes inherited from TessellationSimple
Mesh::TriangleMesh *const pMesh
 
Vertex2fArray hull
 
Mesh::VertexIndexArray iHull
 

Additional Inherited Members

- Public Attributes inherited from TessellationSimple
const Mesh::FaceIndex iFace
 

Detailed Description

Tessellates an polygon or set of polygons.

Constructor & Destructor Documentation

◆ TessellationComplex()

TessellationComplex::TessellationComplex ( Mesh::TriangleMesh * pMesh,
Mesh::FaceIndex iFace,
const Vertex2fArray & hullContour,
const Vertex2fArray & holeContour )
protected

Tessellates a set of contours comprising of a single hull(Island) and hole(s) to form a polygon. Hulls are identified by CCW orientation and holes with CW. NOTE: Triangulation is the only currently supported form of tessellation.

Parameters
Pointerto a TriangleMesh, must not be null.
indexof the TriangleMesh::face to populate.
Thecontour with CCW orientation that forms a Polygon hull.
Thecontour with CW that forms a Polygon hole inside the hull.

Member Function Documentation

◆ checkForIntersection() [1/2]

static Primitive2D::SegmentArray::const_iterator TessellationComplex::checkForIntersection ( const Primitive2D::Segment & seg,
const Primitive2D::SegmentArray & array )
static

◆ checkForIntersection() [2/2]

static bool TessellationComplex::checkForIntersection ( const Vertex2f & vA,
const Vertex2f & vB,
const Vertex2f & vC,
const Primitive2D::SegmentArray & array )
static

◆ createSegmentsFromContours()

static Primitive2D::SegmentArray TessellationComplex::createSegmentsFromContours ( const HeapArray< Vertex2fArray > & contour)
static

◆ getDepth()

static uint TessellationComplex::getDepth ( const HeapArray< Vertex2fArray > & contour,
uint contourIndex )
static

As a contour can be nested within multiple contours, determine the depth.

Returns
Depth of hole.

◆ getHoleParent()

static uint TessellationComplex::getHoleParent ( const HeapArray< Vertex2fArray > & contour,
uint contourIndex )
static
Parameters
Anarray of contours
Theindex of the contour to test.
Returns
The index of the parent contour.

◆ getIntersectingSegments()

static Primitive2D::SegmentArray TessellationComplex::getIntersectingSegments ( const Ray & ray,
const Primitive2D::SegmentArray & array )
static

◆ tessellate() [1/4]

void TessellationComplex::tessellate ( )

Given the non-intersecting hull and hole contours, populate the given TriangleMesh with a corresponding set of Faces and associated objects to form a tessellation.

◆ tessellate() [2/4]

static void TessellationComplex::tessellate ( Mesh::TriangleMesh * pMesh,
const HeapArray< Vertex2fArray > & contour )
static

Given a set of non-intersecting hull and hole contours, populate the given TriangleMesh with a corresponding set of Faces and associated objects to form a tessellation.

Parameters
Pointerto a TriangleMesh, must not be null.
Anarray of contours, hulls ordered CCW and the hole contours CW.

◆ tessellate() [3/4]

static void TessellationComplex::tessellate ( Mesh::TriangleMesh * pMesh,
Mesh::FaceIndex iFace,
const Vertex2fArray & hullContour,
const HeapArray< Vertex2fArray > & holeContour )
static

Given a hull and set of non-intersecting hole contours, populate the given TriangleMesh with a corresponding set of Faces and associated objects to form a tessellation.

Parameters
Pointerto a TriangleMesh, must not be null.
indexof the TriangleMesh::face to populate.
Thehull contour ordered CCW
Holesfor the corresponding hull ordered CW. Must be an array with > 1 non-intersecting contours.

◆ tessellate() [4/4]

static void TessellationComplex::tessellate ( Mesh::TriangleMesh * pMesh,
Mesh::FaceIndex iFace,
const Vertex2fArray & hullContour,
const Vertex2fArray & holeContour )
static

Given a hull and set of non-intersecting hole contours, populate the given TriangleMesh with a corresponding set of Faces and associated objects to form a tessellation.

Parameters
Pointerto a TriangleMesh, must not be null.
indexof the TriangleMesh::face to populate.
Thehull contour ordered CCW
Holefor the corresponding hull ordered CW.

Member Data Documentation

◆ hole

Vertex2fArray TessellationComplex::hole
protected

The holes for the hull.

◆ iHole

Mesh::VertexIndexArray TessellationComplex::iHole
protected

The vertex indices of the hull.


The documentation for this class was generated from the following file: