Vector3D Class

3D Vector definition.
Public Class Vector3D 
Inherits Vector2D
This language is not supported or no code example is available.
public class Vector3D : Vector2D
This language is not supported or no code example is available.
Name Description
Protected constructor Vector3D(Vector3D)
Public constructor Vector3D() Empty constructor.
Public constructor Vector3D(Point3D, Point3D) Two 3D points constructor. A 3D vector with direction from P0 to P1.
Public constructor Vector3D(Point3D, Point3D, Point3D) Three 3D points constructor. A 3D vector perpendicular to a plane defined by 3 points.
Public constructor Vector3D(double, double) 2D constructor.
Public constructor Vector3D(double, double, double) 3D constructor.
Public constructor Vector3D(double[]) Double array constructor.
Top
Name Description
Public property Angle Gets the angle between the X-axis and the 2D vector. (inherited from Vector2D).
Public property AngleFromXY Gets the angle between the vector and the XY plane.
Public property AngleInXY Gets the angle between the X-axis and the vector projection on the XY plane.
Public property AsPoint
Public property Static AxisMinusX Returns the -X axis vector.
Public property Static AxisMinusY Returns the -Y axis vector.
Public property Static AxisMinusZ Returns the -Z axis vector.
Public property Static AxisX Returns the +X axis vector.
Public property Static AxisY Returns the +Y axis vector.
Public property Static AxisZ Returns the +Z axis vector.
Public property IsUnit True if the vector has length equal to one.
Public property IsZero True if the vector has length equal to zero.
Public property Item(int)
Public property Length Gets or sets the 3D vector length.
Public property LengthSquared Gets or sets the vector length.
Public property MaximumCoordinate Gets the absolute value of the maximum coordinate.
Top
Methods
 
Name Description
Public method Static Add(Point3D, Point3D) Addition between two 3D points.
Public method Static AngleBetween(Vector3D, Vector3D) Computes the angle between two vectors.
Public method Static AreCoincident(Vector3D, Vector3D) Returns true if the angle between the two 3D vectors is zero.
Public method Static AreCoincident(Vector3D, Vector3D, double) Returns true if the angle between the two 3D vectors is zero or almost zero.
Public method Static AreOpposite(Vector3D, Vector3D) Returns true if the angle between the two 3D vectors is PI.
Public method Static AreOpposite(Vector3D, Vector3D, double) Returns true if the angle between the two 3D vectors is PI or almost PI.
Public method Static AreOrthogonal(Vector3D, Vector3D) Returns true if the angle between the two 3D vectors is PI/2.
Public method Static AreOrthogonal(Vector3D, Vector3D, double) Returns true if the angle between the two 3D vectors is PI/2 or almost PI/2.
Public method Static AreParallel(Vector3D, Vector3D) Returns true if the angle between the two 3D vectors is 0 or PI.
Public method Static AreParallel(Vector3D, Vector3D, double) Returns true if the angle between the two 3D vectors is zero or PI or almost zero or almost PI.
Public method Clone() Creates a deep copy of this 3D vector.
Public method ConvertToSurrogate()
Public method ConvertToSurrogate_V6()
Public method Static Cross(Point3D, Point3D) Cross product between two 3D points.
Public method Static Cross(Vector3D, Vector3D) Cross product between two 3D vectors.
Public method Static Dot(Point3D, Vector3D) Dot product between a 3D point and a 3D vector.
Public method Static Dot(Vector3D, Vector3D) Dot product between two 3D vectors.
Public method Static Dot(Vector3D, Point3D) Dot product between a 3D vector and a 3D point.
Public method Equals(Vector3D)
Public method Equals(object) Determines whether the specified object is equal to the current object.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (inherited from Object).
Public method GetHashCode() Serves as the default hash function.
Public method GetType Gets the Type of the current instance. (inherited from Object).
Public method GetXElement()
Public method IsValid() Returns true if the vector's coordinates are reasonable values.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object).
Public method Negate() Reverses the 3D vector direction.
Public method Normalize() Resizes the 3D vector to unit length.
Public method Static PerpDotProduct(Vector2D, Vector2D) Perpendicular dot product. (inherited from Vector2D).
Public method PerpendicularTo(Vector3D) Sets this vector to be perpendicular to another vector. The result is not normalized.
Public method Static ReadXml(XmlNode)
Public method Static ReadXml(string)
Public method Reverse() Inverts the 2D vector direction. (inherited from Vector2D).
Public method Static SignedAngleBetween(Vector2D, Vector2D) Computes the angle between two 2D vectors. (inherited from Vector2D).
Public method Static Subtract(Point3D, Point3D) Subtraction between two 3D points.
Public method ToArray() Returns an array of vector's coordinates.
Public method ToString() Converts this 3D vector to a human readable string.
Public method ToStringXml() Converts this 3D vector to a human readable string.
Public method TransformBy(Transformation) Transforms the 3D vector by the specified transformation.
Public method WriteAsFloat(BinaryWriter)
Public method WriteXml(XmlTextWriter)
Public method Zero() Sets all the vector components to zero.
Top
Name Description
Operator Static Addition Addition between two 3D vectors.
Operator Static Division Division between a 3D vector and a scalar s.
Operator Static Equality
Operator Static Inequality
Operator Static Multiply Multiplication between a 3D vector and a scalar s.
Operator Static Multiply Multiplication between a scalar value and a 3D vector.
Operator Static Multiply Dot product between two 3D vectors.
Operator Static Subtraction Subtraction between two vectors.
Top
Name Description
Public extension method DrawGL(this Point2D) Calls glVertex2d(X, Y) (Defined by ExtensionMethodsGL).
Public extension method DrawGL(this Point3D) Calls glVertex3d(X, Y, Z). (Defined by ExtensionMethodsGL).
Public extension method DrawGL(this PointNormalUv) Calls glNormal3d(Nx, Ny, Nz) and glVertex3d(X, Y, Z) (Defined by ExtensionMethodsGL).
Public extension method DrawGL(this PointNormalUv, Color[]) For internal use only. (Defined by ExtensionMethodsGL).
Public extension method DrawGL(this PointRGB) Calls gl.Color3ub(R, G, B) and glVertex3d(X, Y, Z). (Defined by ExtensionMethodsGL).
Public extension method DrawGL(this PointWithDisplacement, double) Calls gl.Vertex3d(X+UX, Y+UY, Z+UZ). (Defined by ExtensionMethodsGL).
Public extension method DrawGL(this Vector3D) Calls gl.Normal3d(X, Y, Z) (Defined by ExtensionMethodsGL).
Top
Fields
 
Name Description
Public field X X coordinate value. (inherited from Vector2D).
Public field Y Y coordinate value. (inherited from Vector2D).
Public field Z
Top

.NET Framework

Supported in: 4.8

In this article

Definition