← Standard library

AABB

struct AABB
import AABB from Wax;

An axis-aligned 3D box stored as minimum and maximum corners. Supply finite, ordered bounds; constructors do not normalize them. Containment and intersection include touching faces, edges, and corners.

Geometry3D.wax:8

Members

minfield

public float3 min

The component-wise minimum corner.

Geometry3D.wax:12

maxfield

public float3 max

The component-wise maximum corner.

Geometry3D.wax:16

constructorconstructor

public constructor (float3 min, float3 max)

Stores the supplied bounds without reordering or validation.

Geometry3D.wax:21

FromCenterSizeconstructor

public constructor FromCenterSize (float3 center, float3 size)

Constructs bounds around a center using half of each size component. Supply nonnegative sizes.

Geometry3D.wax:30

centergetter

public get center() : float3

The component-wise midpoint of the bounds.

Geometry3D.wax:39

sizegetter

public get size() : float3

Returns max minus min component-wise.

Geometry3D.wax:50

volumegetter

public get volume() : float

Multiplies the three size components.

Geometry3D.wax:57

Containsmethod

public fn Contains(float3 point) : bool

Tests point containment, including all boundary faces.

Geometry3D.wax:64

ContainsAABBmethod

public fn ContainsAABB(AABB other) : bool

Tests whether the other box is wholly contained, including equal boundaries.

Geometry3D.wax:73

Intersectsmethod

public fn Intersects(AABB other) : bool

Tests overlap on all axes, counting touching boundaries as intersection.

Geometry3D.wax:82

Expandmethod

public fn Expand(float amount) : AABB

Returns bounds expanded by amount along every axis. Negative amounts shrink and may invert the bounds.

Geometry3D.wax:92

Encapsulatemethod

public fn Encapsulate(float3 point) : AABB

Returns the smallest box containing these bounds and the supplied point.

Geometry3D.wax:102

EncapsulateAABBmethod

public fn EncapsulateAABB(AABB other) : AABB

Returns the smallest box containing both boxes.

Geometry3D.wax:112

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.