IModel
Description
- Extended by
-
Model sealed
Base interface for classes that represent 3D models.
The coordinate space for untransformed top-level 3D models is defined as follows:
-
X+ : points westwards resp. sidewards.
-
Y+ : points upwards.
-
Z+ : points northwards resp. forwards.
The ground level is expected to be at Y-coordinate zero.
- See also
Public / Methods
ChildAt
Returns the index in-th child model.
The same IModel object may be a child of multiple parent IModel objects. The resulting graph of parent-child relations must not contain any cycles.
- See also
ChildTransformAt
Returns the child-to-parent transformation matrix of the index in-th child model.
The transformation matrix uses the unit of measure of the parent model (see Unit).
- See also
ColliderLoad
Initializes the Collider object from the given precomputed spatial data structures.
As an alternative to this method, the ModelFlags.ComplexGeometry flag may be used.
If the given data in is unsuitable, this method will return silently and a new IModelCollider will be computed.
- See also
Copy
Creates a mutable deep copy of this model.
Modifying the returned Model will not affect this model.
PartAt
Returns the index in-th model part.
The same IModelPart object may be used by zero or more IModel objects.
PrepareLazy
Prepares lazy-loaded data for this model.
This method does not pre-load vertex / index data (see IModelGeometry) or textures (see IModelTexture).
- IOException
-
If an I/O error has occurred while lazy-loading model data.
Simplify
Simplifies this model by applying the given actions.
Simplification is performed in-place and only modifies the model hierarchy, without loading or computing any additional model data, such as:
-
Collider, which would trigger computation of spatial acceleration data structures.
-
IModelGeometry.ReadVertices, which would read vertex data, usually involving file I/O.
-
IModelGeometry.ReadIndices, which would read index data, usually involving file I/O.
-
IModelTexture.ReadTexels, IModelTexture.ReadPixels or IModelTexture.ReadElevation, which would read texel data, usually involving file I/O.
- See also
Public / Attributes
FadeIn
The fade-in range of this model.
When Fade.Compute returns 0
, the model will not be visible at all.
Defaults to Fade.AlwaysOne, i.e. always faded in.
FadeOut
The fade-out range of this model.
When Fade.Compute returns 1
, the model will not be visible at all.
Defaults to Fade.AlwaysZero, i.e. never faded out.
Unit
The unit of measure in which the vertex coordinates of the model parts are expressed.
Defaults to UnitOfMeasure.Metre.
Extensions
ChildFor
2 overloads
Returns the first child or descendant model of the given name (see IModel.Name).
Returns the first child or descendant model of the given name (see IModel.Name).
ChildTransformWithUnitScaleAt
Returns the child-to-parent transformation matrix of the index in-th child model.
The transformation matrix uses the unit of measure of the child model (see IModel.Unit).
- See also