ISpatialBoundsTrait

Description

[StaticTemplate]
interface Tinman.Terrain.Util.ISpatialBoundsTrait
<TCoords val>
<TBounds val>

Type trait for structures that provide the semantic of spatial tree node bounds.

Public / Methods

BoundsChild


[Pure]
public method BoundsChild → (3)

nodeCoords in : TCoords

Minimum coordinates of tree node.

nodeSize in : float64

The tree node size.

childIdx in : int32

The child index.

returns → TBounds

The child node bounds.

Computes the bounds of a child node of the given tree node.

BoundsContain


[Pure]
public method BoundsContain → (2)

outer in : TBounds

The outer bounds.

inner in : TBounds

The inner bounds.

returns → bool

true if outer in contains inner in,
false if not.

Checks if the given outer bounds contain the given inner bounds.

BoundsGrow


[Pure]
public method BoundsGrow → (1)

bounds in : TBounds

The bounds to grow.

returns → TBounds

The grown bounds.

Grows the given bounds by the factor of two.

BoundsMin


[Pure]
public method BoundsMin → (1)

bounds in : TBounds

The bounds.

returns → TCoords

The minimum coordinates.

Returns the minimum coordinates of the given bounds.

BoundsSize


[Pure]
public method BoundsSize → (1)

bounds in : TBounds

The bounds.

returns → float64

The edge length.

Returns the edge length of the given bounds.