AABB
struct AABBimport 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.
Members
minfield
public float3 minThe component-wise minimum corner.
maxfield
public float3 maxThe component-wise maximum corner.
constructorconstructor
public constructor (float3 min, float3 max)Stores the supplied bounds without reordering or validation.
FromCenterSizeconstructor
public constructor FromCenterSize (float3 center, float3 size)Constructs bounds around a center using half of each size component. Supply nonnegative sizes.
centergetter
public get center() : float3The component-wise midpoint of the bounds.
sizegetter
public get size() : float3Returns max minus min component-wise.
volumegetter
public get volume() : floatMultiplies the three size components.
Containsmethod
public fn Contains(float3 point) : boolTests point containment, including all boundary faces.
ContainsAABBmethod
public fn ContainsAABB(AABB other) : boolTests whether the other box is wholly contained, including equal boundaries.
Intersectsmethod
public fn Intersects(AABB other) : boolTests overlap on all axes, counting touching boundaries as intersection.
Expandmethod
public fn Expand(float amount) : AABBReturns bounds expanded by amount along every axis. Negative amounts shrink and may invert the bounds.
Encapsulatemethod
public fn Encapsulate(float3 point) : AABBReturns the smallest box containing these bounds and the supplied point.
EncapsulateAABBmethod
public fn EncapsulateAABB(AABB other) : AABBReturns the smallest box containing both boxes.
ToStringmethod
public fn ToString() : stringProvided by the compiler.
ToStringBuffermethod
public fn ToStringBuffer(StringBuilder builder) : int32Provided by the compiler.