Namespaces

Types in MathNet.Spatial.Euclidean

Type PolyLine3D

Namespace MathNet.Spatial.Euclidean

Interfaces IEnumerable<Point3D>, IEquatable<PolyLine3D>

A PolyLine is an ordered series of line segments in space represented as list of connected Point3Ds.

Constructors

Methods

Properties

Public Constructors

PolyLine3D(IEnumerable<Point3D> points)

Initializes a new instance of the PolyLine3D class. Creates a PolyLine3D from a pre-existing IEnumerable of Point3Ds
Parameters
IEnumerable<Point3D> points

A list of points.

Public Methods

Point3D ClosestPointTo(Point3D p)

Returns the closest point on the polyline to the given point.
Parameters
Point3D p

A point

Return
Point3D

A point which is the closest to the given point but still on the line.

bool Equals(PolyLine3D other, double tolerance)

Returns a value to indicate if a pair of polylines are equal
Parameters
PolyLine3D other

The polyline to compare against.

double tolerance

A tolerance (epsilon) to adjust for floating point error

Return
bool

true if the polylines are equal; otherwise false

bool Equals(PolyLine3D other)

bool Equals(object obj)

IEnumerator<Point3D> GetEnumerator()

Obsolete: Use Vertices instead, obsolete since 2018-01-12

int GetHashCode()

Point3D GetPointAtFractionAlongCurve(double fraction)

Get the point at a fractional distance along the curve. For instance, fraction=0.5 will return the point halfway along the length of the polyline.
Parameters
double fraction

The fractional length at which to compute the point

Return
Point3D

A point a fraction of the way along the line.

Point3D GetPointAtLengthFromStart(double lengthFromStart)

Get the point at a specified distance along the curve. A negative argument will return the first point, an argument greater than the length of the curve will return the last point.
Parameters
double lengthFromStart

The distance from the first point along the curve at which to return a point

Return
Point3D

A point which is the specified distance along the line

Type GetType()

string ToString()

Public Properties

int Count get;

Gets an integer representing the number of Point3D objects in the polyline
Obsolete: Use VertexCount instead, obsolete since 2018-01-12

Point3D Item get;

Returns a point in the polyline by index number
Obsolete: Use Vertices instead, obsolete since 2018-01-12

double Length get;

Gets the length of the polyline, computed as the sum of the lengths of every segment

int VertexCount get;

Gets the number of vertices in the polyline.

IEnumerable<Point3D> Vertices get;

Gets a list of vertices