Version: Unity 6.5 (6000.5)
LanguageEnglish
  • C#

MinMaxAABB

struct in Unity.Mathematics.Geometry

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Axis aligned bounding box (AABB) stored in min and max form.

Axis aligned bounding boxes (AABB) are boxes where each side is parallel with one of the Cartesian coordinate axes X, Y, and Z. AABBs are useful for approximating the region an object (or collection of objects) occupies and quickly testing whether or not that object (or collection of objects) is relevant. Because they are axis aligned, they are very cheap to construct and perform overlap tests with them.

Properties

Property Description
Center Computes the center of the AABB.
Extents Computes the extents of the AABB.
HalfExtents Computes the half extents of the AABB.
IsValid Check if the AABB is valid.
Max The maximum point contained by the AABB.
Min The minimum point contained by the AABB.
SurfaceArea Computes the surface area for this axis aligned bounding box.

Constructors

Constructor Description
MinMaxAABB Constructs the AABB with the given minimum and maximum.

Public Methods

Method Description
Contains Tests if the input point is contained by the AABB.
Encapsulate Encapsulates the given AABB.
Equals Determines whether the specified other AABB is equal to the current AABB.
Expand Expands the AABB by the given signed distance.
Overlaps Tests if the input AABB overlaps this AABB.

Static Methods

Method Description
CreateFromCenterAndExtents Creates the AABB from a center and extents.
CreateFromCenterAndHalfExtents Creates the AABB from a center and half extents.