s&box docs

public sealed struct Sandbox.Plane

Represents a plane.

Constructors

Showing 3 constructors

Methods

Showing 11 methods

public float GetDistance(Vector3 point)

Returns the distance from this plane to given point.

public static System.Nullable`1<Vector3> GetIntersection(Sandbox.Plane vp1, Sandbox.Plane vp2, Sandbox.Plane vp3)

Gets the intersecting point of the three planes if it exists. If the planes don't all intersect will return null.

public Vector3 ReflectDirection(Vector3 direction)

Reflects a direction across the plane.

public Vector3 ReflectPoint(Vector3 point)

Reflects a point across the plane.

public Vector3 SnapToPlane(Vector3 point)

Returns closest point on the plane to given point.

public System.Nullable`1<Vector3> Trace(Ray ray, bool twosided = False, double maxDistance = 1.7976931348623157E+308)

Trace a Ray against this plane

Parameters

  • ray: The origin and direction to trace from
  • twosided: If true we'll trace against the underside of the plane too. Default: False
  • maxDistance: The maximum distance from the ray origin to trace Default: 1.7976931348623157E+308

Returns

The hit position on the ray. Or null if we didn't hit.

public bool TryTrace(Ray ray, Vector3 hitPoint, bool twosided = False, double maxDistance = 1.7976931348623157E+308)

Trace a Ray against this plane

Parameters

  • twosided: Default: False
  • maxDistance: Default: 1.7976931348623157E+308

Properties

Showing 2 properties

public Vector3 Sandbox.Plane.Origin { get; set; }Obsolete

Origin position of the plane, basically a vector `Sandbox.Plane.Distance` away from world origin in the direction given by `Sandbox.Plane.Normal`.

Obsolete: Use Plane.Position

public Vector3 Sandbox.Plane.Position { get; set; }

Origin position of the plane, basically a vector `Sandbox.Plane.Distance` away from world origin in the direction given by `Sandbox.Plane.Normal`.

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.System
Doc IDT:Sandbox.Plane

On this page