Triangulation
Description
- Derived from
-
MeshTraversal abstract
The Triangulation class traverses the filtered mesh (see IMeshFilters.FilterIn) and generates a TriangulationBatch for each mesh sector that has been marked explicitly (see MeshTree.SectorMark).
The output of triangulation is a sequence of index values, which represent graphics primitives of a uniform type (see TriangleMode). The index value sequence is divided into slices. Triangulation batch are built from slice ranges; this makes it possible to change the change triangle mode after triangulation has been performed.
Public / Methods
GetSliceForQuadrant
Returns the triangulation slice range for the given mesh sector quadrant.
Slice ranges are independent of the used triangle mode (see TriangleMode).
GetSliceForSector
Returns the triangulation slice range for the given mesh sector.
Slice ranges are independent of the used triangle mode (see TriangleMode).
Triangulate
Performs mesh triangulation while keeping track of vertex index ranges that can be used to render individual mesh sectors later.
Validate
Checks if the current triangulation is still valid.
A mesh triangulation that has been created by calling Triangulate can be used as long as Validate returns true
. Then it must be recreated. The return value of Validate can change because of mesh updates (see MeshBuffer.MeshUpdate) and because of mesh traversal (e.g. culling).