Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Struct: RT.Util.Geometry.EdgeD

Summary

A double-precision class encapsulating a straight line segment connecting two points.

Constructors

EdgeD(PointD start, PointD end)
Initialises a line segment using the specified start and end point.
EdgeD(double x1, double y1, double x2, double y2)
Initialises a line segment using the start point (X1, Y1) and the end point (X2, Y2).
EdgeD(PointD start, double angle)
Initialises a line segment starting at the specified point. The ending point is 1 unit away at the specified angle.

Instance methods

bool Returns true if the specified point lies exactly on this edge. Accurate results are not guaranteed on edges which are not axis-aligned.
double
CrossZ(PointD point)
Returns the Z component of the cross product of this edge, treated as a vector from EdgeD.Start to EdgeD.End, with a vector from EdgeD.Start to the specified point.
double Returns the Z component of the cross product of this edge, treated as a vector, with the specified edge, also treated as a vector.
double Calculates the distance between the specified point and the extended straight line identified by this edge.
bool
Equals(EdgeD other)
Compares two EdgeD ignoring direction: edges are considered equal as long as they have the same endpoints.
bool
Equals(object obj)
  • Overrides: object.Equals(object)
Compares two EdgeD objects for equality.
int
  • Overrides: object.GetHashCode()
Returns a hash code for the current EdgeD.
bool
IntersectsWith(EdgeD r, bool excludeVertexTouching = false)
Determines whether two edges intersect.
double Calculates the projection of the specified point onto the line defined by this edge. Returns the Lambda of this point P, defined by P = Start + Lambda * (End - Start). Hence the lambda is 0 if the projection falls exactly onto the Start point, and 1 if it falls on the End point.
PointDReturns a point on this edge that is as near as possible to the specified point.
string
  • Overrides: object.ToString()
Provides a string representation of the current EdgeD.

Operators

bool
operator==(EdgeD one, EdgeD other)
Compares two EdgeD ignoring direction: edges are considered equal as long as they have the same endpoints.
bool
operator!=(EdgeD one, EdgeD other)

Instance properties

doubleReturns the angle between the x-axis and this edge, in radians.
doubleReturns the angle between the x-axis and this edge, in degrees.
doubleReturns the difference in the Y-co-ordinates of the start and end point of this EdgeD.
doubleReturns the length of this edge (the distance between EdgeD.Start and EdgeD.End).
PointDReturns the point located halfway along this edge.
doubleReturns the difference in the X-co-ordinates of the start and end point of this EdgeD.

Instance fields

PointDEnd point of the line segment.
PointDStart point of the line segment.