Programming Reference for VirtualLab™  5.4
Public Member Functions | Static Public Member Functions | Properties | List of all members
CartesianCoordinateSystem.SystemBaseVectors Class Reference

Public Member Functions

object Clone ()
 
void GetCartesianAngles (out double cartesianAlpha, out double cartesianBeta)
 
void GetDirectionAngles (out double directionAlpha, out double directionBeta, out double directionGamma)
 
EulerAnglesSet GetEulerAngles ()
 
void GetEulerAngles (out double psi, out double theta, out double phi)
 
Matrix3x3D GetInverseRotationMatrix ()
 
IOrientationDefinition GetOrientation (OrientationDefinitionType type)
 
IOrientationDefinition GetOrientation (OrientationDefinitionType type, double zeta, bool cartesianAnglesApplicationBeforeZetaRotation)
 
AxisRotationSequence GetOrientationByAxisRotationSequence ()
 
OrientationByCartesianAngles GetOrientationByCartesianAngles (double zeta, bool cartesianAnglesApplicationBeforeZetaRotation)
 
OrientationByCartesianAngles GetOrientationByCartesianAngles ()
 
OrientationByDirectionAngles GetOrientationByDirectionAngles (double zeta, bool cartesianAnglesApplicationBeforeZetaRotation)
 
OrientationByDirectionAngles GetOrientationByDirectionAngles ()
 
OrientationByEulerAngles GetOrientationByEulerAngles ()
 
OrientationBySphereAngles GetOrientationBySphereAngles (double zeta, bool cartesianAnglesApplicationBeforeZetaRotation)
 
OrientationBySphereAngles GetOrientationBySphereAngles ()
 
Matrix3x3D GetRotationMatrix ()
 
void GetSphereAngles (out double spherePhi, out double sphereTheta)
 
 SystemBaseVectors ()
 
 SystemBaseVectors (Vector3D xAxis, Vector3D yAxis, Vector3D zAxis)
 
 SystemBaseVectors (Matrix3x3D rotationMatrix)
 
 SystemBaseVectors (double eulerPsi, double eulerTheta, double eulerPhi)
 
 SystemBaseVectors (EulerAnglesSet eulerAngles)
 
 SystemBaseVectors (SystemBaseVectors sBaseVectors)
 

Static Public Member Functions

static SystemBaseVectors GetArbitrarySystemBaseForOneZVector (Vector3D zVector)
 
static Matrix3x3D GetInverseRotationMatrixFromEulerAngles (double eulerPsi, double eulerTheta, double eulerPhi)
 
static Matrix3x3D GetInverseRotationMatrixFromEulerAngles (EulerAnglesSet eulerAngles)
 
static Matrix3x3D GetRotationMatrixFromEulerAngles (double eulerPsi, double eulerTheta, double eulerPhi)
 
static Matrix3x3D GetRotationMatrixFromEulerAngles (EulerAnglesSet eulerAngles)
 
static bool operator!= (SystemBaseVectors bv1, SystemBaseVectors bv2)
 
static bool operator== (SystemBaseVectors bv1, SystemBaseVectors bv2)
 

Properties

Vector3D XAxis [get]
 
Vector3D YAxis [get]
 
Vector3D ZAxis [get]
 

Detailed Description

Constructor & Destructor Documentation

Constructor that creates a system base object with the axes ((1,0,0), (0,1,0), (0,0,1))

SystemBaseVectors ( Vector3D  xAxis,
Vector3D  yAxis,
Vector3D  zAxis 
)

Constructor that uses direction cosines.

Parameters
xAxisDirection cosine of the x-axis.
yAxisDirection cosine of the y-axis.
zAxisDirection cosine of the z-axis.
SystemBaseVectors ( Matrix3x3D  rotationMatrix)

Constructor that uses a rotation matrix for initializing the direction cosines.

Parameters
rotationMatrixRotation 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.
SystemBaseVectors ( 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.

Parameters
eulerPsiAngle Psi
eulerThetaAngle Theta
eulerPhiAngle Phi
SystemBaseVectors ( EulerAnglesSet  eulerAngles)

Constructor that uses Euler angles. See Bronstein et.al. "Taschenbuch der Mathematik" 2., überarb. und erw. Aufl.; Deutsch-Verlag, 1995; p.179-180.

Parameters
eulerPsiAngle Psi
eulerThetaAngle Theta
eulerPhiAngle Phi

Copy constructor

Parameters
sBaseVectorsSystemBaseVectors to copy

Member Function Documentation

object Clone ( )

Deep copy

Returns
Copy of this
static SystemBaseVectors GetArbitrarySystemBaseForOneZVector ( Vector3D  zVector)
static

Constructs an arbitrary right-handed coordinate system base that can be used for transformations where only the z vector is known and where the other two vectors do not matter

Parameters
zVectorz vector to create a system base for
Returns
An arbitrary right-handed coordinate system base with zVector as z vector
void GetCartesianAngles ( out double  cartesianAlpha,
out double  cartesianBeta 
)

Gets the Cartesian angles alpha and beta that describe the direction of this.ZAxis.

Parameters
cartesianAlphaangle between the projection of this.ZAxis onto the x-z-plane and the z-axis of the reference CS.
cartesianBetaangle between the projection of this.ZAxis onto the y-z-plane and the z-axis of the reference CS.
void GetDirectionAngles ( out double  directionAlpha,
out double  directionBeta,
out double  directionGamma 
)

Gets the direction angles alpha and beta that describe the direction of this.ZAxis.

Parameters
directionAlphathe angle between the x-axis and the direction of this.ZAxis.
directionBetathe angle between the y-axis and the direction of this.ZAxis.
EulerAnglesSet GetEulerAngles ( )

Get the orientation of this coordinate system 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.

Returns
A vector containing the three angles: (Psi, Theta, Phi).
void GetEulerAngles ( out double  psi,
out double  theta,
out double  phi 
)

Get the orientation of this coordinate system 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.

Parameters
phiEuler angle $$, the angle between the new x-axis and the line of nodes.
psiEuler angle $$, the angle between the old x-axis and the line of nodes.
thetaEuler angle $$, the angle between the new and the old z-axis.
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 had 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 Matrix3x3D GetInverseRotationMatrixFromEulerAngles ( double  eulerPsi,
double  eulerTheta,
double  eulerPhi 
)
static

Calculates the inverse rotation matrix from Euler angles. Using this matrix the reference coordinate system (of the Euler angles) can be calculated.

Parameters
eulerPsiEuler angle Psi for rotation.
eulerThetaEuler angle Theta for rotation.
eulerPhiEuler angle Phi for rotation.
Returns
The inverse rotation matrix
static Matrix3x3D GetInverseRotationMatrixFromEulerAngles ( EulerAnglesSet  eulerAngles)
static

Calculates the inverse rotation matrix from Euler angles. Using this matrix the reference coordinate system (of the Euler angles) can be calculated.

Parameters
eulerAnglesSet of Euler angles
Returns
The rotation matrix
IOrientationDefinition 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.

Parameters
typeType of the IOrientationDefinition object to give.
Returns
Orientation of this as IOrientationDefinition
IOrientationDefinition GetOrientation ( OrientationDefinitionType  type,
double  zeta,
bool  cartesianAnglesApplicationBeforeZetaRotation 
)

Get the orientation of this, described by an IOrientationDefinition object of a given type.

Parameters
typeType of the IOrientationDefinition object to give.
zetaRotation angle for the z-axis. Ignored for Euler angles and axis rotation sequence.
cartesianAnglesApplicationBeforeZetaRotationIf TRUE, the direction of the z axis is determined by the Cartesian angles at first, then the z-axis rotation is applied. If FALSE, the z-axis rotation is applied at first, then the direction of the z axis is determined by the Cartesian angles referring to the new x- and y-axes. This parameter will be ignored for Euler angles and axis rotation sequence.
Returns
Orientation of this as IOrientationDefinition
AxisRotationSequence GetOrientationByAxisRotationSequence ( )

Get the orientation of this, described by a sequence of axis rotations

Returns
Orientation of this as AxisRotationSequence
OrientationByCartesianAngles GetOrientationByCartesianAngles ( double  zeta,
bool  cartesianAnglesApplicationBeforeZetaRotation 
)

Get the orientation of this, described by the cartesian angles of the z-axis and an additional rotation about the z-axis

Parameters
zetaRotation angle for the z-axis.
cartesianAnglesApplicationBeforeZetaRotationIf TRUE, the direction of the z axis is determined by the Cartesian angles at first, then the z-axis rotation is applied. If FALSE, the z-axis rotation is applied at first, then the direction of the z axis is determined by the Cartesian angles referring to the new x- and y-axes.
Returns
Orientation of this as OrientationByCartesianAngles
OrientationByCartesianAngles GetOrientationByCartesianAngles ( )

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.

Returns
Orientation of this as OrientationByCartesianAngles
OrientationByDirectionAngles GetOrientationByDirectionAngles ( double  zeta,
bool  cartesianAnglesApplicationBeforeZetaRotation 
)

Get the orientation of this, described by the direction angles of the z-axis and an additional rotation about the z-axis

Parameters
zetaRotation angle for the z-axis.
cartesianAnglesApplicationBeforeZetaRotationIf TRUE, the direction of the z axis is determined by the Cartesian angles at first, then the z-axis rotation is applied. If FALSE, the z-axis rotation is applied at first, then the direction of the z axis is determined by the Cartesian angles referring to the new x- and y-axes.
Returns
Orientation of this as OrientationByCartesianAngles
OrientationByDirectionAngles GetOrientationByDirectionAngles ( )

Get the orientation of this, described by the direction angles of the z-axis and an additional rotation about the z-axis

Returns
Orientation of this as OrientationByDirectionAngles
OrientationByEulerAngles GetOrientationByEulerAngles ( )

Get the orientation of this, described by Euler angles

Returns
Orientation of this as OrientationByEulerAngles
OrientationBySphereAngles GetOrientationBySphereAngles ( double  zeta,
bool  cartesianAnglesApplicationBeforeZetaRotation 
)

Get the orientation of this, described by the sphere angles of the z-axis and an additional rotation about the z-axis

Parameters
zetaRotation angle for the z-axis.
cartesianAnglesApplicationBeforeZetaRotationIf TRUE, the direction of the z axis is determined by the Cartesian angles at first, then the z-axis rotation is applied. If FALSE, the z-axis rotation is applied at first, then the direction of the z axis is determined by the Cartesian angles referring to the new x- and y-axes.
Returns
Orientation of this as OrientationByCartesianAngles
OrientationBySphereAngles GetOrientationBySphereAngles ( )

Get the orientation of this, described by the sphere angles of the z-axis and an additional rotation about the z-axis

Returns
Orientation of this as OrientationBySphereAngles
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 had the same origin, a multiplication with this matrix would perform a coordinate transformation from the local (internal) coordinate system to the reference (external) cs.

Returns
The matrix
static Matrix3x3D GetRotationMatrixFromEulerAngles ( double  eulerPsi,
double  eulerTheta,
double  eulerPhi 
)
static

Calculates a rotation matrix from Euler angles 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.

Parameters
eulerPsiEuler angle Psi for rotation.
eulerThetaEuler angle Theta for rotation.
eulerPhiEuler angle Phi for rotation.
Returns
The rotation matrix
static Matrix3x3D GetRotationMatrixFromEulerAngles ( EulerAnglesSet  eulerAngles)
static

Calculates a rotation matrix from Euler angles 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.

Parameters
eulerAnglesSet of Euler angles
Returns
The rotation matrix
void GetSphereAngles ( out double  spherePhi,
out double  sphereTheta 
)

Gets the sphere angles phi and theta that describe the direction of this.ZAxis.

Parameters
spherePhiAngle phi, measured in the x-y-plane from the x-axis. It represents a rotation about the z-axis.
sphereThetaAngle theta, measured from the z-axis in a plane constructed by rotating the x-z-plane by the other sphere angle phi.
static bool operator!= ( SystemBaseVectors  bv1,
SystemBaseVectors  bv2 
)
static

Overloaded unequality operator

Parameters
pos1First SystemBaseVectors object to compare
pos2Second SystemBaseVectors object to compare
Returns
Are both SystemBaseVectors objects unequal?
static bool operator== ( SystemBaseVectors  bv1,
SystemBaseVectors  bv2 
)
static

Overloaded equality operator

Parameters
pos1First SystemBaseVectors object to compare
pos2Second SystemBaseVectors object to compare
Returns
Are both SystemBaseVectors objects equal?

Property Documentation

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