IModelCollider

Description

interface Tinman.Engine.Models.IModelCollider

Base interface for classes that represent the spatial properties of an IModel.

Public / Methods

Octree


public method Octree → (1)

which opt : int32 = 0

Chooses which octree to return:
0 : triangles if existent, otherwise lines if existent, otherwise points
1 : points
2 : lines
3 : triangles

returns → SpatialTreeNode<Box3D>

The root node of the spatial octree or invalid if none.

Returns the octree of this model collider.

Pose


public method Pose → (1)

pose in : ModelPose

The model pose or null for none.

returns → IModelCollider

The resulting model collider.

Returns a model collider for the given model pose.

Save


public method Save → ()

returns → ISerializable

The precomputed spatial data structures of this model collider or null if this model collider does not have any precomputed spatial data structures.

Returns a ISerializable object that represents the precomputed spatial data structures of this model collider.

Calling this method does not trigger additional computations, the existing spatial data structures are only wrapped in an object and returned.

Vertices


public method Vertices → (1)

which opt : int32 = 0

Chooses which octree vertices to return:
0 : triangles if existent, otherwise lines if existent, otherwise points
1 : points
2 : lines
3 : triangles

returns → IArrayVector<Vec3D>

The vertices.

Returns the vertices that are present in the octree of this model collider.