sealed class
|
MeshBuffer
|
extends
|
Disposable
|
||
implements
|
ICapacity
|
||||
IMemoryConsumption
|
Returns the capacity of this object.
public
property
|
Capacity
{
get
}
|
||
type
|
int32
|
||
value
|
|
The capacity, in elements. | |
implements
|
ICapacity.Capacity
|
Returns the relative utilization of the vertex capacity.
public
property
|
CapacityUtilization
{
get
}
|
||
type
|
float32
|
||
value
|
|
The relative vertex utilization, in percent. |
Returns the lifecycle state of this object.
public
virtual
property
|
LifecycleState
{
get
}
|
||
type
|
LifecycleState
|
||
value
|
The lifecycle state. | ||
inherited
|
Disposable.LifecycleState
|
Returns the estimated memory consumption of this object.
public
property
|
MemoryConsumption
{
get
}
|
||
type
|
int64
|
||
value
|
|
The estimated memory consumption, in bytes. | |
implements
|
IMemoryConsumption.MemoryConsumption
|
Returns the CPU vertex data collection of this mesh buffer.
public
property
|
VertexArrays
{
get
}
|
||
type
|
VertexArrays
|
||
value
|
|
The vertex data collection. |
Returns the vertex updater of this mesh buffer.
public
property
|
VertexUpdater
{
get
}
|
||
type
|
IVertexUpdater
|
||
value
|
The
vertex
updater
or
null . |
Creates a new instance of MeshBuffer.
[OwnerReturn]
|
||||
public
static
method
|
Create
(VertexArrays vertexData,
[Owner]
IVertexUpdater vertexUpdater = null)
|
|||
type
|
MeshBuffer
|
|||
params
|
vertexData
|
[not-null]
|
The CPU vertex data collection. | |
vertexUpdater
|
The
vertex
data
updater.
Defaults
to
null . |
|||
returns
|
|
The mesh buffer object. |
Acquires a strong reference to this disposable object.
[OwnerReturn, ThreadSafe]
|
||||
public
method
|
AcquireTry
()
|
|||
type
|
IDisposable
|
|||
returns
|
this
if
a
new
strong
reference
has
been
acquired,
null
if
this
object
is
already
being
disposed.
|
|||
inherited
|
Disposable.AcquireTry
|
Remarks:
The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.
This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.
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.
Creates a new dynamic terrain mesh.
[OwnerReturn, ThreadSafe]
|
||||
public
method
|
MeshCreate
([Owner]
MeshOptions options)
|
|||
type
|
IMeshDynamic
|
|||
params
|
options
|
[not-null]
|
The mesh options. | |
returns
|
The created CLOD mesh. |
Applies all buffered mesh updates, but does not update vertex data via IVertexUpdater.
public
method
|
MeshUpdate
()
|
||
type
|
bool
|
||
returns
|
true
if
the
vertex/index
data
has
changed,
false
if
not. |
Remarks:
The MeshUpdateData method must be called before vertex data is used (e.g. rendering using the GPU vertex buffer). This ensures that the mesh structure is consistent with the vertex data that has been sent to the IVertexUpdater object.
The call to MeshUpdateData may be omitted iff the vertex data is not used. Calling the MeshUpdateData more than once is allowed, but has no effect.
Exceptions:
Performs all vertex data updates that have been left out during the last call to MeshUpdate.
public
method
|
MeshUpdateData
()
|
Remarks:
This method can be called multiple times, vertex data updates will only be performed once.