Programming Reference for VirtualLab Fusion  2025.1
Loading...
Searching...
No Matches
DirectionByDirectionAngles Class Reference

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
A class for defining directions by direction angles. More...

Inheritance diagram for DirectionByDirectionAngles:

Public Member Functions

override DirectionDefinitionBase Clone ()
 Creates a new object that is a copy of the current instance.
 
override Vector3D CorrespondingVector3D ()
 Gets the vector resulting from the implemented direction definition.
 
 DirectionByDirectionAngles ()
 Default constructor. Sets rho and sigma to 90° and tau to 0. So the defined direction is equal to the z-axis.
 
 DirectionByDirectionAngles (DirectionByDirectionAngles orientationToCopy)
 Copy constructor.
 
 DirectionByDirectionAngles (double firstAngle, double secondAngle, IndependentDirectionAngles independentAngles, bool positiveZ)
 Constructor with all two independent angles and all other parameters.
 
 DirectionByDirectionAngles (double rho, double sigma, double tau)
 Constructor with all parameters.
 
override bool Equals (object otherObject, EqualityIntent equalityIntent)
 Determines whether the specified Object is equal to this instance. Please note: If just the resulting direction of this and the otherObject shall be compared, a comparison of CorrespondingVector3D should be done.
 
void SetDirectionAngles (double firstAngle, double secondAngle, IndependentDirectionAngles independentAngles, bool positiveHalfSpaceForThirdAngle)
 Sets the direction angles rho, sigma and tau. The squared cosines of rho, sigma and tau have to sum to 1.
 
void SetDirectionAngles (double rho, double sigma, double tau)
 Sets the direction angles rho, sigma and tau. The squared cosines of rho, sigma and tau have to sum to 1.
 
override string ToString ()
 Overridden ToString method.
 

Static Public Member Functions

static double GetThirdAngle (double angle1, double angle2, bool negativeHalfSpaceForThirdAngle)
 Method that calculates one direction angles from the two other independent angles.
 

Properties

double AngleRho [get]
 Gets and sets the direction angle rho, which is the angle between the x-axis and the direction to define. The squared cosines of rho, sigma and tau have to sum to 1.
 
double AngleSigma [get]
 Gets and sets the direction angle sigma, which is the angle between the y-axis and the direction to define. The squared cosines of rho, sigma and tau have to sum to 1.
 
double AngleTau [get]
 Gets and sets the direction angle tau, which is the angle between the z-axis and the direction to define. The squared cosines of rho, sigma and tau have to sum to 1.
 
override DirectionDefinitionType DefinitionType [get]
 Gets the DirectionDefinitionType.
 
IndependentDirectionAngles IndependentAngles [get]
 Gets an information which of the three angles are independent and are used to calculate the third one.
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
A class for defining directions by direction angles.

Constructor & Destructor Documentation

◆ DirectionByDirectionAngles() [1/3]

DirectionByDirectionAngles ( double  firstAngle,
double  secondAngle,
IndependentDirectionAngles  independentAngles,
bool  positiveZ 
)

Constructor with all two independent angles and all other parameters.

Parameters
firstAngleAngle between first axis and the direction to define.
secondAngleAngle between second axis and the direction to define.
independentAnglesFlag that indicates the meaning of the parameters firstAngle and secondAngle.
positiveZIf true, the z-axis will lie inside the +z half space, if false, inside the -z half space

◆ DirectionByDirectionAngles() [2/3]

DirectionByDirectionAngles ( double  rho,
double  sigma,
double  tau 
)

Constructor with all parameters.

Parameters
rhoAngle between x-axis and the direction to define.
sigmaAngle between y-axis and the direction to define.
tauAngle between z-axis and the direction to define.

◆ DirectionByDirectionAngles() [3/3]

Copy constructor.

Parameters
orientationToCopyorientation object to copy

Member Function Documentation

◆ Clone()

override DirectionDefinitionBase Clone ( )

Creates a new object that is a copy of the current instance.

Returns
A new object that is a copy of this instance.

◆ CorrespondingVector3D()

override Vector3D CorrespondingVector3D ( )

Gets the vector resulting from the implemented direction definition.

Returns
The vector resulting from the implemented direction definition.

◆ Equals()

override bool Equals ( object  otherObject,
EqualityIntent  equalityIntent 
)

Determines whether the specified Object is equal to this instance. Please note: If just the resulting direction of this and the otherObject shall be compared, a comparison of CorrespondingVector3D should be done.

Parameters
otherObjectThe Object to compare with this instance.
equalityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or physical equality.
Returns
true if the specified Object is equal to this instance; otherwise, false.

◆ GetThirdAngle()

static double GetThirdAngle ( double  angle1,
double  angle2,
bool  negativeHalfSpaceForThirdAngle 
)
static

Method that calculates one direction angles from the two other independent angles.

Parameters
angle1First independent angle
angle2Second independent angle
negativeHalfSpaceForThirdAngleThe third angle can not be determined uniquely from angle1 and angle2, so this flag says whether the third angle has to lie within the positive half space (false) or the negative half space (true).
Returns
Third, dependent angle

◆ SetDirectionAngles() [1/2]

void SetDirectionAngles ( double  firstAngle,
double  secondAngle,
IndependentDirectionAngles  independentAngles,
bool  positiveHalfSpaceForThirdAngle 
)

Sets the direction angles rho, sigma and tau. The squared cosines of rho, sigma and tau have to sum to 1.

Parameters
firstAngleAngle between first axis and the direction to define.
secondAngleAngle between second axis and the direction to define.
independentAnglesFlag that indicates the meaning of the parameters firstAngle and secondAngle.
positiveHalfSpaceForThirdAngleIf true, the direction will lie inside the positive half space of the axis which corresponds to the third angle, if false, inside the negative half space. Example: if the third (i.e. the dependent angle) is tau, then the resulting direction will lie in the +z - half space in case the flag is set to true.

◆ SetDirectionAngles() [2/2]

void SetDirectionAngles ( double  rho,
double  sigma,
double  tau 
)

Sets the direction angles rho, sigma and tau. The squared cosines of rho, sigma and tau have to sum to 1.

Parameters
rhoAngle between x-axis and the direction to define.
sigmaAngle between y-axis and the direction to define.
tauAngle between z-axis and the direction to define.

◆ ToString()

override string ToString ( )

Overridden ToString method.

Returns
A System.String that represents this instance.