docs.unity3d.com
    Show / Hide Table of Contents

    Struct FrustumPlanes

    Represents frustum planes.

    Namespace: Unity.Rendering
    Syntax
    public struct FrustumPlanes

    Methods

    FromCamera(Camera, NativeArray<float4>)

    Populates the frustum plane array from the given camera frustum.

    Declaration
    public static void FromCamera(Camera camera, NativeArray<float4> planes)
    Parameters
    Type Name Description
    Camera camera

    The camera to use for calculation.

    NativeArray<float4> planes

    The result of the operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Is thrown if the planes are empty.

    ArgumentException

    Is thrown if the planes size is not equal to 6.

    Intersect(NativeArray<float4>, AABB)

    Performs an intersection test between an AABB and 6 culling planes.

    Declaration
    public static FrustumPlanes.IntersectResult Intersect(NativeArray<float4> cullingPlanes, AABB a)
    Parameters
    Type Name Description
    NativeArray<float4> cullingPlanes

    Planes to make the intersection.

    AABB a

    Instance of the AABB to intersect.

    Returns
    Type Description
    FrustumPlanes.IntersectResult

    Intersection result

    Intersect(NativeArray<float4>, float3, Single)

    Performs an intersection test between an AABB and 6 culling planes.

    Declaration
    public static FrustumPlanes.IntersectResult Intersect(NativeArray<float4> planes, float3 center, float radius)
    Parameters
    Type Name Description
    NativeArray<float4> planes

    Planes to make the intersection.

    float3 center

    Center of the bounding sphere to intersect.

    Single radius

    Radius of the bounding sphere to intersect.

    Returns
    Type Description
    FrustumPlanes.IntersectResult

    Intersection result

    Intersect2(NativeArray<FrustumPlanes.PlanePacket4>, AABB)

    Performs an intersection test between an AABB and 6 culling planes.

    Declaration
    public static FrustumPlanes.IntersectResult Intersect2(NativeArray<FrustumPlanes.PlanePacket4> cullingPlanePackets, AABB a)
    Parameters
    Type Name Description
    NativeArray<FrustumPlanes.PlanePacket4> cullingPlanePackets

    The planes to test.

    AABB a

    An AABB to test.

    Returns
    Type Description
    FrustumPlanes.IntersectResult

    Returns the intersection result.

    Intersect2NoPartial(NativeArray<FrustumPlanes.PlanePacket4>, AABB)

    Performs an intersection test between an AABB and 6 culling planes.

    Declaration
    public static FrustumPlanes.IntersectResult Intersect2NoPartial(NativeArray<FrustumPlanes.PlanePacket4> cullingPlanePackets, AABB a)
    Parameters
    Type Name Description
    NativeArray<FrustumPlanes.PlanePacket4> cullingPlanePackets

    The planes to test.

    AABB a

    The AABB to test.

    Returns
    Type Description
    FrustumPlanes.IntersectResult

    Intersection result

    Remarks

    This method treats a partial intersection as being inside of the planes.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023