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 p1, Point3D p2, Point3D p3)

Initializes a new instance of the Plane struct. Creates a Plane that contains the three given points. http://www.had2know.com/academics/equation-plane-through-3-points.html
Obsolete: This constructor will be removed, use factory method Plane.FromPoints. Made obsolete 2017-12-05.
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

The Plane containing the three points.

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.
Parameters
UnitVector3D normal

The Plane's normal vector.

Point3D rootPoint

A point in the plane.

Plane(UnitVector3D normal, double offset)

Initializes a new instance of the Plane struct. Constructs a Plane from the given normal and distance along the normal from the origin.
Parameters
UnitVector3D normal

The Plane's normal vector.

double offset

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.
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(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.
Parameters
Point3D rootPoint

A point in the plane.

UnitVector3D normal

The Plane's normal vector.

Public Static Functions

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.

Plane Parse(string s)

Creates a Plane from its string representation
Obsolete: Should not have been made public, removed on 9/12/2017
Parameters
string s

The string representation of the Plane

Return
Plane

a new Plane

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
Obsolete: Use LineSegment3D instead, Obsolete from 2017-12-10
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.

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 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.

Point3D MirrorAbout(Point3D p)

Returns p mirrored about the plane.
Parameters
Point3D p

The Point3D

Return
Point3D

The mirrored point.

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

Line3D Project(Line3D line3DToProject)

Projects a line onto the plane
Obsolete: Use LineSegment3D instead, obsolete from 2017-12-10
Parameters
Line3D line3DToProject

The line to project

Return
Line3D

A projected line

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

LineSegment3D Project(LineSegment3D line3DToProject)

Projects a line onto the plane
Parameters
LineSegment3D line3DToProject

The line to project

Return
LineSegment3D

A projected line

Ray3D Project(Ray3D rayToProject)

Projects a ray onto the plane
Parameters
Ray3D rayToProject

The ray to project

Return
Ray3D

A projected ray

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

double SignedDistanceTo(Point3D point)

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

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.

Point3D RootPoint get;

Gets the point on the plane closest to origin.

Public fields

UnitVector3D Normal

The normal vector of the Plane.
return UnitVector3D

double D

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