Namespaces

Types in MathNet.Spatial.Euclidean

Type Plane

Namespace MathNet.Spatial.Euclidean

Parent ValueType

Interfaces IEquatable<Plane>, IXmlSerializable

A geometric plane

Constructors

Static Functions

Methods

Properties

Fields

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

Plane BestFit(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.
Parameters
IEnumerable<Point3D> points

The point cloud

Return
Plane

Fitted Plane , found by SVD decomposition

Plane FromPoints(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.

Point3D PointFromPlanes(Plane plane1, Plane plane2, Plane plane3)

Returns a point of intersection between three planes
Parameters
Plane plane1

The first plane

Plane plane2

The second plane

Plane plane3

The third plane

Return
Point3D

The intersection point

Public Methods

double AbsoluteDistanceTo(Point3D point)

Get the distance to the point.
Parameters
Point3D point

The Point3D

Return
double

The distance.

bool Equals(object obj)

bool Equals(Plane p)

bool Equals(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

int GetHashCode()

Type GetType()

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

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

A line segment

double tolerance

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

Return
Nullable<Point3D>

Intersection Point or null

Ray3D IntersectionWith(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.

Point3D IntersectionWith(Ray3D ray, double tolerance)

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

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
LineSegment3D line

A line segment

double tolerance

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

Return
Nullable<Point3D>

Intersection Point or null

Point3D MirrorAbout(Point3D p)

Returns p mirrored about the plane.
Parameters
Point3D p

The Point3D

Return
Point3D

The mirrored point.

Ray3D Project(UnitVector3D vector3DToProject)

Project Vector3D onto this plane
Parameters
UnitVector3D vector3DToProject

The Vector3D to project

Return
Ray3D

The projected Vector3D

Ray3D Project(Vector3D vector3DToProject)

Project Vector3D onto this plane
Parameters
Vector3D vector3DToProject

The Vector3D to project

Return
Ray3D

The projected Vector3D

Ray3D Project(Ray3D rayToProject)

Projects a ray onto the plane
Parameters
Ray3D rayToProject

The ray to project

Return
Ray3D

A projected ray

LineSegment3D Project(LineSegment3D line3DToProject)

Projects a line onto the plane
Parameters
LineSegment3D line3DToProject

The line to project

Return
LineSegment3D

A projected line

Line3D Project(Line3D line3DToProject)

Projects a line onto the plane
Parameters
Line3D line3DToProject

The line to project

Return
Line3D

A projected line

Point3D Project(Point3D p, Nullable<UnitVector3D> projectionDirection)

Projects a point onto the plane
Parameters
Point3D p

A point

Nullable<UnitVector3D> projectionDirection

The direction of projection

Return
Point3D

a projected point

Plane Rotate(UnitVector3D aboutVector, Angle angle)

Rotates a plane
Parameters
UnitVector3D aboutVector

The vector about which to rotate

Angle angle

An angle to rotate

Return
Plane

A rotated plane

double SignedDistanceTo(Ray3D ray)

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

The Point3D

Return
double

The distance.

double SignedDistanceTo(Point3D point)

Get the distance to the point along the Normal
Parameters
Point3D point

The Point3D

Return
double

The distance.

double SignedDistanceTo(Plane other)

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

The Point3D

Return
double

The distance.

string ToString()

Public Properties

double A get;

Gets the Normal x component.

double B get;

Gets the Normal y component.

double C get;

Gets the Normal y component.

double D 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