Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Struct: RT.Geometry.PointD

Summary

Encapsulates a double-precision point.

Constructors

PointD(double x, double y)
Initializes a double-precision point with the specified co-ordinates.
PointD(double angle)
Initializes a double-precision point as a unit vector at a specified angle (in radians).
PointD(PointF pointF)
Converts the provided PointF to a PointD.

Instance methods

double
CrossZ(PointD other)
Returns the Z-component of the cross product of this vector with other. The Z-component is equal to the product of: the lengths of the two vectors and the sin of the angle between them. Note that the X and Y components of a cross product of 2D vectors are always zero.
void
DecomposeAlong(PointD vector, out double lenAlong, out double lenNormal)
Decomposes this vector into components relative to another vector.
void
Deconstruct(out double x, out double y)
Deconstructs this point into a tuple.
doubleCalculates the distance between this point and other.
double
Dot(PointD other)
Returns the dot product of this vector with the specified one.
bool
Equals(object obj)
  • Overrides: object.Equals(object)
Compares two PointD objects for equality.
bool
Equals(PointD other)
int
  • Overrides: object.GetHashCode()
Returns a hash code for the current PointD.
doubleReturns the length of this vector's projection onto the specified vector.
double
LengthProjectedOnto(double angle)
Returns the length of this vector's projection onto a unit vector at the specified angle.
PointD Returns a vector representing the projection (i.e. length and direction) of this vector onto the specified vector.
PointD
RecomposeVector(double lenAlong, double lenNormal)
Performs the inverse of PointD.DecomposeAlong(PointD, out double, out double) using the current vector as the reference vector.
PointD
Reflected(PointD axis1, PointD axis2)
Reflects this point about an axis given by any two points on that axis.
PointD
Rotate(double angle)
Rotates the current point by the specified angle about the origin. (see also remarks)
PointD
Rotate(double angle, PointD about)
Rotates the current point by the specified angle about the specified point. (see also remarks)
PointD Rotates this vector by 90 degrees. (see also remarks)
PointD
Rotated(double angle)
Returns a vector of the same length as this vector, but rotated by the specified angle. (see also remarks)
PointD
RotateDeg(double angle)
Rotates the current point by the specified angle about the origin. (see also remarks)
PointD
RotateDeg(double angle, PointD about)
Rotates the current point by the specified angle about the specified point. (see also remarks)
PointD Rotates this vector by -90 degrees. (see also remarks)
PointF Converts the current PointD object to a PointF. Note that doing so loses precision.
string
  • Overrides: object.ToString()
Provides a string representation of the current PointD.

Operators

PointD
operator+(PointD one, PointD other)
Performs vector addition, returning the result.
PointD
operator/(PointD vector, double scalar)
Scales a vector by 1 / scalar (i.e. performs scalar division).
bool Compares two PointD objects for equality.
bool Compares two PointD objects for inequality.
PointD
operator*(double scalar, PointD vector)
Scales a vector by a scalar.
PointD
operator*(PointD vector, double scalar)
PointD
operator-(PointD left, PointD right)
Performs vector subtraction, returning the result.
PointD Performs unary vector negation (i.e. the resulting point is of the same length but pointing in the opposite direction).

Instance properties

double Returns the theta (angle from the positive x-axis) of the vector represented by this PointD. (see also remarks)
doubleCalculates the length of this vector — or, equivalently, the distance between this point and the origin.
PointDReturns the unit vector in the same direction as this one.
PointDNegates the Y-coordinate, which reflects this point about the X-axis.
PointDNegates the X-coordinate, which reflects this point about the Y-axis.
doubleCalculates the squared distance between this point and the origin.

Instance fields

doubleX-co-ordinate of the point.
doubleY-co-ordinate of the point.