public struct Locus
Represents an immutable 3D vector or point.

Constructors

Locus

#
public Locus(double x, double y, double z = 0)
Create a new vector.
x (double)X component.
y (double)Y component.
z (double = 0)Z component.

Locus

#
public Locus(Point3d point)
Create a new spatial vector from a rhinocommon point.
point (Point3d)Point.

Properties

Infinite

#
public static Locus Infinite { get; }
Gets the infinite vector.

IsInfinite

#
public bool IsInfinite { get; }
Gets whether this vector is infinite.

IsUnset

#
public bool IsUnset { get; }
Gets whether this vector is unset.

IsZero

#
public bool IsZero { get; }
Gets whether this vector contains only zeroes.

Length

#
public double Length { get; }
Gets the length of this vector.

Norm

#
public double Norm { get; }
Gets the norm of this vector. The norm equals the length squared.

UnitX

#
public static Locus UnitX { get; }
Get the unit vector in the X direction.

UnitY

#
public static Locus UnitY { get; }
Get the unit vector in the Y direction.

UnitZ

#
public static Locus UnitZ { get; }
Get the unit vector in the Z direction.

Unset

#
public static Locus Unset { get; }
Gets the unset vector.

X

#
public double X { get; }
Gets the x-component.

Y

#
public double Y { get; }
Gets the y-component.

Z

#
public double Z { get; }
Gets the z-component.

Zero

#
public static Locus Zero { get; }
Get the zero vector.

Methods

AngleTo

#
public double AngleTo(Locus other)
Compute the angle between two vectors.
other (Locus)Other vector.
Angle (in radians).

DistanceTo

#
public double DistanceTo(Locus other)
Compute the distance between two vectors.
other (Locus)Other vector.
Distance

Normalise

#
public Locus Normalise()
Normalise this vector.
Normalised vector.

QuadranceTo

#
public double QuadranceTo(Locus other)
Compute the quadrance between two vectors.
other (Locus)Other vector.
Quadrance.

To2D

#
public Locus To2D()
Flatten this vector by removing all z data.

ToPointF

#
public PointF ToPointF()
Convert the x and y coordinates into a PointF structure.
PointF.

ToString

#
public override string ToString()
Returns the fully qualified type name of this instance.
A String containing a fully qualified type name.

Operators

OperationResultDescription
Locus+LocusLocusAdd two vectors.
Locus/doubleLocusDivide a vector by a scalar.
Locus^LocusLocusCompute the cross product between two vectors.
Locus*LocusdoubleCompute the dot product of two vectors.
double*LocusLocusMultiply a vector and a scalar.
Locus*doubleLocusMultiply a vector and a scalar.
Locus-LocusLocusSubtract two vectors.
-LocusLocusNegate a vector.

Convertors

OperationResultDescription
implicitPoint3dLocusConversion from Point3d.
implicitVector3dLocusConversion from Vector3d.
implicitLocusPoint3dConversion to Point3d.
implicitLocusVector3dConversion to Vector3d.