Class OrientationByDirectionAngles
- Namespace
- VirtualLabAPI.Core.Numerics
- Assembly
- VirtualLabAPI.dll
A class for defining orientations by direction angles, i.e. the angles between the direction to be defined and each of the Cartesian axis respectively.
[Serializable]
public class OrientationByDirectionAngles : OrientationDefinitionBase, IEquatable<IObjectBase>, ISerializable, IDeserializationCallback, ICloneable
- Inheritance
-
ObjectBaseSerializableObjectBaseManualSerializationOrientationByDirectionAngles
- Implements
-
IEquatable<IObjectBase>
- Inherited Members
Constructors
OrientationByDirectionAngles()
Default constructor. Sets rho and sigma to 90° and tau to 0. So the defined direction is equal to the z-axis.
public OrientationByDirectionAngles()
OrientationByDirectionAngles(double, double, double)
Constructor with direction angles only.
public OrientationByDirectionAngles(double rho, double sigma, double tau)
Parameters
rhodoubleAngle between x-axis and the direction to define.
sigmadoubleAngle between y-axis and the direction to define.
taudoubleAngle between z-axis and the direction to define.
OrientationByDirectionAngles(double, double, double, double)
Constructor with all angles.
public OrientationByDirectionAngles(double rho, double sigma, double tau, double zeta)
Parameters
rhodoubleAngle between x-axis and the direction to define.
sigmadoubleAngle between y-axis and the direction to define.
taudoubleAngle between z-axis and the direction to define.
zetadoubleAngle zeta which is a rotation about the z-axis.
OrientationByDirectionAngles(double, double, double, double, bool)
Constructor with all parameters.
public OrientationByDirectionAngles(double rho, double sigma, double tau, double zeta, bool directionAnglesApplicationBeforeZetaRotation)
Parameters
rhodoubleAngle between x-axis and the direction to define.
sigmadoubleAngle between y-axis and the direction to define.
taudoubleAngle between z-axis and the direction to define.
zetadoubleAngle zeta which is a rotation about the z-axis.
directionAnglesApplicationBeforeZetaRotationboolflag, if the inclination of the z-axis by applying the direction angles shall be done before the rotation about the z-axis (by AngleZeta).
OrientationByDirectionAngles(double, double, IndependentDirectionAngles, bool)
Constructor with two direction angles. The third one is calculated automatically.
public OrientationByDirectionAngles(double firstAngle, double secondAngle, IndependentDirectionAngles independentAngles, bool positiveZ)
Parameters
firstAngledoubleAngle between first axis and the direction to define.
secondAngledoubleAngle between second axis and the direction to define.
independentAnglesIndependentDirectionAnglesFlag that indicates the meaning of the parameters firstAngle and secondAngle.
positiveZboolIf
true, the z-axis will lie inside the +z half space, iffalse, inside the -z half space
OrientationByDirectionAngles(double, double, IndependentDirectionAngles, bool, double, bool)
Constructor with all two independent angles and all other parameters.
public OrientationByDirectionAngles(double firstAngle, double secondAngle, IndependentDirectionAngles independentAngles, bool positiveZ, double zeta, bool directionAnglesApplicationBeforeZetaRotation)
Parameters
firstAngledoubleAngle between first axis and the direction to define.
secondAngledoubleAngle between second axis and the direction to define.
independentAnglesIndependentDirectionAnglesFlag that indicates the meaning of the parameters firstAngle and secondAngle.
positiveZboolIf
true, the z-axis will lie inside the +z half space, iffalse, inside the -z half spacezetadoubleAngle zeta which is a rotation about the z-axis.
directionAnglesApplicationBeforeZetaRotationboolflag, if the inclination of the z-axis by applying the direction angles shall be done before the rotation about the z-axis (by AngleZeta).
OrientationByDirectionAngles(OrientationByDirectionAngles)
Copy constructor.
public OrientationByDirectionAngles(OrientationByDirectionAngles orientationToCopy)
Parameters
orientationToCopyOrientationByDirectionAnglesOrientation object to copy.
Properties
AngleRho
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.
public double AngleRho { get; }
Property Value
AngleSigma
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.
public double AngleSigma { get; }
Property Value
AngleTau
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.
public double AngleTau { get; }
Property Value
AngleZeta
Gets and sets the angle zeta which is a rotation about the z-axis. This rotation can be performed either before or after applying the direction angles, which is defined by DirectionAnglesApplicationBeforeZetaRotation. If this rotation is performed first, the flag AnglesReferToCSRotatedByZeta indicates, if the direction angles refer to the not rotated CS anyway.
public double AngleZeta { get; set; }
Property Value
DefinitionType
Gets the OrientationDefinitionType associated this orientation.
public override OrientationDefinitionType DefinitionType { get; }
Property Value
DirectionAnglesApplicationBeforeZetaRotation
Gets or sets if the inclination of the z-axis by applying the direction angles shall be done before the rotation about the z-axis (by AngleZeta).
public bool DirectionAnglesApplicationBeforeZetaRotation { get; set; }
Property Value
IndependentAngles
Gets an information which of the three angles are independent and are used to calculate the third one
public IndependentDirectionAngles IndependentAngles { get; }
Property Value
ListOfRotations
Gets a list of simple rotations, describing the complete rotation as a sequence.
public override List<SimpleRotation> ListOfRotations { get; }
Property Value
ParameterRunParameters
Gets all available parameters. For variable parameters (i.e. those double and int parameters which can be used in the Parameter Run, Parametric Optimization and so on) add a VaryParameterInfo object (derived from Parameter class) to the returned list.
public override List<Parameter> ParameterRunParameters { get; }
Property Value
- List<Parameter>
Methods
Clone()
Creates a new object that is a copy of the current instance.
public override object Clone()
Returns
- object
A new object that is a copy of this instance.
CorrespondingQuaternion()
Gets the quaternion corresponding to this orientation definition.
public override Quaternion CorrespondingQuaternion()
Returns
- Quaternion
The quaternion corresponding to this orientation definition.
Equals(object, EqualityIntent)
Determines whether the specified object is equal to this instance. Please note: If just the resulting orientation of this and the otherObject shall be compared, the method IsEquivalent of the base class should be used.
public override bool Equals(object otherObject, EqualityIntent equalityIntent)
Parameters
otherObjectobjectThe object to compare with this instance.
equalityIntentEqualityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or physical equality.
Returns
SetDirectionAngles(double, double, double)
Sets the direction angles rho, sigma and tau. The squared cosines of rho, sigma and tau have to sum to 1.
public void SetDirectionAngles(double rho, double sigma, double tau)
Parameters
rhodoubleAngle between x-axis and the direction to define.
sigmadoubleAngle between y-axis and the direction to define.
taudoubleAngle between z-axis and the direction to define.
SetDirectionAngles(double, double, IndependentDirectionAngles, bool)
Sets the direction angles rho, sigma and tau. The squared cosines of rho, sigma and tau have to sum to 1.
public void SetDirectionAngles(double firstAngle, double secondAngle, IndependentDirectionAngles independentAngles, bool positiveHalfSpaceForThirdAngle)
Parameters
firstAngledoubleAngle between first axis and the direction to define.
secondAngledoubleAngle between second axis and the direction to define.
independentAnglesIndependentDirectionAnglesFlag that indicates the meaning of the parameters firstAngle and secondAngle.
positiveHalfSpaceForThirdAngleboolIf
true, the z-axis will lie inside the positive half space of that axis which corresponds to the independent angle, iffalse, inside the negative half space.
ToString()
Overridden ToString method.
public override string ToString()