Version: Unity 6.5 (6000.5)
LanguageEnglish
  • C#

Plane Constructor

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

Declaration

public Plane(float coefficientA, float coefficientB, float coefficientC, float coefficientD);

Parameters

Parameter Description
coefficientA Coefficient A from plane equation.
coefficientB Coefficient B from plane equation.
coefficientC Coefficient C from plane equation.
coefficientD Coefficient D from plane equation.

Description

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

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


Declaration

public Plane(float3 normal, float distance);

Parameters

Parameter Description
normal A non-zero vector that is perpendicular to the plane. It may be any length.
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.

Description

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

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


Declaration

public Plane(float3 normal, float3 pointInPlane);

Parameters

Parameter Description
normal A non-zero vector that is perpendicular to the plane. It may be any length.
pointInPlane A point that lies in the plane.

Description

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

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


Declaration

public Plane(float3 vector1InPlane, float3 vector2InPlane, float3 pointInPlane);

Parameters

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

Description

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

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