Vector3D Class

3D Vector definition.
Public Class Vector3D 
Inherits Point3D
This language is not supported or no code example is available.
public class Vector3D : Point3D
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 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 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) (inherited from Point3D).
Public property Length Gets or sets the 3D vector length.
Public property LengthSquared Gets or sets the vector length.
Public property Static MaxValue Returns a 3D point with coordinates at double.MaxValue. (inherited from Point3D).
Public property MaximumCoordinate Gets the absolute value of maximum coordinate. (inherited from Point3D).
Public property Static MinValue Returns a 3D point with coordinates at double.MinValue. (inherited from Point3D).
Public property Static Origin Returns the (0,0,0) point. (inherited from Point3D).
Public property X X coordinate value. (inherited from Point2D).
Public property Y Y coordinate value. (inherited from Point2D).
Public property Z Z coordinate value. (inherited from Point3D).
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 AreEqual(Point2D, Point2D, double) Compares two 2D points in the given domain. (inherited from Point2D).
Public method Static AreEqual(Point3D, Point3D, double) Compares two 3D points in the given domain.
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 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 Distance(Point2D, Point2D) Computes the distance between two 2D points. (inherited from Point2D).
Public method Static Distance(Point3D, Point3D) Computes the distance between two 3D points.
Public method Static DistanceSquared(Point2D, Point2D) Computes the squared distance between two 2D points. (inherited from Point2D).
Public method Static DistanceSquared(Point3D, Point3D) Computes the squared distance between two 3D points.
Public method DistanceTo(Plane) Computes the point to plane signed distance.
Public method DistanceTo(Point2D) Computes the distance to 2D point b. (inherited from Point2D).
Public method DistanceTo(Point3D) Computes the distance to 3D point b.
Public method DistanceTo(Segment2D) Computes the point-line distance. (inherited from Point2D).
Public method DistanceTo(Segment3D) Computes the point-line distance.
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(Point2D) (inherited from Point2D).
Public method Equals(Point3D)
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. (inherited from Point3D).
Public method GetType Gets the Type of the current instance. (inherited from Object).
Public method GetXElement()
Public method IsInside(Point3D, Point3D) Checks if the point is inside the specified volume. (inherited from Point3D).
Public method IsValid() Returns true if the point's coordinates are resonable values. (inherited from Point3D).
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 PerpendicularTo(Vector3D) Sets this vector to be perpendicular to another vector. The result is not normalized.
Public method ProjectTo(Segment2D) Project this point onto a 2D segment. (inherited from Point2D).
Public method ProjectTo(Segment3D) Project this point onto a 3D segment.
Public method Static ReadXml(XmlNode)
Public method Static ReadXml(string)
Public method Static Subtract(Point3D, Point3D) Subtraction between two 3D points.
Public method ToArray() Returns an array of point's coordinates. (inherited from Point3D).
Public method ToString() Converts this 3D vector to a human readable string.
Public method ToStringXml() Converts this 3D point to a human readable string. (inherited from Point3D).
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 2D points. (inherited from Point2D).
Operator Static Addition Addition between two 3D points. (inherited from Point3D).
Operator Static Addition Addition between a 3D point and a 3D vector. (inherited from Point3D).
Operator Static Addition Addition between two 3D vectors.
Operator Static Division Division between a 2D point and a scalar value. (inherited from Point2D).
Operator Static Division Division between a 3D point and a scalar s. (inherited from Point3D).
Operator Static Division Division between a 3D vector and a scalar s.
Operator Static Equality (inherited from Point2D).
Operator Static Equality
Operator Static Inequality (inherited from Point2D).
Operator Static Inequality
Operator Static Multiply Product between a 2D point and a scalar value. (inherited from Point2D).
Operator Static Multiply Product between a scalar value and a 2D point. (inherited from Point2D).
Operator Static Multiply Product between a 3D point and a scalar s. (inherited from Point3D).
Operator Static Multiply Product between a 3D point and a scalar s. (inherited from Point3D).
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 2D points. (inherited from Point2D).
Operator Static Subtraction Subtraction between two 3D points. (inherited from Point3D).
Operator Static Subtraction Subtraction between a 3D point and a 3D vector. (inherited from Point3D).
Operator Static Subtraction Subtraction between two vectors.
Top

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition