Table of Contents

Struct AABB

Namespace
LibGFX.Math
Assembly
LibGFX.dll

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

min Vector3
max Vector3

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

Vector3

Min

The minimum point of the AABB, which defines one corner of the box.

public Vector3 Min { readonly get; set; }

Property Value

Vector3

Zero

Represents an empty AABB with minimum and maximum points at zero.

public readonly AABB Zero { get; }

Property Value

AABB

Methods

Combine(AABB, AABB)

Combines two AABBs into a new AABB that encompasses both.

public static AABB Combine(AABB a, AABB b)

Parameters

a AABB
b AABB

Returns

AABB

Contains(Vector3)

Checks if the AABB contains a given point.

public bool Contains(Vector3 point)

Parameters

point Vector3

Returns

bool

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

other AABB

Returns

bool

TransformAABB(AABB, Matrix4)

Transforms the AABB by a given transformation matrix.

public static AABB TransformAABB(AABB aabb, Matrix4 matrix)

Parameters

aabb AABB
matrix Matrix4

Returns

AABB