Box3I

Description

struct Tinman.Terrain.Util.Box3I

Derived from

IBox3Ops<Box3I, Vec3I, int32, int64>

A three-dimensional bounding box with 32-bit integer precision.

The coordinates refer to cubes (pixel-is-area semantic).

Public / Constants

Empty


public static readonly attribute Empty → (Box3I)

An empty bounding box at the coordinate origin.

See also

Box3I.IsEmpty

Inverse


public static readonly attribute Inverse → (Box3I)

An inverse bounding box that can be used as the initial value for computing bounds via subsequent calls to Grow.

See also

Box3I.IsInverse

Max


public static readonly attribute Max → (Box3I)

The largest possible box.

Note that the dimension of this box is 2^32 (4294967296), which cannot be expressed using 32-bits. So instead 0 is returned.

Public / Constructors

From​Points

2 overloads


[Pure]
public static method FromPoints1 → (6)

x1 in : int32

X-coordinate of first corner point.

y1 in : int32

Y-coordinate of first corner point.

z1 in : int32

Z-coordinate of first corner point.

x2 in : int32

X-coordinate of second corner point.

y2 in : int32

Y-coordinate of second corner point.

z2 in : int32

Z-coordinate of second corner point.

returns → Box3I

The bounding box.

Creates a new instance of Box3I from the given corner points.


[Pure]
public static method FromPoints2 → (2)

in : Vec3I

First corner point.

in : Vec3I

Second corner point.

returns → Box3I

The bounding box.

Creates a new instance of Box3I from the given corner points.

From​Rect


[Pure]
public static method FromRect → (6)

in : int32

X-coordinate of top-left-front corner of cuboid.

in : int32

Y-coordinate of top-left-front corner of cuboid.

in : int32

Z-coordinate of top-left-front corner of cuboid.

width in : int32

[>=0]
Width of cuboid.

height in : int32

[>=0]
Height of cuboid.

depth in : int32

[>=0]
Depth of cuboid.

returns → Box3I

The bounding box.

Creates a new instance of Box3I from the given rectangular cuboid.

Public / Attributes

X1


public readonly attribute X1 → (int32)

X-coordinate of minimum corner of bounding box.

X2


public readonly attribute X2 → (int32)

X-coordinate of maximum corner of bounding box.

Y1


public readonly attribute Y1 → (int32)

Y-coordinate of minimum corner of bounding box.

Y2


public readonly attribute Y2 → (int32)

Y-coordinate of maximum corner of bounding box.

Z1


public readonly attribute Z1 → (int32)

Z-coordinate of minimum corner of bounding box.

Z2


public readonly attribute Z2 → (int32)

Z-coordinate of maximum corner of bounding box.

Serialization

Serializer


public static readonly attribute Serializer → (ITypeSerializer<Box3I>)

The serialization helper object for values of Box3I.