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
CenterVector3World-space center of the box.
HalfExtentsVector3Half-extents along the box's local X, Y, Z axes.
OrientationQuaternionRotation from local to world space.
Properties
Center
World-space center of the box.
public Vector3 Center { get; init; }
Property Value
HalfExtents
Half-extents along the box's local X, Y, Z axes.
public Vector3 HalfExtents { get; init; }
Property Value
Orientation
Rotation from local to world space.
public Quaternion Orientation { get; init; }