IBoxOps

Description

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

Derived from

IEquatable<TBox>

Extended by

IBox2Ops
IBox3Ops

Defines common operations for box values.

Public / Methods

Check​Intersection


[Pure]
public method CheckIntersection → (1)

box in : TBox

The other bounding box.

returns → int32

-1 if the bounding boxes do not overlap, 1 if box in fully contains this bounding box and 0 if both bounding boxes overlap.

Checks the intersection between this bounding box and the given one.

Clamp


[Pure]
public method Clamp → (1)

point in : TCoords

The point coordinates.

returns → TCoords

The clamped point.

Clamps the given point to this box.

Contains

2 overloads


[Pure]
public method Contains1 → (1)

point in : TCoords

The point coordinates.

returns → bool

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

Checks if this box contains the given point.


[Pure]
public method Contains2 → (1)

box in : TBox

The other box.

returns → bool

true if this box fully contains the given box, false if not.

Checks if this box contains the given box.

Disjoint


[Pure]
public method Disjoint → (1)

box in : TBox

The other box.

returns → bool

true if this box and the given box are disjoint, false if not.

Checks if this box and the given box are disjoint (i.e. do not intersect).

Grow

2 overloads


[Pure]
public method Grow1 → (1)

box in : TBox

To other box.

returns → TBox

The resulting box.

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


[Pure]
public method Grow2 → (1)

point in : TCoords

Coordinates of point to cover (can be undefined).

returns → TBox

The resulting box.

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

Intersect


[Pure]
public method Intersect → (1)

box in : TBox

The bounding box.

returns → TBox

The resulting bounding box.

Computes the intersection of the given bounding box and this one.

Pad


[Pure]
public method Pad → (1)

amount in : TCoord

The amount to grow.

returns → TBox

The resulting box

Uniformly pads (i.e. grows) this box by the given amount in.

Translate


[Pure]
public method Translate → (1)

in : TCoords

The translation vector.

returns → TBox

The translated bounding box.

Translates this bounding box.

Public / Attributes

Center


public attribute Center → (get)

value : TCoords

The coordinates of the box center.

Return the center of this box.

Is​Empty


public attribute IsEmpty → (get)

value : bool

true if this bounding box is empty, false if not.

Is this bounding box empty?

Is​Inverse


public attribute IsInverse → (get)

value : bool

true if this is the inverse bounding box, false if not.

Is this the inverse bounding box?