A static mesh chunk.
sealed class
|
MeshChunk
|
extends
|
Disposable
|
||
implements
|
ICapacity
|
||||
IMesh
|
The
mesh
vertices
are
specified
in
terrain-space
(see
Position).
However,
a
local
coordinate
system
(see
Matrix)
around
the
mesh
chunk
center
vertex
(see
Sector)
is
provided,
as
defined
by
the
ComputeLocal
method
family
of
the
IGeometry
interface.
See also:
MeshChunkBuilderReturns the capacity of this object.
public
property
|
Capacity
{
get
}
|
||
type
|
int32
|
||
value
|
|
The capacity, in elements. | |
implements
|
ICapacity.Capacity
|
The IGeometry object this terrain mesh uses.
[Constant]
|
||||
public
property
|
Geometry
{
get
}
|
|||
type
|
IGeometry
|
|||
value
|
|
The geometry object. | ||
implements
|
IMesh.Geometry
|
Remarks:
The geometry object is used to compute actual vertex data from the terrain data that has been gathered from the heightmap.
See also:
IMesh.HeightmapThe heightmap of this terrain mesh.
[Constant]
|
||||
public
property
|
Heightmap
{
get
}
|
|||
type
|
IHeightmap
|
|||
value
|
|
The heightmap. | ||
implements
|
IMesh.Heightmap
|
Remarks:
The heightmap delivers terrain data, such as elevation and diffuse color.
See also:
IMesh.GeometryReturns a triangle strip for this mesh chunk.
public
property
|
Indices
{
get
}
|
||
type
|
int32[]
|
||
value
|
|
The triangle strip, created with default TriangulationBuffer options. |
Is this terrain mesh ready for traversal and triangulation?
public
property
|
IsReady
{
get
}
|
||
type
|
bool
|
||
value
|
true
if
this
mesh
is
ready,
false
if
not. |
||
implements
|
IMesh.IsReady
|
Remarks:
When a mesh is not ready yet, calling GetRoot will always return Null.
Will this object be disposed upon the next call to Dispose?
[ThreadSafe]
|
||||
public
property
|
IsSoleOwnership
{
get
}
|
|||
type
|
bool
|
|||
value
|
true
if
the
object
will
be
disposed
when
Dispose
is
called,
false
if
the
object
will
not
be
disposed,
because
some
other
code
is
still
holding
shared
ownership
(see
AcquireThrow).
|
|||
inherited
|
Disposable.IsSoleOwnership
|
Returns the lifecycle state of this object.
public
property
|
LifecycleState
{
get
}
|
||
type
|
LifecycleState
|
||
value
|
The lifecycle state. | ||
inherited
|
Disposable.LifecycleState
|
The transformation from local chunk coordinates to terrain-space coordinates.
public
property
|
Matrix
{
get
}
|
||
type
|
Mat4D
|
||
value
|
The transformation matrix. |
The average quality threshold of this mesh chunk.
public
property
|
QualityThreshold
{
get
}
|
||
type
|
float64
|
||
value
|
The average quality threshold. |
See also:
IMeshDynamic.QualityThresholdReturns the mesh vertex that represents the root sector of the mesh chunk.
public
property
|
Sector
{
get
}
|
||
type
|
int32
|
||
value
|
The mesh vertex that represents this mesh chunk. |
Remarks:
Since a mesh chunk is a complete CLOD mesh, it also contains a minimal outer mesh that surrounds the actual mesh chunk area.
The task group that is used by this mesh for background computations.
[Constant]
|
||||
public
property
|
TaskGroup
{
get
}
|
|||
type
|
TaskGroup
|
|||
value
|
|
The task group. | ||
implements
|
IMesh.TaskGroup
|
The layer textures of this mesh chunk.
public
property
|
Textures
{
get
}
|
||
type
|
IMapConst<string, TexelBuffer>
|
||
value
|
|
Mapping from layer name to layer texture. |
The pyramid tile coordinates of this mesh chunk.
public
property
|
Tile
{
get
}
|
||
type
|
PyramidCoords
|
||
value
|
The pyramid tile coordinates. |
Returns the mesh quad-tree object which can be used during traversals.
[Constant]
|
||||
public
property
|
Tree
{
get
}
|
|||
type
|
MeshTree
|
|||
value
|
|
The mesh structure helper object. | ||
implements
|
IMesh.Tree
|
Remarks:
Each mesh face (see CubemapFace) represents the root of a quad-tree structure. During mesh traversal (via the IMeshTraversal), the MeshTree object provides access to the underlying quad-tree structure.
Return the Triangulator object to use for mesh triangulation.
[Constant]
|
||||
public
property
|
Triangulator
{
get
}
|
|||
type
|
Triangulator
|
|||
value
|
|
The Triangulator instance. | ||
implements
|
IMesh.Triangulator
|
Returns the current version of object.
public
property
|
Version
{
get
}
|
||
type
|
int32
|
||
value
|
The current version number. | ||
implements
|
IVersioned.Version
|
Remarks:
For each modification, the version is incremented by at least one.
The number of mesh vertices.
public
property
|
VertexCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
the number of mesh vertices. |
Returns the CPU vertex data collection of this terrain mesh.
[Constant]
|
||||
public
property
|
Vertices
{
get
}
|
|||
type
|
VertexArrays
|
|||
value
|
|
The vertex data collection. | ||
implements
|
IMesh.Vertices
|
Remarks:
All meshes created by a single MeshBuffer share the same vertex data collection.
Acquires a strong reference to this disposable object.
[OwnerReturn, Pure]
|
||||
public
method
|
AcquireBase
()
|
|||
type
|
IDisposable
|
|||
returns
|
The
strong
reference
to
this
disposable
object
or
null
iff
this
object
is
no
longer
valid.
|
|||
inherited
|
Disposable.AcquireBase
|
Remarks:
The object will not be actually disposed by calls to IDisposable when there is at least one strong reference left. Code that calls this method is responsible for calling the IDisposable method accordingly.
This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.
Using this method usually requires type casting. Subclasses may additionally implement IDisposableGeneric, in order to provide some syntactic sugar for that.
Acquires a strong reference to this disposable object.
[OwnerReturn, Pure]
|
||||
public
method
|
AcquireThrow
()
|
|||
type
|
IDisposable
|
|||
returns
|
|
The strong reference to this disposable object. | ||
inherited
|
Disposable.AcquireThrow
|
Remarks:
The object will not be actually disposed by calls to IDisposable when there is at least one strong reference left. Code that calls this method is responsible for calling the IDisposable method accordingly.
This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.
Exceptions:
Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.
[Dispose, OwnerThis, ThreadSafe]
|
||||
public
method
|
Dispose
()
|
|||
inherited
|
Disposable.Dispose
|
Remarks:
The Dispose method silently returns if the object has already been disposed.
Implementing methods must not throw any exceptions.