interface Tinman.Engine.Models.ISpatialBounds

Extended by


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

Public / Methods


public method Cylinder → (2)

ray in : Ray

The ray.

range out : RangeD

The signed distance range of the model geometry along Ray.Direction of ray in, starting at Ray.Origin. Will be RangeD.Inv iff there are no spatial bounds.

returns → float64

The maximum distance of the model geometry from the given ray in. Will be negative iff there are no spatial bounds.

Computes a bounding cylinder along the given ray in for the model geometry.

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.