interface Tinman.Engine.Models.ISpatialBounds

Extended by


Base interface for classes that provide common spatial bounding volumes for 3D models.

Public / Attributes


public attribute Box → (get)

value : Box3D

The bounding box, in model-space. Will be Box3D.Inverse iff there are no spatial bounds.

Returns the axis-aligned bounding box of the model.


public attribute HasBounds → (get)

value : bool

true if the model has non-empty spatial bounds,
false if the model does not have spatial bounds (i.e. no geometry).

Does this model have spatial bounds?


public attribute Mass → (get)

value : Vec3D

The weighted center of mass, in model-space. Will be Vec3D.Undefined iff there are no spatial bounds.

Returns the center of mass of the model.

The center of mass is computed from the weighted sum of those model vertices that are used by primitives, with the following weights being assigned to each vertex:


public attribute Sphere → (get)

value : Sphere

The bounding sphere, in model-space. Will be Sphere.Undefined iff there are no spatial bounds.

Returns the bounding sphere of the model.