Class DirectionByRotationSequence
- Namespace
- VirtualLabAPI.Core.Numerics
- Assembly
- VirtualLabAPI.dll
A class for defining directions by applying a sequence of axis rotations to a starting vector.
[Serializable]
public class DirectionByRotationSequence : DirectionDefinitionBase, IEquatable<IObjectBase>, ICloneable, ISerializable, IDeserializationCallback
- Inheritance
-
ObjectBaseSerializableObjectBaseManualSerializationDirectionByRotationSequence
- Implements
-
IEquatable<IObjectBase>
- Inherited Members
Constructors
DirectionByRotationSequence()
Default constructor. Creates an empty list that represents no rotations at all.
public DirectionByRotationSequence()
DirectionByRotationSequence(List<SimpleRotation>, AxisDirection)
Constructor that gets a list of simple rotations (SimpleRotation) and the flag indicating whether the rotation axes are fix.
public DirectionByRotationSequence(List<SimpleRotation> rotationList, AxisDirection referenceAxis = AxisDirection.Z)
Parameters
rotationListList<SimpleRotation>List of simple rotations determining the rotation sequence
referenceAxisAxisDirectionAxis the rotation sequence shall be applied to.
DirectionByRotationSequence(DirectionByRotationSequence)
Copy constructor.
public DirectionByRotationSequence(DirectionByRotationSequence rotationSequence)
Parameters
rotationSequenceDirectionByRotationSequenceRotation sequence to copy
Properties
Count
Gets the number of rotations
public int Count { get; }
Property Value
DefinitionType
Gets the DirectionDefinitionType.
public override DirectionDefinitionType DefinitionType { get; }
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.
ReferenceAxis
The reference axis the rotation sequence is applied to.
public AxisDirection ReferenceAxis { get; set; }
Property Value
RotationSequenceList
Get or set the complete list of simple rotations.
public List<SimpleRotation> RotationSequenceList { get; set; }
Property Value
Methods
Clone()
Creates a new object that is a copy of the current instance.
public override DirectionDefinitionBase Clone()
Returns
- DirectionDefinitionBase
A new object that is a copy of this instance.
CorrespondingVector3D()
Gets the vector resulting from the implemented direction definition.
public override Vector3D CorrespondingVector3D()
Returns
- Vector3D
The vector resulting from the implemented direction definition.
Equals(object, 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.
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
ToString()
Overridden ToString method.
public override string ToString()