IModelCollider

Description

interface Tinman.Engine.Models.IModelCollider

Derived from

ISpatialQuery

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

When using a ISpatialCallback with the ISpatialQuery interface, the child indices provided by ISpatialCallback.ChildPush correlate with IModel.ChildAt for the IModel that is associated with this model collider.

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.

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:
3 : Triangles
2 : Lines
1 : Points
0 : triangles if existent, otherwise lines if existent, otherwise points

returns → IArrayVector<Vec3D>

The vertices.

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

Public / Attributes

Lines


[Constant]
public attribute Lines → (get)

value : IArrayVector<Vec2I>

The lines or null iff this model collider does not hold any lines.

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

This property only returns pre-computed data, if present. It does not perform any time-consuming actions.

Points


[Constant]
public attribute Points → (get)

value : IArrayVector<int32>

The points or null iff this model collider does not hold any points.

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

This property only returns pre-computed data, if present. It does not perform any time-consuming actions.

Triangles


[Constant]
public attribute Triangles → (get)

value : IArrayVector<Vec3I>

The triangles or null iff this model collider does not hold any triangles.

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

This property only returns pre-computed data, if present. It does not perform any time-consuming actions.

Extensions

To​Silhouette


public static method ToSilhouette → (1)

silhouette opt : Silhouette = null

The Silhouette object to use or null to create a new one.

returns → Silhouette

The Silhouette that has been fed with the geometry of this model collider.

Feeds the triangles and lines of this model collider into a Silhouette object, as faces and edges, respectively.