Class DirectionBySphereAngles
- Namespace
- VirtualLabAPI.Core.Numerics
- Assembly
- VirtualLabAPI.dll
A class for defining directions by sphere angles.
[Serializable]
public class DirectionBySphereAngles : DirectionDefinitionBase, IEquatable<IObjectBase>, ICloneable, ISerializable, IDeserializationCallback
- Inheritance
-
ObjectBaseSerializableObjectBaseManualSerializationDirectionBySphereAngles
- Implements
-
IEquatable<IObjectBase>
- Inherited Members
Constructors
DirectionBySphereAngles()
Default constructor, setting all angles to zero.
public DirectionBySphereAngles()
DirectionBySphereAngles(double, double, AxisDirection)
Constructor with all parameters.
public DirectionBySphereAngles(double phi, double theta, AxisDirection referenceAxis = AxisDirection.Z)
Parameters
phidoublesphere angle phi, measured in the x-y-plane from the x-axis. It represents a rotation about the z-axis.
thetadoublesphere angle theta, measured from the z-axis in a plane constructed by rotating the x-z-plane by the other sphere angle phi.
referenceAxisAxisDirectionAxis the sphere angles refer to.
DirectionBySphereAngles(DirectionBySphereAngles)
Copy constructor.
public DirectionBySphereAngles(DirectionBySphereAngles directionToCopy)
Parameters
directionToCopyDirectionBySphereAnglesdirection object to copy
Properties
AnglePhi
Gets and sets the sphere angle phi, measured in the x-y-plane from the x-axis. It represents a rotation about the z-axis.
public double AnglePhi { get; set; }
Property Value
AngleTheta
Gets and sets the sphere angle theta, measured from the z-axis in a plane constructed by rotating the x-z-plane by the other sphere angle phi.
public double AngleTheta { get; set; }
Property Value
DefinitionType
Gets the DirectionDefinitionType.
public override DirectionDefinitionType DefinitionType { get; }
Property Value
ReferenceAxis
The reference axis the rotation sequence is applied to.
public AxisDirection ReferenceAxis { 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()