Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


MinMaxAABB

Axis aligned bounding box (AABB) stored in min and max form.
Read time 1 minuteLast updated 10 days ago

Definition

public struct MinMaxAABB : IEquatable<MinMaxAABB>

Remarks

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.

Fields

Value

Description

MaxThe maximum point contained by the AABB.
MinThe minimum point contained by the AABB.

Constructors

Constructor

Description

MinMaxAABB(Unity.Mathematics.float3,Unity.Mathematics.float3)Constructs the AABB with the given minimum and maximum.

Properties

Property

Description

CenterComputes the center of the AABB.
ExtentsComputes the extents of the AABB.
HalfExtentsComputes the half extents of the AABB.
IsValidCheck if the AABB is valid.
SurfaceAreaComputes the surface area for this axis aligned bounding box.

Methods

Method

Description

ContainsTests if the input point is contained by the AABB.
EncapsulateEncapsulate the given point.
EqualsDetermines whether the specified other AABB is equal to the current AABB.
ExpandExpands the AABB by the given signed distance.
OverlapsTests if the input AABB overlaps this AABB.

Static Methods

Method

Description

CreateFromCenterAndExtentsCreates the AABB from a center and extents.
CreateFromCenterAndHalfExtentsCreates the AABB from a center and half extents.