|
Programming Reference for VirtualLab Fusion
2022.1
|
This struct defines a three dimensional vector of double numbers. Operators \(a+b\), \(a-b\) and \(a|b\) (Scalar product) can be used. Second operand on \(a*b\), \(a/b\) and \(a^b\) (applied separate on components) can be a double too. More...
Public Member Functions | |
| double | Abs () |
| Calculates the absolute value of this Vector3D object. The absolute value corresponds to the length of the vector. More... | |
| DirectionDefinitionBase | GetDirection (DirectionDefinitionType type) |
| Get the direction of this, described by a DirectionDefinition of a given type. More... | |
| bool | IsZeroVector () |
| Checks if the vector is the zero vector within a certain epsilon. More... | |
| double | Norm () |
| Calculates the squared absolute value of this Vector3D object. More... | |
| void | Normalize () |
| Normalizes the present Vector3D object. More... | |
| Vector3D | Rotate (Vector3D axis, double angle) |
| rotate function for the vector 3D More... | |
| override string | ToString () |
| Converts a Vector3D into a string of format (X; Y ;Z). For the creation of the string the default number of digits specified in Globals.DefaultDigitPrecision will be used. More... | |
| string | ToString (int digitPrecision) |
| Converts a Vector3D into a string of format (X, Y, Z). More... | |
| Vector3D (double alpha, double beta, double length, bool useDirectionAngles) | |
| Creates a Vector3D using given angles and length. More... | |
| Vector3D (double x, double y, double z) | |
| Creates a Vector3D from three double values. More... | |
| Vector3D (Vector3D toCopy) | |
| Creates a copy of the referenced Vector3D More... | |
Static Public Member Functions | |
| static double | AngleBetweenVectors (Vector3D vector1, Vector3D vector2) |
| Calculates the angle between two between vectors. More... | |
| static bool | ArePointsCollinear (Vector3D p1, Vector3D p2, Vector3D p3) |
| Static method to check if three 3D-points lie on a line (i. e. being collinear). More... | |
| static bool | AreVectorsCollinear (Vector3D v1, Vector3D v2) |
| Static method to check (with numerical tolerance) whether two vectors are parallel or anti-parallel. More... | |
| static Vector3D | CrossProduct (Vector3D a, Vector3D b) |
| Calculates the cross product of two Vector3D objects. More... | |
| static | operator devDept.Geometry.Vector3D (Vector3D vector) |
| Converts a Vector3D object to a Vector3D object (from eyeshot). More... | |
| static | operator Point3D (Vector3D point) |
| Converts a Vector3D object to a Point3D object (from eyeshot). More... | |
| static | operator Vector3D (Color color) |
| Explicit conversion of a System.Drawing.Color object into a Vector3D object. More... | |
| static | operator Vector3D (Point3D point) |
| Converts a Point3D object (from eyeshot) to a Vector3D object. More... | |
| static bool | operator!= (Vector3D vector1, Vector3D vector2) |
| Compares two Vector3D for inequality. The comparison will be done by comparing the values of the x-, y- and z- components respectively. More... | |
| static Vector3D | operator* (double factor, Vector3D vector) |
| Multiplies a Vector3D objects by a double value. More... | |
| static Vector3D | operator* (Vector3D a, Vector3D b) |
| Multiplies two Vector3D objects. More... | |
| static Vector3C | operator* (Vector3D vector, Complex factor) |
| Multiplies a Vector3C objects by a Complex value. More... | |
| static Vector3D | operator* (Vector3D vector, double factor) |
| Multiplies a Vector3D objects by a double value. More... | |
| static Vector3D | operator+ (Vector3D a, Vector3D b) |
| Adds two Vector3D objects. More... | |
| static Vector3D | operator- (Vector3D a, Vector3D b) |
| Subtracts two Vector3D objects. More... | |
| static Vector3D | operator- (Vector3D v) |
| Inverts a Vector3D object. More... | |
| static Vector3D | operator/ (double number, Vector3D vector) |
| Performs a component wise division of a double value and a Vector3D object. The result is defined as new VectorD(number / vector.X, number / vector.Y). More... | |
| static Vector3D | operator/ (Vector3D a, Vector3D b) |
| Performs a component wise division of two Vector3D objects. More... | |
| static Vector3D | operator/ (Vector3D vector, double divisor) |
| Performs a component wise division of a Vector3D object and a double value. More... | |
| static bool | operator== (Vector3D vector1, Vector3D vector2) |
| Compares two Vector3D for equality. The comparison will be done by comparing the values of the x-, y- and z- components respectively. More... | |
| static double | operator| (Vector3D a, Vector3D b) |
| Calculates the scalar product of two Vector3D objects. More... | |
| static Vector3D | Parse (string vector3DAsString) |
| public support function to parse a vector 3D from given string More... | |
Public Attributes | |
| double | X |
| X-value of the Vector3D object. | |
| double | Y |
| Y-value of the Vector3D object. | |
| double | Z |
| Z-value of the Vector3D object. | |
Static Public Attributes | |
| static readonly Vector3D | NegUnitVectorZ |
| A constant containing the unit vector in negative z-direction. | |
| static readonly Vector3D | UndefinedVector |
| A constant vector containing 3 Double.NaNs. Property IsUndefined can be used to check for being undefined. | |
| static readonly Vector3D | UndeterminedVector |
| A constant containing an undetermined vector. | |
| static readonly Vector3D | UnitVectorX |
| A constant containing the unit vector in x-direction. | |
| static readonly Vector3D | UnitVectorY |
| A constant containing the unit vector in y-direction. | |
| static readonly Vector3D | UnitVectorZ |
| A constant containing the unit vector in z-direction. | |
| static readonly Vector3D | ZeroVector |
| A constant containing the zero vector (0, 0, 0). | |
Properties | |
| bool | IsUndefined [get] |
| Gets whether a least one component of the vector is undefined. More... | |
This struct defines a three dimensional vector of double numbers. Operators \(a+b\), \(a-b\) and \(a|b\) (Scalar product) can be used. Second operand on \(a*b\), \(a/b\) and \(a^b\) (applied separate on components) can be a double too.
| Vector3D | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
| Vector3D | ( | double | alpha, |
| double | beta, | ||
| double | length, | ||
| bool | useDirectionAngles | ||
| ) |
Creates a Vector3D using given angles and length.
| alpha | First angle; interpretation depends on useDirectionAngles. |
| beta | Second angle; interpretation depends on useDirectionAngles. |
| length | Length of new Vector3D. |
| useDirectionAngles | Parameters can be interpreted in two different ways: true \(\rightarrow\) Cartesian angles; false \(\rightarrow\) Sphere Angles. |
| double Abs | ( | ) |
Calculates the angle between two between vectors.
| vector1 | The first vector. |
| vector2 | The second vector. |
Static method to check if three 3D-points lie on a line (i. e. being collinear).
| p1 | 3D point 1. |
| p2 | 3D point 2. |
| p3 | 3D point 3. |
Static method to check (with numerical tolerance) whether two vectors are parallel or anti-parallel.
| v1 | First vector |
| v2 | Second vector |
| DirectionDefinitionBase GetDirection | ( | DirectionDefinitionType | type | ) |
Get the direction of this, described by a DirectionDefinition of a given type.
| type | Type of the DirectionDefinition. |
| bool IsZeroVector | ( | ) |
Checks if the vector is the zero vector within a certain epsilon.
| double Norm | ( | ) |
| void Normalize | ( | ) |
|
explicitstatic |
|
explicitstatic |
|
explicitstatic |
|
explicitstatic |
Performs a component wise division of a double value and a Vector3D object. The result is defined as new VectorD(number / vector.X, number / vector.Y).
| number | The double value to divide by the components of the Vector3D object. |
| vector | The Vector3D object used as divisor. |
|
static |
public support function to parse a vector 3D from given string
| vector3DAsString | the string that should be parsed |
rotate function for the vector 3D
| axis | the axis that shall be used for rotation |
| angle | the angle used for rotation |
| override string ToString | ( | ) |
Converts a Vector3D into a string of format (X; Y ;Z). For the creation of the string the default number of digits specified in Globals.DefaultDigitPrecision will be used.
| string ToString | ( | int | digitPrecision | ) |
Converts a Vector3D into a string of format (X, Y, Z).
| digitPrecision | Number of digits the values are rounded to. |
|
get |
Gets whether a least one component of the vector is undefined.
true iff at least one component of the vector is NaN.