Base interface for classes that represent 3D models.
interface
|
IModel
|
base of
|
Model
|
The coordinate space for untransformed 3D models is defined as follows:
The primitive batch of this model in the geometry buffer.
property
|
Batch
{
get
}
|
||
type
|
PrimitiveBatch
|
||
value
|
The primitive batch or None. |
See also:
GeometryThe number of child models.
property
|
ChildCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The child model count. |
The collider object for this model.
property
|
Collider
{
get
}
|
||
type
|
ModelCollider
|
||
value
|
|
The collider object. |
The model flags.
property
|
Flags
{
get
}
|
||
type
|
ModelFlags
|
||
value
|
The model flags. |
Returns the number of animation keyframes.
property
|
FrameCount
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of animation keyframes. |
The geometry of this model.
property
|
Geometry
{
get
}
|
||
type
|
IModelGeometry
|
||
value
|
The
geometry
or
null . |
See also:
BatchThe material of this model.
property
|
Material
{
get
}
|
||
type
|
IMaterial
|
||
value
|
The
material
or
null . |
Remarks:
If
the
material
of
a
model
is
null
,
the
material
of
the
parent
model
will
be
used.
The name of this model.
property
|
Name
{
get
}
|
||
type
|
string
|
||
value
|
The
model
name,
will
either
be
null
or
non-empty. |
The unit of measure in which model-space coordinates are expressed.
property
|
Unit
{
get
}
|
||
type
|
UnitOfMeasure
|
||
value
|
The
model-space
unit
of
measure
or
null . |
Remarks:
If
the
unit
of
measure
of
a
model
is
null
,
the
unit
of
measure
of
the
parent
model
will
be
used.
If
the
model
does
not
have
a
parent,
metres
will
be
used
(see
Metre).
assumed
Defaults
to
null
.
Returns the index-th child model.
[Pure]
|
||||
method
|
ChildModelAt
(int32 index)
|
|||
type
|
IModel
|
|||
params
|
index
|
[0..ChildCount-1]
|
The child model index. | |
returns
|
|
The child model. |
Returns the child-to-parent transformation matrix of the index-th child model.
[Pure]
|
||||
method
|
ChildTransformAt
(int32 index)
|
|||
type
|
Mat4F
|
|||
params
|
index
|
[0..ChildCount-1]
|
The child model index. | |
returns
|
The transformation matrix. |
Remarks:
The transformation matrix uses the unit of measure of the parent model (see Unit).
Returns the index-th animation keyframe.
[Pure]
|
||||
method
|
FrameAt
(int32 index)
|
|||
type
|
Mat4F
|
|||
params
|
index
|
The keyframe index. | ||
returns
|
The animation keyframe. |
Configures geometry instancing for this model.
method
|
UseGeometryInstancing
(IResourceHandle instanceBuffer)
|
||
type
|
IModel
|
||
params
|
instanceBuffer
|
The
resource
handle
that
returns
an
IVertexBuffer
object
that
holds
instance
data
to
use
for
this
model
object
or
null
to
disable
geometry
instancing.
The
instanceBuffer
value
will
be
returned
by
the
InstanceBuffer
property
of
the
geometry
objects
of
the
returned
model
and
all
its
descendants.
|
|
returns
|
|
The resulting model. |
See also:
IModelGeometry.InstanceBuffer
method
|
ChildModelFor
(string name)
|
||
type
|
IModel
|
||
params
|
name
|
method
|
DistanceTo
(Vec3D point)
|
||
type
|
float64
|
||
params
|
point
|
Traverses the given model hierarchy and applies the given filter.
[Pure]
|
||||
method
|
Filter
(ModelDelegate filter,
IVector<IModel> result = null)
|
|||
type
|
bool
|
|||
params
|
filter
|
[not-null]
|
The filter delegate to apply to each model node. | |
result
|
Optional output for model nodes that have passed the given filter. | |||
returns
|
true
if
at
least
one
model
node
has
passed
the
given
filter,
false
if
no
model
nodes
have
passed.
|
method
|
FrameGet
(float32 index)
|
||
type
|
Mat4F
|
||
params
|
index
|
Does this model have at least one geometry node with the VertexColorIsWind flag?
method
|
HasWind
()
|
||
type
|
bool
|
||
returns
|
true
if
there
is
at
least
one
VertexColorIsWind
node,
false
if
not.
|
method
|
PickRay
(Vec3D origin,
Vec3D direction,
out Vec3D point,
out Vec3D normal)
|
||
type
|
bool
|
||
params
|
origin
|
||
direction
|
|||
point
|
|||
normal
|
Writes
the
whole
model
hierarchy
to
a
self-contained
CMH
file.
[OwnerReturn]
|
||||
method
|
WriteCMH
(Path filePath)
|
|||
type
|
IOperation
|
|||
params
|
filePath
|
[not-null]
|
Path to the output file. | |
returns
|
|
The background operation. |
See also:
ModelFormat.CMH