Programming Reference for VirtualLab Fusion
2025.1
|
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class for the base vectors of a Cartesian coordinate system. This kind of triple vector is also called "trihedron".
More...
Public Member Functions | |
override object | Clone () |
Deep copy. | |
CoordinateSystemBaseVectors () | |
Constructor that creates a system base object with the axes ((1,0,0), (0,1,0), (0,0,1)) | |
CoordinateSystemBaseVectors (CoordinateSystemBaseVectors sBaseVectors) | |
Copy constructor. | |
CoordinateSystemBaseVectors (double eulerPsi, double eulerTheta, double eulerPhi) | |
Constructor that uses Euler angles. See Bronstein et.al. "Taschenbuch der Mathematik" 2., überarb. und erw. Aufl.; Deutsch-Verlag, 1995; p.179-180. | |
CoordinateSystemBaseVectors (Matrix3x3D rotationMatrix) | |
Constructor that uses a rotation matrix for initializing the direction cosines. | |
CoordinateSystemBaseVectors (OrientationDefinitionBase orientationDefinition) | |
Constructor which gets an orientation definition. | |
CoordinateSystemBaseVectors (Quaternion quaternion) | |
Constructor which gets a quaternion. | |
CoordinateSystemBaseVectors (SerializationInfo info, StreamingContext context) | |
Deserialization constructor used for manual serialization. | |
CoordinateSystemBaseVectors (Vector3D axis1, Vector3D axis2, CoordinatePlane plane) | |
Constructor which gets only two base vectors. This may be helpful if one of the base vectors has already been created from a cross product, so creating the third base vector also by a cross product may produce large numerical problems. | |
CoordinateSystemBaseVectors (Vector3D directionOfZAxis, double zeta, bool inclinationFirst) | |
Constructs a new coordinate system base vectors object via z-rotation and the direction vector of the z-axis: The orientation of the system's axes result from 2 steps and a certain order . A) inclinationFirst = false: (i) Rotation about z-axis with angle zeta - using the right-hand-rule, (ii) Inclination of z-axis specified by new direction axis. B) inclinationFirst = true: (i) Inclination of z-axis specified by direction vector, (ii) Rotation about inclined z-axis by angle zeta - using the right-hand-rule. | |
CoordinateSystemBaseVectors (Vector3D xAxis, Vector3D yAxis, Vector3D zAxis) | |
Constructor that uses direction cosines. This constructor is not recommended, because there's a significant probability for numerical inaccuracies which cause orthogonality problems. Better options may be the constructors getting a OrientationDefinitionBase or getting two axes and a plane index. | |
bool | Equals (CoordinateSystemBaseVectors baseVectors, bool indulgentCheck) |
Method that checks whether another CoordinateSystemBaseVectors object is equivalent to this. | |
override bool | Equals (object obj, EqualityIntent equalityIntent) |
Method which checks for equal objects. | |
Matrix3x3D | GetInverseRotationMatrix () |
Get the corresponding rotation matrix build up from the direction cosines, i.e. the coordinates of the unit vectors of the three axes. If local and reference coordinate system have the same origin, a multiplication with this matrix would perform a coordinate transformation from the reference (external) cs to the local (internal) coordinate system. | |
OrientationDefinitionBase | GetOrientation (OrientationDefinitionType type) |
Get the orientation of this, described by an IOrientationDefinition object of a given type. As this method doesn't know whether the z-axis rotation shall be done first or last, it assumes the z-axis rotation has to be done at last. | |
AxisRotationSequence | GetOrientationByAxisRotationSequence () |
Get the orientation of this, described by a sequence of axis rotations. | |
OrientationByCartesianAngles | GetOrientationByCartesianAngles (bool cartesianAnglesApplicationBeforeZetaRotation) |
Get the orientation of this, described by the Cartesian angles of the z-axis and an additional rotation about the z-axis. As this method doesn't know whether the z-axis rotation shall be done first or last, it assumes the z-axis rotation has to be done at last. | |
OrientationByDirectionAngles | GetOrientationByDirectionAngles (bool directionAnglesApplicationBeforeZetaRotation) |
Get the orientation of this, described by the direction angles of the z-axis and an additional rotation about the z-axis. | |
OrientationByEulerAngles | GetOrientationByEulerAngles () |
Get the orientation of this coordinate system base expressed in Euler angles (Psi, Theta, Phi). For the definition of the Euler angles see Bronstein et.al. "Taschenbuch der Mathematik" 2., überarb. und erw. Aufl.; Deutsch-Verlag, 1995; p.179-180. | |
OrientationBySphereAngles | GetOrientationBySphereAngles (bool sphereAnglesApplicationBeforeZetaRotation) |
Get the orientation of this, described by the sphere angles of the z-axis and an additional rotation about the z-axis. | |
Matrix3x3D | GetRotationMatrix () |
Get the corresponding rotation matrix build up from the direction cosines, i.e. the coordinates of the unit vectors of the three axes. If local and reference coordinate system have the same origin, a multiplication with this matrix would perform a coordinate transformation from the local (internal) coordinate system to the reference (external) cs. | |
override string | ToString () |
Gives the axes of this base vectors object as one string. | |
Static Public Member Functions | |
static CoordinateSystemBaseVectors | GetDefinedSystemBaseForZVector (Vector3D zVector) |
Constructs a new system of base vectors from one vector serving as z-axis. The x-axis is defined as being the orthogonal projection of the reference system's x-axis onto the plane on which the given (z-)vector is orthogonal. | |
static bool | operator!= (CoordinateSystemBaseVectors bv1, CoordinateSystemBaseVectors bv2) |
Overloaded inequality operator. | |
static bool | operator== (CoordinateSystemBaseVectors bv1, CoordinateSystemBaseVectors bv2) |
Overloaded equality operator. | |
static Matrix3x3D | RotationMatrixForArbitraryAxis (Vector3D rotationAxis, double angle) |
Calculates the rotation matrix for a arbitrary rotation axis and a rotation angle (by using the right-hand-rule). If a coordinate system shall be rotated, the transposed matrix has to be used. Please note: Using the constructor of Quaternion with the same parameters could be a better choice regarding performance. | |
static Matrix3x3D | RotationMatrixForXAxis (double angle) |
Calculates the rotation matrix for a rotation about the x-axis. | |
static Matrix3x3D | RotationMatrixForYAxis (double angle) |
Calculates the rotation matrix for a rotation about the y-axis. | |
static Matrix3x3D | RotationMatrixForZAxis (double angle) |
Calculates the rotation matrix for a rotation about the z-axis. | |
Properties | |
Quaternion | Quaternion [get, set] |
Quaternion which represents the orientation of the base vectors in the reference coordinate system. | |
Vector3D | XAxis [get] |
Direction cosines of the x-Axis. | |
Vector3D | YAxis [get] |
Direction cosines of the y-Axis. | |
Vector3D | ZAxis [get] |
Direction cosines of the z-Axis. | |
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class for the base vectors of a Cartesian coordinate system. This kind of triple vector is also called "trihedron".
CoordinateSystemBaseVectors | ( | Quaternion | quaternion | ) |
Constructor which gets a quaternion.
quaternion |
CoordinateSystemBaseVectors | ( | Vector3D | xAxis, |
Vector3D | yAxis, | ||
Vector3D | zAxis | ||
) |
Constructor that uses direction cosines. This constructor is not recommended, because there's a significant probability for numerical inaccuracies which cause orthogonality problems. Better options may be the constructors getting a OrientationDefinitionBase or getting two axes and a plane index.
xAxis | Direction cosine of the x-axis. |
yAxis | Direction cosine of the y-axis. |
zAxis | Direction cosine of the z-axis. |
CoordinateSystemBaseVectors | ( | Vector3D | axis1, |
Vector3D | axis2, | ||
CoordinatePlane | plane | ||
) |
Constructor which gets only two base vectors. This may be helpful if one of the base vectors has already been created from a cross product, so creating the third base vector also by a cross product may produce large numerical problems.
axis1 | First base vector (meaning is set by planeIndex). |
axis2 | Second base vector (meaning is set by planeIndex). |
plane | Sets the meaning of axis1 and axis2 by defining which plane is spanned by the given axes. |
CoordinateSystemBaseVectors | ( | OrientationDefinitionBase | orientationDefinition | ) |
Constructor which gets an orientation definition.
orientationDefinition | Orientation definition to create a new CoordinateSystemBaseVectors object from. |
CoordinateSystemBaseVectors | ( | Matrix3x3D | rotationMatrix | ) |
Constructor that uses a rotation matrix for initializing the direction cosines.
rotationMatrix | Rotation matrix R (i.e. R orthogonal and det(R)=1) that describes the rotation of the axes of the reference coordinate system to this Also (another interpretation of R): R defines a coordinate transformation from the coordinate system spanned by this base vectors (coordinates x') to the reference coordinate system (coordinates x) by x = Rx' (and therefore x' = R^Tx) - where both systems have the same origin. |
CoordinateSystemBaseVectors | ( | double | eulerPsi, |
double | eulerTheta, | ||
double | eulerPhi | ||
) |
Constructor that uses Euler angles. See Bronstein et.al. "Taschenbuch der Mathematik" 2., überarb. und erw. Aufl.; Deutsch-Verlag, 1995; p.179-180.
eulerPsi | Angle Psi |
eulerTheta | Angle Theta |
eulerPhi | Angle Phi |
CoordinateSystemBaseVectors | ( | Vector3D | directionOfZAxis, |
double | zeta, | ||
bool | inclinationFirst | ||
) |
Constructs a new coordinate system base vectors object via z-rotation and the direction vector of the z-axis: The orientation of the system's axes result from 2 steps and a certain order . A) inclinationFirst = false: (i) Rotation about z-axis with angle zeta - using the right-hand-rule, (ii) Inclination of z-axis specified by new direction axis. B) inclinationFirst = true: (i) Inclination of z-axis specified by direction vector, (ii) Rotation about inclined z-axis by angle zeta - using the right-hand-rule.
zeta | Angle (radian) of rotation about z-axis by using the right-hand-rule. |
directionOfZAxis | Direction vector of new z-axis |
inclinationFirst | Flag to signal if z-axis is inclined first (true) or after rotation of z-axis (false). |
CoordinateSystemBaseVectors | ( | CoordinateSystemBaseVectors | sBaseVectors | ) |
Copy constructor.
sBaseVectors | SystemBaseVectors to copy |
CoordinateSystemBaseVectors | ( | SerializationInfo | info, |
StreamingContext | context | ||
) |
Deserialization constructor used for manual serialization.
info | the info object used for deserialization |
context | the streaming context |
override object Clone | ( | ) |
Deep copy.
bool Equals | ( | CoordinateSystemBaseVectors | baseVectors, |
bool | indulgentCheck | ||
) |
Method that checks whether another CoordinateSystemBaseVectors object is equivalent to this.
baseVectors | CoordinateSystemBaseVectors object to check |
indulgentCheck | Flag that indicates whether an indulgent check is to be done (like in NumericalChecks) or if an exact check has to be done. |
override bool Equals | ( | object | obj, |
EqualityIntent | equalityIntent | ||
) |
Method which checks for equal objects.
obj | The System.Object to compare with this instance. |
equalityIntent | The equality intent. |
true
if the specified System.Object is equal to this instance; otherwise, false
.
|
static |
Constructs a new system of base vectors from one vector serving as z-axis. The x-axis is defined as being the orthogonal projection of the reference system's x-axis onto the plane on which the given (z-)vector is orthogonal.
zVector | Vector to create a system of base vectors from. |
Matrix3x3D GetInverseRotationMatrix | ( | ) |
Get the corresponding rotation matrix build up from the direction cosines, i.e. the coordinates of the unit vectors of the three axes. If local and reference coordinate system have the same origin, a multiplication with this matrix would perform a coordinate transformation from the reference (external) cs to the local (internal) coordinate system.
OrientationDefinitionBase GetOrientation | ( | OrientationDefinitionType | type | ) |
Get the orientation of this, described by an IOrientationDefinition object of a given type. As this method doesn't know whether the z-axis rotation shall be done first or last, it assumes the z-axis rotation has to be done at last.
type | Type of the IOrientationDefinition object to give. |
AxisRotationSequence GetOrientationByAxisRotationSequence | ( | ) |
Get the orientation of this, described by a sequence of axis rotations.
OrientationByCartesianAngles GetOrientationByCartesianAngles | ( | bool | cartesianAnglesApplicationBeforeZetaRotation | ) |
Get the orientation of this, described by the Cartesian angles of the z-axis and an additional rotation about the z-axis. As this method doesn't know whether the z-axis rotation shall be done first or last, it assumes the z-axis rotation has to be done at last.
cartesianAnglesApplicationBeforeZetaRotation | If set to true the Cartesian angles are applied before an eventual zeta rotation. |
OrientationByDirectionAngles GetOrientationByDirectionAngles | ( | bool | directionAnglesApplicationBeforeZetaRotation | ) |
Get the orientation of this, described by the direction angles of the z-axis and an additional rotation about the z-axis.
directionAnglesApplicationBeforeZetaRotation | if set to true the direction angles are applied before an eventual zeta rotation. |
OrientationByEulerAngles GetOrientationByEulerAngles | ( | ) |
Get the orientation of this coordinate system base expressed in Euler angles (Psi, Theta, Phi). For the definition of the Euler angles see Bronstein et.al. "Taschenbuch der Mathematik" 2., überarb. und erw. Aufl.; Deutsch-Verlag, 1995; p.179-180.
OrientationBySphereAngles GetOrientationBySphereAngles | ( | bool | sphereAnglesApplicationBeforeZetaRotation | ) |
Get the orientation of this, described by the sphere angles of the z-axis and an additional rotation about the z-axis.
sphereAnglesApplicationBeforeZetaRotation | If set to true the sphere angles are applied before an eventual zeta rotation. |
Matrix3x3D GetRotationMatrix | ( | ) |
Get the corresponding rotation matrix build up from the direction cosines, i.e. the coordinates of the unit vectors of the three axes. If local and reference coordinate system have the same origin, a multiplication with this matrix would perform a coordinate transformation from the local (internal) coordinate system to the reference (external) cs.
|
static |
Overloaded inequality operator.
bv1 | First SystemBaseVectors object to compare |
bv2 | Second SystemBaseVectors object to compare |
|
static |
Overloaded equality operator.
bv1 | First SystemBaseVectors object to compare |
bv2 | Second SystemBaseVectors object to compare |
|
static |
Calculates the rotation matrix for a arbitrary rotation axis and a rotation angle (by using the right-hand-rule). If a coordinate system shall be rotated, the transposed matrix has to be used. Please note: Using the constructor of Quaternion with the same parameters could be a better choice regarding performance.
rotationAxis | Rotation axis (unit vector) |
angle | Rotation angle. |
|
static |
Calculates the rotation matrix for a rotation about the x-axis.
angle | Rotation angle |
|
static |
Calculates the rotation matrix for a rotation about the y-axis.
angle | Rotation angle |
|
static |
Calculates the rotation matrix for a rotation about the z-axis.
angle | Rotation angle |
override string ToString | ( | ) |
Gives the axes of this base vectors object as one string.