Show / Hide Table of Contents

    Class Plane

    A cartesian plane.

    Inheritance
    System.Object
    Plane
    Implements
    System.IEquatable<Plane>
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Elements.Geometry
    Assembly: Hypar.Elements.dll
    Syntax
    public class Plane : IEquatable<Plane>

    Constructors

    Plane(Vector3, Vector3)

    Construct a plane.

    Declaration
    [JsonConstructor]
    public Plane(Vector3 origin, Vector3 normal)
    Parameters
    Type Name Description
    Vector3 origin

    The origin of the plane.

    Vector3 normal

    The normal of the plane.

    Plane(Vector3, Vector3, Vector3)

    Construct a plane by three points. The plane is constructed as a->b * b->c.

    Declaration
    public Plane(Vector3 a, Vector3 b, Vector3 c)
    Parameters
    Type Name Description
    Vector3 a
    Vector3 b
    Vector3 c

    Plane(Vector3, IList<Vector3>)

    Construct a plane. Only the first three points of the points array will be used.

    Declaration
    public Plane(Vector3 origin, IList<Vector3> points)
    Parameters
    Type Name Description
    Vector3 origin

    The origin of the plane.

    System.Collections.Generic.IList<Vector3> points

    An array of vectors to be used to determine the normal of the plane.

    Properties

    Normal

    The normal of the plane.

    Declaration
    [JsonProperty("Normal", Required = Required.AllowNull)]
    public Vector3 Normal { get; set; }
    Property Value
    Type Description
    Vector3

    Origin

    The origin of the plane.

    Declaration
    [JsonProperty("Origin", Required = Required.AllowNull)]
    public Vector3 Origin { get; set; }
    Property Value
    Type Description
    Vector3

    XY

    The world XY Plane.

    Declaration
    public static Plane XY { get; }
    Property Value
    Type Description
    Plane

    XZ

    The world XZ Plane.

    Declaration
    public static Plane XZ { get; }
    Property Value
    Type Description
    Plane

    YZ

    The world YZ Plane.

    Declaration
    public static Plane YZ { get; }
    Property Value
    Type Description
    Plane

    Methods

    ClosestPoint(Vector3)

    Find the closest point on this plane from a given sample point.

    Declaration
    public Vector3 ClosestPoint(Vector3 point)
    Parameters
    Type Name Description
    Vector3 point

    The sample point.

    Returns
    Type Description
    Vector3

    The closest point to the sample point on this plane.

    Equals(Plane)

    Is this plane equal to the provided plane?

    Declaration
    public bool Equals(Plane other)
    Parameters
    Type Name Description
    Plane other

    The plane to test.

    Returns
    Type Description
    System.Boolean

    Returns true if the two planes are equal, otherwise false.

    Intersects(Plane, Plane, out Vector3)

    Does this plane intersect the other two provided planes.

    Declaration
    public bool Intersects(Plane a, Plane b, out Vector3 result)
    Parameters
    Type Name Description
    Plane a

    The second plane.

    Plane b

    The third plane.

    Vector3 result

    The location of intersection.

    Returns
    Type Description
    System.Boolean

    True if an intersection exists, otherwise false.

    Intersects((Vector3 from, Vector3 to), out Vector3)

    Does this plane intersect the provided edge?

    Declaration
    public bool Intersects((Vector3 from, Vector3 to) edge, out Vector3 result)
    Parameters
    Type Name Description
    System.ValueTuple<Vector3, Vector3> edge

    The edge to intersect.

    Vector3 result

    The intersection.

    Returns
    Type Description
    System.Boolean

    True if an intersection occurs, otherwise false.

    IsCoplanar(Plane)

    Is this plane coplanar with the provided plane? This method assumes that both planes have unit length normals.

    Declaration
    public bool IsCoplanar(Plane plane)
    Parameters
    Type Name Description
    Plane plane

    The plane to test.

    Returns
    Type Description
    System.Boolean

    True if the plane is coplanar, otherwise false.

    SignedDistanceTo(Vector3)

    Find the signed distance from a sample point to a plane. If positive, the point is on the "Normal" side of the plane, otherwise it is on the opposite side.

    Declaration
    public double SignedDistanceTo(Vector3 point)
    Parameters
    Type Name Description
    Vector3 point

    The sample point.

    Returns
    Type Description
    System.Double

    The signed distance between this plane and the sample point.

    Implements

    System.IEquatable<T>