Struct AABB
Represents an Axis-Aligned Bounding Box (AABB) in 3D space.
public struct AABB
- Inherited Members
Constructors
AABB(Vector3, Vector3)
Creates a new Axis-Aligned Bounding Box (AABB) with the specified minimum and maximum points.
public AABB(Vector3 min, Vector3 max)
Parameters
Properties
Max
The maximum point of the AABB, which defines the opposite corner from the minimum point.
public Vector3 Max { readonly get; set; }
Property Value
Min
The minimum point of the AABB, which defines one corner of the box.
public Vector3 Min { readonly get; set; }
Property Value
Zero
Represents an empty AABB with minimum and maximum points at zero.
public readonly AABB Zero { get; }
Property Value
Methods
Combine(AABB, AABB)
Combines two AABBs into a new AABB that encompasses both.
public static AABB Combine(AABB a, AABB b)
Parameters
Returns
Contains(Vector3)
Checks if the AABB contains a given point.
public bool Contains(Vector3 point)
Parameters
pointVector3
Returns
GenerateBoxIndices()
Generates the indices for a box defined by the AABB.
public int[] GenerateBoxIndices()
Returns
- int[]
GenerateBoxVertices()
Generates the vertices for a box defined by the AABB.
public float[] GenerateBoxVertices()
Returns
- float[]
Intersects(AABB)
Checks if the AABB intersects with another AABB.
public bool Intersects(AABB other)
Parameters
otherAABB
Returns
TransformAABB(AABB, Matrix4)
Transforms the AABB by a given transformation matrix.
public static AABB TransformAABB(AABB aabb, Matrix4 matrix)