struct
Plane
public sealed struct Plane Represents a plane.
Constructors
Properties
Methods
Single GetDistance(Vector3 point) Returns the distance from this plane to given point.
Boolean IsInFront(Vector3 point) Returns true if given point is on the side of the plane where its normal is pointing.
Boolean IsInFront(BBox box, Boolean partially = False) Returns true if given bounding box is on the side of the plane where its normal is pointing.
Boolean TryTrace(Ray ray, Vector3 hitPoint, Boolean twosided = False, Double maxDistance = 1.7976931348623157E+308) Trace a Ray against this plane
Vector3? Trace(Ray ray, Boolean twosided = False, Double maxDistance = 1.7976931348623157E+308) Trace a Ray against this plane
ray — The origin and direction to trace from twosided — If true we'll trace against the underside of the plane too. maxDistance — The maximum distance from the ray origin to trace returns — The hit position on the ray. Or null if we didn't hit.
static Vector3? GetIntersection(Plane vp1, Plane vp2, Plane vp3) Gets the intersecting point of the three planes if it exists. If the planes don't all intersect will return null.
Vector3? IntersectLine(Line line) Gets the intersecting point of a line segment.
Fields
| Name | Type | Description |
|---|---|---|
Normal | Vector3 | The direction of the plane. |
Distance | Single | Distance of the plane from world origin in the direction given by Normal. |