IBox3Ops

Description

[StaticTemplate]
interface Tinman.Terrain.Util.IBox3Ops
<TBox val : IBoxOps<TBox, TCoords, TCoord>>
<TCoords val>
<TCoord val>
<TCoord2 out val>

Derived from

IBoxOps<TBox, TCoords, TCoord>

Extended by

Box3D struct
Box3I struct

Defines common operations for 3D box values.

Public / Methods

Clamp


[Pure]
public method Clamp → (3)

in : TCoord

X-coordinate of point.

in : TCoord

Y-coordinate of point.

in : TCoord

Z-coordinate of point.

returns → TCoords

The clamped point.

Clamps the given point to this box.

Contains


[Pure]
public method Contains → (3)

in : TCoord

The point X-coordinate.

in : TCoord

The point Y-coordinate.

in : TCoord

The point Z-coordinate.

returns → bool

true if this box contains the point, false if not.

Checks if this box contains the given point.

Grow


[Pure]
public method Grow → (3)

in : TCoord

X-coordinate of point to cover (can be NaN).

in : TCoord

Y-coordinate of point to cover (can be NaN).

in : TCoord

Z-coordinate of point to cover (can be NaN).

returns → TBox

The resulting box.

Enlarges the extends of this box so that it covers the given point.

To​Cuboid


[Pure]
public method ToCuboid → ()

returns → Cuboid

The cuboid.

Converts this axis-aligned box to a cuboid.

Translate


[Pure]
public method Translate → (3)

in : TCoord

Translation amount along X-axis.

in : TCoord

Translation amount along Y-axis.

in : TCoord

Translation amount along Z-axis.

returns → TBox

The resulting bounding box.

Translates this bounding box.

Public / Attributes

Depth


public attribute Depth → (get)

value : TCoord

[>=0]
The box depth.

Returns the extends of this box along the Z-axis.

Height


public attribute Height → (get)

value : TCoord

[>=0]
The box height.

Returns the extends of this box along the Y-axis.

Maximum


public attribute Maximum → (get)

value : TCoords

The maximum corner point.

Returns the maximum corner of this bound box.

Minimum


public attribute Minimum → (get)

value : TCoords

The minimum corner point.

Returns the minimum corner of this bound box.

Size


public attribute Size → (get)

value : TCoords

The box Width, Height and Depth.

Returns the size of this box.

Volume


public attribute Volume → (get)

value : TCoord2

[>=0]
The bounding box volume.

Returns the volume of this bounding box.

The volume will always be 0 when IBoxOps.IsEmpty returns true.

Width


public attribute Width → (get)

value : TCoord

[>=0]
The box width.

Returns the extends of this box along the X-axis.