TriangulationBuffer
Description
- Derived from
The TriangulationBuffer consume the output of a mesh triangulation process.
The triangulation process always outputs triangles, which may be encoded in different ways. Obvious ones are triangle lists and triangle strips, more sophisticated ones are terminal triangle lists and sector lists (see TriangleMode). The latter ones require compute features on the GPU, when being used for rendering.
- See also
Public / Methods
IndicesPerTriangle
Returns the estimated average number of 32-bit integer indices that need to be generated to describe a single triangle.
Reset
Resets the buffer to a new capacity.
Calling this method will invalidate the current triangulation result (if any).
TriangleWindingFor
2 overloads
Sets the TriangleWinding property according to the handedness of the given geometry.
Sets the TriangleWinding property according to the given handedness.
Public / Attributes
HasOverflow
Returns if this triangulation buffer has overflown during the last triangulation process.
- See also
Mode
The triangulation mode that has been used to fill this triangulation buffer.
Defaults to TriangleMode.TriangleStrip.
PrimitiveRestart
Use special index value ~0
for restarting primitives, instead of inserting degenerated triangles?
Primitives only need to be restarted when in TriangleMode.TriangleStrip mode. Degenerated triangles resp. special index values will only appear in this mode.
Defaults to false
.
TriangleWinding
The winding of the triangles in the triangulation buffer.
The winding is defined according to the cubemap face coordinates of the triangle vertices:
winding = sign(cross(B - A, C - A)) > 0
where A
, B
and C
are the two-dimensional cubemap face coordinates of the triangle vertices (in the same order as they are referenced in the triangulation buffer).
Defaults to false
.