The Triangulation class traverses the filtered mesh (see FilterIn) and generates a TriangulationBatch for mesh sector that has been marked explicitly (see SectorMark).
sealed class
|
Triangulation
|
extends
|
MeshTraversal
|
A triangle strip is generated for each explicitly marked mesh sector (see SectorMark).
The mesh tree input filter to use for querying sector culling and marks.
public
property
|
FilterIn
{
get
set
}
|
||
type
|
MeshTreeFilter
|
||
value
|
The
filter
or
null . |
||
inherited
|
MeshTraversal.FilterIn
|
Remarks:
The
default
value
is
null
(i.e.
all
mesh
sectors
are
visited).
See also:
MeshTree.GetRootThe mesh tree output filter to use for performing sector culling and marking.
public
property
|
FilterOut
{
get
set
}
|
||
type
|
MeshTreeFilter
|
||
value
|
The mesh tree filter object. | ||
inherited
|
MeshTraversal.FilterOut
|
Remarks:
This MeshTreeFilter is not reset automatically. The application is responsible to call Reset.
The
default
value
is
null
(i.e.
the
input
filter
is
used
in
that
case).
See also:
MeshTree.SectorCullHas this object been bound to an IMesh object?
public
property
|
HasMesh
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
object
is
currently
bound
to
an
IMesh,
false
if
not.
|
||
inherited
|
MeshBoundBase.HasMesh
|
The CLOD mesh this object is currently bound to.
public
property
|
Mesh
{
get
}
|
||
type
|
IMesh
|
||
value
|
The
CLOD
mesh
or
null . |
||
inherited
|
MeshBoundBase.Mesh
|
The filtered MeshTree of this mesh traversal object.
public
property
|
Tree
{
get
}
|
||
type
|
MeshTree
|
||
value
|
|
The
filtered
MeshTree
object
or
null
if
this
object
is
not
bound.
|
|
inherited
|
MeshTraversal.Tree
|
Creates a new instance of Triangulation.
public
constructor
|
Triangulation
()
|
Returns a TriangulationBatch for the entire mesh.
public
method
|
GetBatchForMesh
()
|
||
type
|
TriangulationBatch
|
||
returns
|
The triangulation batch. |
Returns a TriangulationBatch for a quadrant of the given mesh sector.
public
method
|
GetBatchForQuadrant
(int32 sector,
int32 childIdx)
|
||
type
|
TriangulationBatch
|
||
params
|
sector
|
Index of mesh sector center vertex. | |
childIdx
|
The child index. | ||
returns
|
The index range. Will be Empty if the given sector has not been triangulated. |
Returns a TriangulationBatch for the given mesh sector.
public
method
|
GetBatchForSector
(int32 sector)
|
||
type
|
TriangulationBatch
|
||
params
|
sector
|
Index of mesh sector center vertex. | |
returns
|
The index range. Will be Empty if the given sector has not been triangulated. |
Invalidates
the
current
triangulation,
so
that
the
next
call
to
Validate
returns
false
.
public
method
|
Invalidate
()
|
Binds this object to the given IMesh.
public
override
method
|
MeshBind
(IMesh mesh)
|
||
params
|
mesh
|
The mesh object. | |
overrides
|
MeshTraversal.MeshBind
|
Unbinds this object from its current IMesh.
public
override
method
|
MeshUnbind
()
|
||
overrides
|
MeshBoundBase.MeshUnbind
|
Performs mesh triangulation while keeping track of vertex index ranges that can be used to render individual mesh sectors later.
public
method
|
Triangulate
(TriangulationBuffer buffer)
|
||
params
|
buffer
|
[not-null]
|
The triangulation buffer to use. |
See also:
GetBatchForSectorChecks if the current triangulation is still valid.
public
method
|
Validate
(TriangulationBuffer buffer)
|
||
type
|
bool
|
||
params
|
buffer
|
[not-null]
|
The triangulation buffer that holds the triangulation. |
returns
|
true
if
the
mesh
triangulation
is
still
valid,
false
if
the
mesh
must
be
triangulated
again.
|
Remarks:
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
MeshUpdate)
and
because
of
mesh
traversal
(e.g.
culling).
Visits the given mesh root sectors.
public
method
|
VisitFaces
(CubemapFace meshFace = CubemapFace.All)
|
||
params
|
meshFace
|
The mesh face to traverse. Defaults to All. | |
inherited
|
MeshTraversal.VisitFaces
|
Visits a quadrant of the given mesh sector on the current face, assuming that the corresponding child mesh sector does not exist.
public
override
method
|
VisitQuadrant
(int32 sector,
int32 childIdx)
|
||
params
|
sector
|
Index of center vertex of sector to visit. | |
childIdx
|
Index of non-existing child sector in sector. | ||
implements
|
MeshTraversal.VisitQuadrant
|
Remarks:
The quadtree data structure for visiting the given sector can be obtained by getting the Tree property of the current mesh (see MeshBind.
Visits the given mesh sector on the current face.
public
override
method
|
VisitSector
(int32 sector)
|
||
params
|
sector
|
Index of center vertex of sector to visit. | |
implements
|
MeshTraversal.VisitSector
|
Remarks:
The quadtree data structure for visiting the given sector can be obtained by getting the Tree property of the current mesh (see MeshBind.