docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Constructor Plane

    Plane(float, float, float, float)

    Constructs a Plane from arbitrary coefficients A, B, C, D of the plane equation Ax + By + Cz + Dw = 0.

    Declaration
    public Plane(float coefficientA, float coefficientB, float coefficientC, float coefficientD)
    Parameters
    Type Name Description
    float coefficientA

    Coefficient A from plane equation.

    float coefficientB

    Coefficient B from plane equation.

    float coefficientC

    Coefficient C from plane equation.

    float coefficientD

    Coefficient D from plane equation.

    Remarks

    The constructed plane will be the normalized form of the plane specified by the given coefficients.

    Plane(float3, float)

    Constructs a plane with a normal vector and distance from the origin.

    Declaration
    public Plane(float3 normal, float distance)
    Parameters
    Type Name Description
    float3 normal

    A non-zero vector that is perpendicular to the plane. It may be any length.

    float distance

    Distance from the origin along the normal. A negative value moves the plane in the same direction as the normal while a positive value moves it in the opposite direction.

    Remarks

    The constructed plane will be the normalized form of the plane specified by the inputs.

    Plane(float3, float3)

    Constructs a plane with a normal vector and a point that lies in the plane.

    Declaration
    public Plane(float3 normal, float3 pointInPlane)
    Parameters
    Type Name Description
    float3 normal

    A non-zero vector that is perpendicular to the plane. It may be any length.

    float3 pointInPlane

    A point that lies in the plane.

    Remarks

    The constructed plane will be the normalized form of the plane specified by the inputs.

    Plane(float3, float3, float3)

    Constructs a plane with two vectors and a point that all lie in the plane.

    Declaration
    public Plane(float3 vector1InPlane, float3 vector2InPlane, float3 pointInPlane)
    Parameters
    Type Name Description
    float3 vector1InPlane

    A non-zero vector that lies in the plane. It may be any length.

    float3 vector2InPlane

    A non-zero vector that lies in the plane. It may be any length and must not be a scalar multiple of vector1InPlane.

    float3 pointInPlane

    A point that lies in the plane.

    Remarks

    The constructed plane will be the normalized form of the plane specified by the inputs.

    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)