Class AxisRotationSequence
- Namespace
- VirtualLabAPI.Core.Numerics
- Assembly
- VirtualLabAPI.dll
Class for describing a sequence of rotations about coordinate axes.
[Serializable]
public class AxisRotationSequence : OrientationDefinitionBase, IEquatable<IObjectBase>, ISerializable, IDeserializationCallback, ICloneable
- Inheritance
-
ObjectBaseSerializableObjectBaseManualSerializationAxisRotationSequence
- Implements
-
IEquatable<IObjectBase>
- Inherited Members
Constructors
AxisRotationSequence()
Default constructor. Creates an empty list that represents no rotations at all.
public AxisRotationSequence()
AxisRotationSequence(List<SimpleRotation>, bool)
Constructor that gets a list of simple rotations (SimpleRotation) and the flag indicating whether the rotation axes are fix.
public AxisRotationSequence(List<SimpleRotation> rotationList, bool fixedAxes)
Parameters
rotationListList<SimpleRotation>List of simple rotations determining the rotation sequence
fixedAxesboolThat flag indicates whether or not the axes are fix during rotation. If
true, the rotations are done about the fix axes of the reference coordinate system. Iffalse, each rotation is done about a non-fix axis of the current coordinate system (yet rotated by previous rotation list members).
AxisRotationSequence(AxisRotationSequence)
Copy constructor
public AxisRotationSequence(AxisRotationSequence rotationSequence)
Parameters
rotationSequenceAxisRotationSequenceRotation sequence to copy
AxisRotationSequence(SimpleRotation[], bool)
Constructor that gets an array of simple rotations (SimpleRotation) and the flag indicating whether the rotation axes are fix.
public AxisRotationSequence(SimpleRotation[] rotationArray, bool fixedAxes)
Parameters
rotationArraySimpleRotation[]Array of simple rotations determining the rotation sequence
fixedAxesboolThat flag indicates whether or not the axes are fix during rotation. If
true, the rotations are done about the fix axes of the reference coordinate system. Iffalse, each rotation is done about a non-fix axis of the current coordinate system (yet rotated by previous rotation list members).
Properties
AxisRotations_ForParameterRun
Gets and sets the rotation angles that make up an Axis Rotation Sequence. For Parameter Run only!
public double[] AxisRotations_ForParameterRun { get; set; }
Property Value
- double[]
Count
Gets the number of rotations.
public int Count { get; }
Property Value
DefinitionType
Gets the OrientationDefinitionType associated with the current implementation of IOrientationDefinition
public override OrientationDefinitionType DefinitionType { get; }
Property Value
FixedAxes
Gets or sets a flag, indicating whether or not the axes are fix during rotation (if this is not defined by the definition type).
If true, the rotations are done about the fix axes of the reference coordinate system.
If false, each rotation is done about a non-fix axis of the current coordinate system (yet rotated by previous rotation list members).
public bool FixedAxes { get; set; }
Property Value
this[int]
Indexer to get or set the rotation for a certain index
public SimpleRotation this[int index] { get; set; }
Parameters
indexintThe index of the rotation.
Property Value
- SimpleRotation
The rotation with the given index.
ListOfRotations
Gets the complete list of simple rotations. Set has to be done via RotationSequenceList.
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>
RotationSequenceList
Gets or sets the complete list of simple rotations.
public List<SimpleRotation> RotationSequenceList { get; set; }
Property Value
Methods
Add(SimpleRotation)
Adds a new rotation to the sequence.
public int Add(SimpleRotation rotationToAdd)
Parameters
rotationToAddSimpleRotationRotation to be added.
Returns
- int
Index of the newly added rotation
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
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetNamesOfAxes(bool)
Gets the names of the axes about which it is rotated in each step.
public string[] GetNamesOfAxes(bool useSmallGreekLetters = false)
Parameters
useSmallGreekLettersboolIf this optional parameter is set to
true, "ξ", "η", and "ζ" are used for the axis labels instead of "X", "Y", and "Z", respectively.
Returns
- string[]
"X", "Y", or "Z" for each step; appended with the correct number of apostrophes if not in fixes axes mode.
IsEquivalent(OrientationDefinitionBase)
Determines whether another orientation definition is equivalent.
public override bool IsEquivalent(OrientationDefinitionBase orientation)
Parameters
orientationOrientationDefinitionBaseIOrientationDefinition which has to be compared.
Returns
- bool
True, if the two objects are equivalent,falseotherwise.
ToString()
Overridden ToString method.
public override string ToString()