Table of Contents

Struct AxisAlignedBox

Namespace
MathAssertions.Geometry3D
Assembly
MathAssertions.dll

Axis-aligned bounding box (AABB) defined by minimum and maximum corners. The box is well-formed when Min <= Max component-wise; the computed properties remain well-defined for inverted boxes (Size components turn negative, Volume becomes signed) but containment and intersection methods on inverted boxes return undefined results. Callers are responsible for constructing valid boxes.

public readonly record struct AxisAlignedBox : IEquatable<AxisAlignedBox>
Implements
Inherited Members
Extension Methods

Constructors

AxisAlignedBox(Vector3, Vector3)

Axis-aligned bounding box (AABB) defined by minimum and maximum corners. The box is well-formed when Min <= Max component-wise; the computed properties remain well-defined for inverted boxes (Size components turn negative, Volume becomes signed) but containment and intersection methods on inverted boxes return undefined results. Callers are responsible for constructing valid boxes.

public AxisAlignedBox(Vector3 Min, Vector3 Max)

Parameters

Min Vector3

Minimum corner.

Max Vector3

Maximum corner.

Properties

Center

Geometric center of the box: (Min + Max) / 2.

public Vector3 Center { get; }

Property Value

Vector3

HalfExtents

Component-wise half-extents: Size / 2.

public Vector3 HalfExtents { get; }

Property Value

Vector3

Max

Maximum corner.

public Vector3 Max { get; init; }

Property Value

Vector3

Min

Minimum corner.

public Vector3 Min { get; init; }

Property Value

Vector3

Size

Component-wise size: Max - Min.

public Vector3 Size { get; }

Property Value

Vector3

Volume

Volume of the box: Size.X * Size.Y * Size.Z. Signed for inverted boxes.

public float Volume { get; }

Property Value

float