## Types in MathNet.Spatial.Euclidean

Type Plane

Namespace MathNet.Spatial.Euclidean

Parent ValueType

Interfaces IEquatable<Plane>, IXmlSerializable

A geometric plane

### Public Constructors

#### Plane(Point3D rootPoint, UnitVector3D normal)

Initializes a new instance of the Plane struct. Constructs a Plane from the given normal and distance along the normal from the origin. The resulting plane is in its Hesse normal form.
##### Parameters
###### Point3D rootPoint

A point in the plane.

###### UnitVector3D normal

The Plane's normal vector.

#### Plane(UnitVector3D normal, double distance)

Initializes a new instance of the Plane struct. Constructs a Plane from the given normal and distance along the normal from the origin. The resulting plane is in its Hesse normal form.
##### Parameters
###### UnitVector3D normal

The Plane's normal vector.

###### double distance

The Plane's distance from the origin along its normal vector.

#### Plane(double x, double y, double z, double d)

Initializes a new instance of the Plane struct. Constructs a Plane from the X, Y, and Z components of its normal, and its distance from the origin on that normal. The resulting plane is in its Hesse normal form.
##### Parameters
###### double x

The X-component of the normal.

###### double y

The Y-component of the normal.

###### double z

The Z-component of the normal.

###### double d

The distance of the Plane along its normal from the origin.

#### Plane(UnitVector3D normal, Point3D rootPoint)

Initializes a new instance of the Plane struct. Constructs a Plane from the given normal and distance along the normal from the origin. The resulting plane is in its Hesse normal form.
##### Parameters
###### UnitVector3D normal

The Plane's normal vector.

###### Point3D rootPoint

A point in the plane.

### Public Static Functions

#### PlaneBestFit(IEnumerable<Point3D> points)

Initializes a new instance of the Plane struct. Constructs the plane which best fits a given point cloud, by minimizing the sum of Euclidean distances of the points from the plane.

The point cloud

##### Return
###### Plane

Fitted Plane , found by SVD decomposition

#### PlaneFromPoints(Point3D p1, Point3D p2, Point3D p3)

Initializes a new instance of the Plane struct. Creates a plane that contains the three given points.
##### Parameters
###### Point3D p1

The first point on the plane.

###### Point3D p2

The second point on the plane.

###### Point3D p3

The third point on the plane.

##### Return
###### Plane

The plane containing the three points.

#### Point3DPointFromPlanes(Plane plane1, Plane plane2, Plane plane3)

Returns a point of intersection between three planes

The first plane

The second plane

The third plane

##### Return
###### Point3D

The intersection point

### Public Methods

#### doubleAbsoluteDistanceTo(Point3D point)

Get the distance to the point.

The Point3D

The distance.

#### boolEquals(Plane other, double tolerance)

Returns a value to indicate if a pair of geometric planes are equal
##### Parameters
###### Plane other

The geometric plane to compare against.

###### double tolerance

A tolerance (epsilon) to adjust for floating point error

##### Return
###### bool

true if the geometric planes are equal; otherwise false

#### Nullable<Point3D>IntersectionWith(Line3D line, double tolerance)

Find intersection between Line3D and Plane http://geomalgorithms.com/a05-_intersect-1.html
##### Parameters

A line segment

###### double tolerance

A tolerance (epsilon) to account for floating point error.

##### Return
###### Nullable<Point3D>

Intersection Point or null

#### Ray3DIntersectionWith(Plane intersectingPlane, double tolerance)

Finds the intersection of the two planes, throws if they are parallel http://mathworld.wolfram.com/Plane-PlaneIntersection.html
##### Parameters
###### Plane intersectingPlane

a plane which intersects

###### double tolerance

A tolerance (epsilon) to account for floating point error.

##### Return
###### Ray3D

A ray at the intersection.

#### Point3DIntersectionWith(Ray3D ray, double tolerance)

http://www.cs.princeton.edu/courses/archive/fall00/cs426/lectures/raycast/sld017.htm
##### Parameters

A ray

###### double tolerance

A tolerance (epsilon) to account for floating point error.

##### Return
###### Point3D

The point of intersection.

#### Nullable<Point3D>IntersectionWith(LineSegment3D line, double tolerance)

Find intersection between LineSegment3D and Plane http://geomalgorithms.com/a05-_intersect-1.html
##### Parameters

A line segment

###### double tolerance

A tolerance (epsilon) to account for floating point error.

##### Return
###### Nullable<Point3D>

Intersection Point or null

Returns p mirrored about the plane.

The Point3D

##### Return
###### Point3D

The mirrored point.

#### Ray3DProject(UnitVector3D vector3DToProject)

Project Vector3D onto this plane
##### Parameters
###### UnitVector3D vector3DToProject

The Vector3D to project

##### Return
###### Ray3D

The projected Vector3D

#### Ray3DProject(Vector3D vector3DToProject)

Project Vector3D onto this plane
##### Parameters
###### Vector3D vector3DToProject

The Vector3D to project

##### Return
###### Ray3D

The projected Vector3D

#### Ray3DProject(Ray3D rayToProject)

Projects a ray onto the plane
##### Parameters
###### Ray3D rayToProject

The ray to project

A projected ray

#### LineSegment3DProject(LineSegment3D line3DToProject)

Projects a line onto the plane
##### Parameters
###### LineSegment3D line3DToProject

The line to project

A projected line

#### Line3DProject(Line3D line3DToProject)

Projects a line onto the plane
##### Parameters
###### Line3D line3DToProject

The line to project

A projected line

#### Point3DProject(Point3D p, Nullable<UnitVector3D> projectionDirection)

Projects a point onto the plane
##### Parameters

A point

###### Nullable<UnitVector3D> projectionDirection

The direction of projection

##### Return
###### Point3D

a projected point

#### PlaneRotate(UnitVector3D aboutVector, Angle angle)

Rotates a plane
##### Parameters

The vector about which to rotate

###### Angle angle

An angle to rotate

A rotated plane

#### doubleSignedDistanceTo(Ray3D ray)

Get the distance to the ThroughPoint of ray along the Normal This assumes the ray is parallel to the plane.

The Point3D

The distance.

#### doubleSignedDistanceTo(Point3D point)

Get the distance to the point along the Normal

The Point3D

The distance.

#### doubleSignedDistanceTo(Plane other)

Get the distance to the plane along the Normal This assumes the planes are parallel

The Point3D

The distance.

### Public Properties

#### doubleA get;

Gets the Normal x component.

#### doubleB get;

Gets the Normal y component.

#### doubleC get;

Gets the Normal y component.

#### doubleD get;

The distance to the Plane along its normal from the origin.

### Public fields

#### UnitVector3D Normal

The normal vector of the Plane.
 return UnitVector3D

#### Point3D RootPoint

Gets the point on the plane closest to origin.
 return Point3D