docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct MinMaxAABB

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

    Implements
    IEquatable<MinMaxAABB>
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Mathematics.Geometry
    Assembly: Unity.Mathematics.dll
    Syntax
    [Serializable]
    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.

    Constructors

    Name Description
    MinMaxAABB(float3, float3)

    Constructs the AABB with the given minimum and maximum.

    Fields

    Name Description
    Max

    The maximum point contained by the AABB.

    Min

    The minimum point contained by the AABB.

    Properties

    Name 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.

    SurfaceArea

    Computes the surface area for this axis aligned bounding box.

    Methods

    Name Description
    Contains(MinMaxAABB)

    Tests if the input AABB is contained entirely by this AABB.

    Contains(float3)

    Tests if the input point is contained by the AABB.

    CreateFromCenterAndExtents(float3, float3)

    Creates the AABB from a center and extents.

    CreateFromCenterAndHalfExtents(float3, float3)

    Creates the AABB from a center and half extents.

    Encapsulate(MinMaxAABB)

    Encapsulates the given AABB.

    Encapsulate(float3)

    Encapsulate the given point.

    Equals(MinMaxAABB)
    Expand(float)

    Expands the AABB by the given signed distance.

    Overlaps(MinMaxAABB)

    Tests if the input AABB overlaps this AABB.

    ToString()
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)