Namespaces

Types in MathNet.Spatial.Euclidean

Type Ray3D

Namespace MathNet.Spatial.Euclidean

Parent ValueType

Interfaces IEquatable<Ray3D>, IXmlSerializable, IFormattable

A ray in 3D space

Constructors

Static Functions

Methods

Fields

Public Constructors

Ray3D(Point3D throughPoint, UnitVector3D direction)

Initializes a new instance of the Ray3D struct.
Parameters
Point3D throughPoint

The start point of the ray.

UnitVector3D direction

The direction of the ray.

Ray3D(Point3D throughPoint, Vector3D direction)

Initializes a new instance of the Ray3D struct.
Parameters
Point3D throughPoint

The start point of the ray.

Vector3D direction

A vector indicating the direction of the ray.

Public Static Functions

Ray3D IntersectionOf(Plane plane1, Plane plane2)

The intersection of the two planes
Parameters
Plane plane1

The first plane

Plane plane2

The second plane

Return
Ray3D

A ray at the intersection of two planes

Ray3D Parse(string point, string direction)

Parses string representation of throughpoint and direction See Parse and Parse for details on acceptable formats. This is mainly meant for tests
Parameters
string point

a string representing a start point for the ray.

string direction

a string representing a direction for the ray.

Return
Ray3D

A ray.

Ray3D Parse(string s)

Parses a string in the format: 'p:{1, 2, 3} v:{0, 0, 1}' to a Ray3D This is mainly meant for tests
Obsolete: Should not have been made public. Mode Obsolete 2017-12-09
Parameters
string s

a string representing the ray

Return
Ray3D

a ray

Public Methods

bool Equals(Ray3D other, double tolerance)

Returns a value to indicate if a pair of rays are equal
Parameters
Ray3D other

The ray to compare against.

double tolerance

A tolerance (epsilon) to adjust for floating point error

Return
bool

True if the rays are equal; otherwise false

bool Equals(Ray3D r)

bool Equals(object obj)

int GetHashCode()

Type GetType()

Nullable<Point3D> IntersectionWith(Plane plane)

Returns the point at which this ray intersects with the plane
Parameters
Plane plane

A geometric plane.

Return
Nullable<Point3D>

A point of intersection if such an intersection exists; otherwise null.

bool IsCollinear(Ray3D otherRay, double tolerance)

Returns a value to indicate if a pair of rays are collinear
Parameters
Ray3D otherRay

The ray to compare against.

double tolerance

A tolerance (epsilon) to adjust for floating point error

Return
bool

True if the rays are collinear; otherwise false.

Line3D LineTo(Point3D point3D)

Returns the shortest line from a point to the ray
Obsolete: Use ShortestLineTo, Obsolete from 2017-12-11
Parameters
Point3D point3D

A point.

Return
Line3D

A line segment from the point to the closest point on the ray

LineSegment3D ShortestLineTo(Point3D point3D)

Returns the shortest line from a point to the ray
Parameters
Point3D point3D

A point.

Return
LineSegment3D

A line segment from the point to the closest point on the ray

string ToString()

string ToString(string format, IFormatProvider formatProvider)

Public fields

Point3D ThroughPoint

The start point of the ray
return Point3D

UnitVector3D Direction

The direction of the ray
return UnitVector3D