Base interface for classes that represent geometry (vertices and indices) for 3D models.
interface
|
IModelGeometry
|
extends
|
IResourceHandle
|
||
base of
|
IModelGeometrySimple
|
||||
ModelGeometryBase
|
IModelTexture objects act as resource handles and produce ModelGeometryBuffer resource objects.
The vertex index count.
property
|
IndexCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The
vertex
index
count.
Will
be
0
iff
ReadIndices
returns
null .
|
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.
|
The vertex count.
property
|
VertexCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The vertex count. |
The vertex format flags.
property
|
VertexFormat
{
get
}
|
||
type
|
ModelVertexFormat
|
||
value
|
The format flags. |
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
or
null . |
|||
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).
Compares this object with the given one.
[Pure]
|
||||
method
|
Equals
(T 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
|
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).
|
Reads vertex data.
method
|
ReadVertices
()
|
||
type
|
VertexArrays
|
||
returns
|
|
The vertex data array. |
Configures geometry instancing for this model geometry.
method
|
UseGeometryInstancing
(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. |
See also:
IModelGeometry