Class Plane
Represents a 3-Dimensional plane.
Inheritance
Namespace: Paramdigma.Core.Geometry
Assembly: Paramdigma.Core.dll
Syntax
public class Plane : object
Constructors
| Improve this Doc View SourcePlane(Plane)
Initializes a new instance of the Plane class. Basically it makes a shallow copy. If you need a deep copy, use Clone() method.
Declaration
public Plane(Plane plane)
Parameters
Type | Name | Description |
---|---|---|
Plane | plane | Plane to copy values from. |
Plane(Point3d)
Initializes a new instance of the Plane class given it's origin at the specified point.
Declaration
public Plane(Point3d origin)
Parameters
Type | Name | Description |
---|---|---|
Point3d | origin | Point to act as origin. |
Plane(Point3d, Point3d, Point3d)
Initializes a new instance of the Plane class given 3 non co-linear points.
Declaration
public Plane(Point3d ptA, Point3d ptB, Point3d ptC)
Parameters
Type | Name | Description |
---|---|---|
Point3d | ptA | First point. Will be considered the plane origin. |
Point3d | ptB | Second point. Marks the X axis direction of the plane. |
Point3d | ptC | Third point. Roughly points the direction of the Y axis. |
Plane(Point3d, Vector3d, Vector3d)
Initializes a new instance of the Plane class given a point and two vectors. Vectors do not necessarily have to be perpendicular. Will throw an error if vectors are parallel or close to parallel.
Declaration
public Plane(Point3d origin, Vector3d xAxis, Vector3d yAxis)
Parameters
Type | Name | Description |
---|---|---|
Point3d | origin | An origin point. |
Vector3d | xAxis | Vector to act as X axis. |
Vector3d | yAxis | Vector to act as Y axis. |
Plane(Point3d, Vector3d, Vector3d, Vector3d)
Initializes a new instance of the Plane class given a point and three vectors. Will throw an error if vectors are not perpendicular to each other.
Declaration
public Plane(Point3d origin, Vector3d xAxis, Vector3d yAxis, Vector3d zAxis)
Parameters
Type | Name | Description |
---|---|---|
Point3d | origin | An origin point. |
Vector3d | xAxis | Vector to act as X axis. |
Vector3d | yAxis | Vector to act as Y axis. |
Vector3d | zAxis | Vector to act as Z axis. |
Properties
| Improve this Doc View SourceOrigin
Gets or sets the plane origin.
Declaration
public Point3d Origin { get; set; }
Property Value
Type | Description |
---|---|
Point3d |
WorldXY
Gets plane with axis' UnitX and UnitY.
Declaration
public static Plane WorldXY { get; }
Property Value
Type | Description |
---|---|
Plane |
WorldXZ
Gets plane with axis' UnitX and UnitZ.
Declaration
public static Plane WorldXZ { get; }
Property Value
Type | Description |
---|---|
Plane |
WorldYZ
Gets plane with axis' UnitY and UnitZ.
Declaration
public static Plane WorldYZ { get; }
Property Value
Type | Description |
---|---|
Plane |
XAxis
Gets or sets the plane X axis.
Declaration
public Vector3d XAxis { get; set; }
Property Value
Type | Description |
---|---|
Vector3d |
YAxis
Gets or sets the plane Y axis.
Declaration
public Vector3d YAxis { get; set; }
Property Value
Type | Description |
---|---|
Vector3d |
ZAxis
Gets or sets the plane Z axis.
Declaration
public Vector3d ZAxis { get; set; }
Property Value
Type | Description |
---|---|
Vector3d |
Methods
| Improve this Doc View SourceClone()
Performs a deep copy of this plane.
Declaration
public Plane Clone()
Returns
Type | Description |
---|---|
Plane | Plane clone. |
ClosestPoint(Point3d)
Project a point to the plane.
Declaration
public Point3d ClosestPoint(Point3d point)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point | Point to project. |
Returns
Type | Description |
---|---|
Point3d | Point projection. |
DistanceTo(Point3d)
Compute the distance from a point to the plane.
Declaration
public double DistanceTo(Point3d point)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point | Point to compute distance to. |
Returns
Type | Description |
---|---|
System.Double | Distance to point. |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Flip()
Flips the plane by interchanging the X and Y axis and negating the Z axis.
Declaration
public void Flip()
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
GetPlaneEquation()
Returns the parametric equation for this plane.
Declaration
public double[] GetPlaneEquation()
Returns
Type | Description |
---|---|
System.Double[] | List with equation values. |
PointAt(Double, Double)
Computes the point at the specified Plane parameters.
Declaration
public Point3d PointAt(double u, double v)
Parameters
Type | Name | Description |
---|---|---|
System.Double | u | U coordinate. |
System.Double | v | V coordinate. |
Returns
Type | Description |
---|---|
Point3d |
PointAt(Double, Double, Double)
Computes a 3D point in the coordinate space of this plane.
Declaration
public Point3d PointAt(double u, double v, double w)
Parameters
Type | Name | Description |
---|---|---|
System.Double | u | Coordinate for the X axis. |
System.Double | v | Coordinate for the Y axis. |
System.Double | w | Coordinate for the Z axis. |
Returns
Type | Description |
---|---|
Point3d | Computed point. |
RemapToPlaneSpace(Point3d)
Remap a given point to this plane's coordinate system.
Declaration
public Point3d RemapToPlaneSpace(Point3d point)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point | Point to remap. |
Returns
Type | Description |
---|---|
Point3d | Point with relative coordinates to the plane. |
RemapToWorldXYSpace(Point3d)
Remap a given point to the XY Plane coordiante system.
Declaration
public Point3d RemapToWorldXYSpace(Point3d point)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point | Point to remap. |
Returns
Type | Description |
---|---|
Point3d | Point with relative coordinates to the plane. |