Namespaces

Types in MathNet.Spatial.Euclidean

Type Point3D

Namespace MathNet.Spatial.Euclidean

Parent ValueType

Interfaces IXmlSerializable, IEquatable<Point3D>, IFormattable

Represents a point in 3 dimensional space

Constructors

Static Functions

Methods

Properties

Public Constructors

Point3D(double x, double y, double z)

Initializes a new instance of the Point3D struct.
Parameters
double x

The x component.

double y

The y component.

double z

The z component.

Public Static Functions

Point3D Centroid(Point3D[] points)

Returns the centroid of an arbitrary collection of points
Parameters
Point3D[] points

a list of points

Return
Point3D

The centroid of the points

Point3D Centroid(IEnumerable<Point3D> points)

Returns the centroid of an arbitrary collection of points
Parameters
IEnumerable<Point3D> points

a list of points

Return
Point3D

The centroid of the points

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

Returns the point at which three planes intersect
Parameters
Plane plane1

The first plane

Plane plane2

The second plane

Plane plane3

The third plane

Return
Point3D

The point of intersection

Point3D IntersectionOf(Plane plane, Ray3D ray)

Returns the point of intersection between a plane and a ray
Parameters
Plane plane

A geometric plane

Ray3D ray

a ray

Return
Point3D

The point of intersection

Point3D MidPoint(Point3D p1, Point3D p2)

Returns the midpoint of two points
Parameters
Point3D p1

The first point

Point3D p2

The second point

Return
Point3D

The midpoint of the points

Point3D OfVector(Vector<double> vector)

Create a new Point3D from a Math.NET Numerics vector of length 3.
Parameters
Vector<double> vector

A vector with length 2 to populate the created instance with.

Return
Point3D

A Point3D

Point3D Parse(string value, IFormatProvider formatProvider)

Attempts to convert a string of the form x,y,z into a point
Parameters
string value

The string to be converted

IFormatProvider formatProvider

The IFormatProvider

Return
Point3D

A point at the coordinates specified

Point3D ReadFrom(XmlReader reader)

Creates an Point3D from an XmlReader.
Parameters
XmlReader reader

An XmlReader positioned at the node to read into this Point3D.

Return
Point3D

An Point3D that contains the data read from the reader.

bool TryParse(string text, Point3D& result)

bool TryParse(string text, IFormatProvider formatProvider, Point3D& result)

Public Methods

double DistanceTo(Point3D p)

Finds the straight line distance to another point
Parameters
Point3D p

The other point

Return
double

a distance measure

bool Equals(Point3D other, double tolerance)

Returns a value to indicate if a pair of points are equal
Parameters
Point3D other

The point to compare against.

double tolerance

A tolerance (epsilon) to adjust for floating point error

Return
bool

True if the points are equal; otherwise false

bool Equals(Point3D other)

bool Equals(object obj)

int GetHashCode()

Type GetType()

Point3D MirrorAbout(Plane plane)

Returns the mirror point of this point across a plane
Parameters
Plane plane

A plane

Return
Point3D

The mirrored point

Point3D ProjectOn(Plane plane)

Projects a point onto a plane
Parameters
Plane plane

a plane

Return
Point3D

The projected point

Point3D Rotate(Vector3D aboutVector, Angle angle)

Rotates the point about a given vector
Parameters
Vector3D aboutVector

A vector

Angle angle

The angle to rotate

Return
Point3D

The rotated point

Point3D Rotate(UnitVector3D aboutVector, Angle angle)

Rotates the point about a given vector
Parameters
UnitVector3D aboutVector

A vector

Angle angle

The angle to rotate

Return
Point3D

The rotated point

string ToString()

string ToString(IFormatProvider provider)

Returns a string representation of this instance using the provided IFormatProvider
Parameters
IFormatProvider provider

A IFormatProvider

Return
string

The string representation of this instance.

string ToString(string format, IFormatProvider provider)

Vector<double> ToVector()

Convert to a Math.NET Numerics dense vector of length 3.
Return
Vector<double>

A Math.Net Numerics vector

Vector3D ToVector3D()

Converts this point into a vector from the origin
Return
Vector3D

A vector equivalent to this point

Point3D TransformBy(Matrix<double> m)

Applies a transform matrix to the point
Parameters
Matrix<double> m

A transform matrix

Return
Point3D

A new point

Point3D TransformBy(CoordinateSystem cs)

Applies a transform coordinate system to the point
Parameters
CoordinateSystem cs

A coordinate system

Return
Point3D

A new 3D point

Vector3D VectorTo(Point3D p)

Gets a vector from this point to another point
Parameters
Point3D p

The point to which the vector should go

Return
Vector3D

A vector pointing to the other point.

Public Properties

Point3D NaN get;

Gets a point where all values are NAN

Point3D Origin get;

Gets a point at the origin

double X get;

The x component.

double Y get;

The y component.

double Z get;

The z component.