Base interface for model geometries that can be updated at runtime.
interface
|
IModelGeometryDynamic
|
extends
|
IModelGeometry
|
To update a model geometry, perform the following steps:
(1)
.
The
IndicesUpdated
resp.
VerticesUpdated
methods
will
be
called
on
all
listeners
that
have
been
added
with
UpdateListenerAdd.
The vertex index count.
property
|
IndexCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The
vertex
index
count.
Will
be
0
iff
ReadIndices
returns
null .
|
|
inherited
|
IModelGeometry.IndexCount
|
The resource handle that returns an IGeometryBuffer object that holds instance data to use for this model geometry object.
property
|
InstanceBuffer
{
get
}
|
||
type
|
IResourceHandle
|
||
value
|
The
instance
buffer
to
use
for
geometry
instancing
or
null
if
geometry
instancing
is
disabled
for
this
model
geometry
object.
|
||
inherited
|
IModelGeometry.InstanceBuffer
|
Returns the estimated memory consumption of this object.
property
|
MemoryConsumption
{
get
}
|
||
type
|
int64
|
||
value
|
|
The estimated memory consumption, in bytes. | |
inherited
|
IMemoryConsumption.MemoryConsumption
|
The vertex count.
property
|
VertexCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The vertex count. | |
inherited
|
IModelGeometry.VertexCount
|
The vertex format flags.
property
|
VertexFormat
{
get
}
|
||
type
|
ModelVertexFormat
|
||
value
|
The format flags. | ||
inherited
|
IModelGeometry.VertexFormat
|
Creates a new resource object, using the given graphics context.
[OwnerReturn]
|
||||
method
|
CreateResource
(Graphics graphics)
|
|||
type
|
IResource
|
|||
params
|
graphics
|
[not-null]
|
The graphics context to use. | |
returns
|
|
The resource object. | ||
inherited
|
IResourceHandle.CreateResource
|
Remarks:
Resource objects may implement the IMemoryConsumption interface. In this case, the reported memory consumption will be interpreted as an estimate on how much GPU memory is consumed by the resource. This estimate can then be used for resource caching (e.g. CacheMemory).
Exceptions:
Makes this model geometry dynamic.
method
|
Dynamic
()
|
||
type
|
IModelGeometryDynamic
|
||
returns
|
|
The dynamic model geometry. | |
inherited
|
IModelGeometry.Dynamic
|
Remarks:
If necessary, a new model geometry is created by copying index and vertex data from this model geometry.
Exceptions:
Compares this object with the given one.
[Pure]
|
||||
method
|
Equals
(IResourceHandle other)
|
|||
type
|
bool
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
true
if
this
object
is
equal
to
other,
false
if
not.
|
|||
inherited
|
IEquatable.Equals
|
Configures geometry instancing for this model geometry.
method
|
Instanced
(IResourceHandle instanceBuffer)
|
||
type
|
IModelGeometry
|
||
params
|
instanceBuffer
|
The
resource
handle
that
returns
an
IVertexBuffer
object
that
holds
instance
data
to
use
for
this
model
geometry
object
or
null
to
disable
geometry
instancing.
The
instanceBuffer
value
will
be
returned
by
the
IModelGeometry
property
of
the
returned
model
geometry
object.
|
|
returns
|
|
The resulting model geometry. | |
inherited
|
IModelGeometry.Instanced
|
See also:
IModelGeometryOptimizes this model geometry by reordering those vertices that are actually referenced by the index data.
method
|
Optimized
()
|
||
type
|
IModelGeometry
|
||
returns
|
|
The
optimized
geometry,
without
instancing.
Will
be
this
if
ReadIndices
return
null .
|
|
inherited
|
IModelGeometry.Optimized
|
Read vertex index data.
method
|
ReadIndices
()
|
||
type
|
int32[]
|
||
returns
|
The
vertex
index
data
or
null
iff
IndexCount
returns
0
(i.e.
the
geometry
is
not
indexed).
|
||
inherited
|
IModelGeometry.ReadIndices
|
Exceptions:
Reads vertex data.
method
|
ReadVertices
()
|
||
type
|
VertexArrays
|
||
returns
|
|
The vertex data array. | |
inherited
|
IModelGeometry.ReadVertices
|
Exceptions:
Reduce the floating-point precision for this model geometry?
method
|
Reduced
(bool reduced)
|
||
type
|
IModelGeometry
|
||
params
|
reduced
|
Use
32-bit
floating-point
precision
(true )
or
64-bit
floating-point
precision
(
false )?
|
|
returns
|
|
The reduced geometry. | |
inherited
|
IModelGeometry.Reduced
|
Remarks:
Using reduced precision will consume less memory resp. storage space, but might introduce jitter artifacts during rendering.
Transforms the model geometry using the given matrix.
method
|
Transform
(Mat4D matrix)
|
||
type
|
IModelGeometry
|
||
params
|
matrix
|
The transformation matrix. | |
returns
|
|
The transformed geometry. | |
inherited
|
IModelGeometry.Transform
|
Returns the Texture vertex array that holds the per-vertex data for Albedo.
[BeginEnd]
|
||||
method
|
UpdateAlbedo
()
|
|||
type
|
Long1
|
|||
returns
|
The
vertex
array
or
null
iff
not
present. |
See also:
ColorsReturns the vertex indices.
[BeginEnd]
|
||||
method
|
UpdateIndices
()
|
|||
type
|
int32[]
|
|||
returns
|
The
vertex
indices
or
null
iff
not
present. |
Adds a listener for model geometry updates.
method
|
UpdateListenerAdd
(IModelGeometryListener listener)
|
||
params
|
listener
|
[not-null]
|
The update listener. |
Removes a listener for model geometry updates.
method
|
UpdateListenerRemove
(IModelGeometryListener listener)
|
||
params
|
listener
|
[not-null]
|
The update listener. |
Returns the Normal vertex array that holds the per-vertex data for Normal.
[BeginEnd]
|
||||
method
|
UpdateNormal
()
|
|||
type
|
Float3
|
|||
returns
|
The
vertex
array
or
null
iff
not
present. |
Returns the Position vertex array that holds the per-vertex data for Position/ PositionExtra.
[BeginEnd]
|
||||
method
|
UpdatePosition
()
|
|||
type
|
Double3
|
|||
returns
|
|
The vertex array. |
Specifies a vertex and/or index range that has been modified.
method
|
UpdateRange
(RangeI vertices,
RangeI indices)
|
||
params
|
vertices
|
The modified vertex range of Zero for none. | |
indices
|
The modified index range or Zero for none. |
Returns the TangentX vertex array that holds the per-vertex data for TangentX.
[BeginEnd]
|
||||
method
|
UpdateTangentX
()
|
|||
type
|
Float3
|
|||
returns
|
The
vertex
array
or
null
iff
not
present. |
Returns the TangentY vertex array that holds the per-vertex data for TangentY.
[BeginEnd]
|
||||
method
|
UpdateTangentY
()
|
|||
type
|
Float3
|
|||
returns
|
The
vertex
array
or
null
iff
not
present. |
Returns the TextureCoords vertex array that holds the per-vertex data for TextureCoords.
[BeginEnd]
|
||||
method
|
UpdateTextureCoords
()
|
|||
type
|
Float2
|
|||
returns
|
The
vertex
array
or
null
iff
not
present. |