The TriangulationBuffer consume the output of a mesh triangulation process.
sealed class
|
TriangulationBuffer
|
implements
|
ICapacity
|
See also:
TriangulatorReturns the capacity of this object.
public
property
|
Capacity
{
get
}
|
||
type
|
int32
|
||
value
|
|
The capacity, in elements. | |
implements
|
ICapacity.Capacity
|
Returns if this triangulation buffer has overflown during the last triangulation process.
public
property
|
HasOverflow
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
an
overflow
has
occurred,
false
if
not. |
See also:
ResetReturns the number of vertex indices that have been generated.
public
property
|
IndexCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of vertex indices. |
See also:
IndicesReturns the array that holds the generated vertex indices.
public
property
|
Indices
{
get
}
|
||
type
|
int32[]
|
||
value
|
|
The vertex indices array. |
See also:
IndexCountThe triangulation mode that has been used to fill this triangulation buffer.
public
property
|
Mode
{
get
set
}
|
||
type
|
TriangleMode
|
||
value
|
The triangulation mode. |
Remarks:
Defaults to TriangleStrip.
The orientation of the triangles in the triangulation buffer.
public
property
|
Orientation
{
get
set
}
|
||
type
|
TriangleOrientation
|
||
value
|
The triangle orientation. |
Remarks:
Defaults to CounterClockwise.
Returns the number of triangles that have been generated.
public
property
|
TriangleCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of triangles. |
Remarks:
This count includes degenerated triangles (i.e. triangles with duplicate indices).
Counts all non-degenerated triangles in this buffer.
public
property
|
ValidTriangleCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of non-degenerated triangles. |
Remarks:
A non-degenerated triangle has three distinct indices.
Creates a new instance of TriangulationBuffer.
public
constructor
|
TriangulationBuffer
(int32 capacity = 1048576)
|
||
params
|
capacity
|
[>0]
|
The
buffer
capacity,
in
indices.
Defaults
to
1048576 .
|
Resets the buffer to a new capacity.
public
method
|
Reset
(int32 capacity)
|
||
params
|
capacity
|
[>0]
|
The buffer capacity, in indices. |
Remarks:
Calling this method will invalidate the current triangulation result (if any).
Updates the given index buffer.
public
method
|
Update
(IIndexBuffer buffer,
int32 bufferIndex = 0)
|
||
type
|
bool
|
||
params
|
buffer
|
[not-null]
|
The index buffer to update. |
bufferIndex
|
[>=0]
|
Offset of first index in buffer to write. | |
returns
|
true
if
buffer
has
been
updated,
false
if
the
given
index
buffer
has
not
enough
capacity.
|