Struct GeoVector3
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
Represents a 3D vector with double precision components.
public readonly struct GeoVector3 : IEquatable<GeoVector3>
- Implements
- Inherited Members
- Extension Methods
Constructors
- GeoVector3(GeoVector3)
Initializes a new vector from another vector.
- GeoVector3(double, double, double)
Initializes a new vector.
Properties
- IsValid
Gets whether this is a shape a constructor could have made: every component is a finite number.
- Length
Gets the magnitude (length) of the vector.
- LengthSquared
Gets the squared magnitude of the vector.
- X
Gets the X component of the vector.
- XAxis
Gets the X unit vector (1, 0, 0).
- Y
Gets the Y component of the vector.
- YAxis
Gets the Y unit vector (0, 1, 0).
- Z
Gets the Z component of the vector.
- ZAxis
Gets the Z unit vector (0, 0, 1).
- Zero
Gets a vector with all components set to zero.
Methods
- Add(GeoVector3)
Adds another vector to this vector.
- Clone()
Creates a copy of this vector.
- CrossProduct(GeoVector3)
Calculates the cross product of this vector and another vector.
- Divide(double)
Divides the vector by a scalar.
- DotProduct(GeoVector3)
Calculates the dot product of this vector and another vector.
- Equals(GeoVector3)
Determines whether the specified vector has exactly the same components as this vector.
- Equals(object)
Determines whether the specified object is equal to the current vector.
- GetAngleTo(GeoVector3)
Gets the unsigned angle to another vector in radians, in the range [0, PI].
- GetHashCode()
Returns the hash code for this instance.
- GetPerpendicularVector()
Gets an arbitrary unit vector perpendicular to this one.
- GetSignedAngleTo(GeoVector3, GeoVector3)
Gets the signed angle to another vector in radians, in the range (-PI, PI], measured counter-clockwise around a reference axis.
- IsCodirectionalTo(GeoVector3)
Checks whether this vector points the same way as another vector using the default tolerance.
- IsCodirectionalTo(GeoVector3, Tolerance)
Checks whether this vector points the same way as another vector within tolerance.
- IsCoplanarWith(GeoVector3, GeoVector3)
Checks whether this vector lies in the plane spanned by two other vectors, using the default tolerance.
- IsCoplanarWith(GeoVector3, GeoVector3, Tolerance)
Checks whether this vector lies in the plane spanned by two other vectors, within tolerance.
- IsEqualTo(GeoVector3)
Compares whether this vector equals another vector using the default tolerance.
- IsEqualTo(GeoVector3, Tolerance)
Compares whether this vector equals another vector within a tolerance.
- IsParallelTo(GeoVector3)
Checks whether this vector is parallel or anti-parallel to another vector using the default tolerance.
- IsParallelTo(GeoVector3, Tolerance)
Checks whether this vector is parallel or anti-parallel to another vector within tolerance.
- IsPerpendicularTo(GeoVector3)
Checks whether this vector is perpendicular to another vector using the default tolerance.
- IsPerpendicularTo(GeoVector3, Tolerance)
Checks whether this vector is perpendicular to another vector within tolerance.
- IsUnitLength()
Checks whether the vector has unit length using the default tolerance.
- IsUnitLength(Tolerance)
Checks whether the vector has unit length within a tolerance.
- IsZeroLength()
Checks whether the vector has zero length using the default tolerance.
- IsZeroLength(Tolerance)
Checks whether the vector has zero length within a tolerance.
- Multiply(double)
Multiplies the vector by a scalar.
- Negate()
Gets the vector pointing in the opposite direction.
- Normalize()
Returns a normalized (unit length) copy of this vector.
- ProjectOnto(GeoVector3)
Projects this vector onto an axis vector.
- ProjectOntoPlane(GeoVector3)
Projects this vector onto a plane through the origin with the given normal.
- ProjectToVector2(GeoCoordinateSystem3)
Lays this vector out in a frame, dropping the part square to the plane of that frame.
- RotateBy(double, GeoVector3)
Rotates this vector around an axis through the origin.
- Subtract(GeoVector3)
Subtracts another vector from this vector.
- ToString()
Returns a string that represents the current vector.
- TransformBy(GeoTransform3)
Applies a transformation to this vector.
- TripleProduct(GeoVector3, GeoVector3)
Calculates the scalar triple product of this vector with two others, that is
this · (v1 × v2).
- TryGetNormal(out GeoVector3)
Tries to normalize the vector without throwing, using the default tolerance.
- TryGetNormal(out GeoVector3, Tolerance)
Tries to normalize the vector without throwing, within a tolerance.
Operators
- operator +(GeoVector3, GeoVector3)
Adds two vectors.
- operator /(GeoVector3, double)
Divides a vector by a scalar.
- operator ==(GeoVector3, GeoVector3)
Checks if two vectors have exactly the same components.
- operator !=(GeoVector3, GeoVector3)
Checks if two vectors differ in any component.
- operator *(GeoVector3, double)
Multiplies a vector by a scalar.
- operator *(double, GeoVector3)
Multiplies a vector by a scalar.
- operator -(GeoVector3, GeoVector3)
Subtracts one vector from another.
- operator -(GeoVector3)
Negates a vector.