Table of Contents

Struct OrientedBox

Namespace
MathAssertions.Geometry3D
Assembly
MathAssertions.dll

Oriented bounding box (OBB), defined by a center, three half-extents along the box's local axes, and a quaternion rotation that maps local-axis space to world space. The half-extents are the distances from the center to the box face along each local axis; negative half-extents are accepted but produce undefined containment results.

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

Constructors

OrientedBox(Vector3, Vector3, Quaternion)

Oriented bounding box (OBB), defined by a center, three half-extents along the box's local axes, and a quaternion rotation that maps local-axis space to world space. The half-extents are the distances from the center to the box face along each local axis; negative half-extents are accepted but produce undefined containment results.

public OrientedBox(Vector3 Center, Vector3 HalfExtents, Quaternion Orientation)

Parameters

Center Vector3

World-space center of the box.

HalfExtents Vector3

Half-extents along the box's local X, Y, Z axes.

Orientation Quaternion

Rotation from local to world space.

Properties

Center

World-space center of the box.

public Vector3 Center { get; init; }

Property Value

Vector3

HalfExtents

Half-extents along the box's local X, Y, Z axes.

public Vector3 HalfExtents { get; init; }

Property Value

Vector3

Orientation

Rotation from local to world space.

public Quaternion Orientation { get; init; }

Property Value

Quaternion