Version: Unity 6.5 (6000.5)
LanguageEnglish
  • C#

Plane

struct in Unity.Mathematics.Geometry

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

Description

A plane represented by a normal vector and a distance along the normal from the origin.

A plane splits the 3D space in half. The normal vector points to the positive half and the other half is considered negative.

Properties

Property Description
Distance Get/set the distance of the plane from the origin. May be a negative value.
Flipped Flips the plane so the normal points in the opposite direction.
Normal Get/set the normal vector of the plane.
NormalAndDistance A plane in the form Ax + By + Cz + Dw = 0.

Constructors

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

Public Methods

Method Description
Projection Projects the given point onto the plane.
SignedDistanceToPoint Get the signed distance from the point to the plane.

Static Methods

Method Description
CreateFromUnitNormalAndDistance Creates a normalized Plane directly without normalization cost.
CreateFromUnitNormalAndPointInPlane Creates a normalized Plane without normalization cost.
Normalize Normalizes the given Plane.

Operators

Operator Description
float4 Implicitly converts a Plane to Unity.Mathematics.float4.