Model
Public / Constructors
Chunk
Creates a 3D model for the given terrain mesh chunk.
The model vertices will be in the local coordinate system of the mesh chunk (see MeshChunk.Matrix).
If present, layer textures of the model chunk will be mapped as follows:
Load
2 overloads
Loads a 3D model from a file using ModelFormat.Any.
- ValidatingException
-
If file in is not an existing file or directory or if the model reader has reported an error, for example because of an unsupported file format feature.
- IOException
-
If an I/O error has occurred while loading file in.
Loads a 3D model from a file using ModelFormat.Any.
- ValidatingException
-
If file in is invalid or if the model reader has reported an error, for example because of an unsupported file format feature.
- IOException
-
If an I/O error has occurred while loading file in.
Model
3 overloads
Creates a new instance of Model.
Creates a new instance of Model.
Creates a new instance of Model.
Read
2 overloads
Reads a 3D model from a file using ModelFormat.Any.
- ValidatingException
-
If file in is not an existing file or directory or if the model reader has reported an error, for example because of an unsupported file format feature.
- IOException
-
If an I/O error has occurred while loading file in.
Reads a 3D model from a file using ModelFormat.Any.
- ValidatingException
-
If file in is invalid or if the model reader has reported an error, for example because of an unsupported file format feature.
- IOException
-
If an I/O error has occurred while loading file in.
Public / Methods
ChildAdd
6 overloads
Adds a child model.
Adds a child model.
The child-to-parent transformation is specified with the given translation.
Adds a child model.
The child-to-parent transformation is specified with the given translation and rotation, i.e. the child model is rotated first and then translated.
Adds a child model.
The child-to-parent transformation is specified with the given translation, rotation and scale components, i.e. the child model is scaled first, then rotated and finally translated.
Adds a child model.
Adds a child model.
ChildRemove
Removes a child model.
If the given model is not a child of this model, the method silently returns.
ColliderDirty
Invalidates the model hierarchy of the current IModel.Collider instance.
Call this method when the model structure or geometry has been modified. A new model collider will be created the next time the IModel.Collider property is get.
The following methods resp. setter will invalidate the model hierarchy automatically; when using these, it is not necessary to call the ColliderDirty method:
-
ChildAdd*
-
ChildRemove*
-
PartRemove*
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.