Class DirectionByCartesianAngles
- Namespace
- VirtualLabAPI.Core.Numerics
- Assembly
- VirtualLabAPI.dll
A class for defining directions by Cartesian angles.
[Serializable]
public class DirectionByCartesianAngles : DirectionDefinitionBase, IEquatable<IObjectBase>, ICloneable, ISerializable, IDeserializationCallback
- Inheritance
-
ObjectBaseSerializableObjectBaseManualSerializationDirectionByCartesianAngles
- Implements
-
IEquatable<IObjectBase>
- Inherited Members
Constructors
DirectionByCartesianAngles()
Default constructor, setting all angles to zero.
public DirectionByCartesianAngles()
DirectionByCartesianAngles(double, double, AxisDirection)
Constructor with all parameters.
public DirectionByCartesianAngles(double alpha, double beta, AxisDirection referenceAxis = AxisDirection.Z)
Parameters
alphadoubleAngle between the reference axis and the projection of the direction to be defined onto the first containing plane.
betadoubleAngle between the reference axis and the projection of the direction to be defined onto the second containing plane.
referenceAxisAxisDirectionReference axis.
DirectionByCartesianAngles(DirectionByCartesianAngles)
Copy constructor.
public DirectionByCartesianAngles(DirectionByCartesianAngles directionToCopy)
Parameters
directionToCopyDirectionByCartesianAnglesDirection object to copy.
Properties
AngleAlpha
Gets and sets the Cartesian angle alpha, which is the angle between the reference axis and the projection of the direction to be defined onto the first containing plane (x-z-plane in case of z-axis as reference, x-y-plane in case of x- or y-axis as reference).
public double AngleAlpha { get; }
Property Value
AngleBeta
Gets and sets the Cartesian angle beta, which is the angle between the reference axis and the projection of the direction to be defined onto the second containing plane (y-z-plane in case of z- or y-axis as reference, x-z-plane in case of x-axis as reference).
public double AngleBeta { get; }
Property Value
DefinitionType
Gets the DirectionDefinitionType.
public override DirectionDefinitionType DefinitionType { get; }
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
SetCartesianAngles(double, double)
Sets the direction angles alpha, beta and gamma. The squared cosines of alpha, beta and gamma have to sum to 1.
public void SetCartesianAngles(double alpha, double beta)
Parameters
alphadoubleAngle between x-axis and the direction to define.
betadoubleAngle between y-axis and the direction to define.
ToString()
Overridden ToString method.
public override string ToString()