Table of Contents

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
ObjectBase
SerializableObjectBase
ManualSerialization
OrientationByDirectionAngles
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

rho double

Angle between x-axis and the direction to define.

sigma double

Angle between y-axis and the direction to define.

tau double

Angle 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

rho double

Angle between x-axis and the direction to define.

sigma double

Angle between y-axis and the direction to define.

tau double

Angle between z-axis and the direction to define.

zeta double

Angle 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

rho double

Angle between x-axis and the direction to define.

sigma double

Angle between y-axis and the direction to define.

tau double

Angle between z-axis and the direction to define.

zeta double

Angle zeta which is a rotation about the z-axis.

directionAnglesApplicationBeforeZetaRotation bool

flag, 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

firstAngle double

Angle between first axis and the direction to define.

secondAngle double

Angle between second axis and the direction to define.

independentAngles IndependentDirectionAngles

Flag that indicates the meaning of the parameters firstAngle and secondAngle.

positiveZ bool

If true, the z-axis will lie inside the +z half space, if false, 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

firstAngle double

Angle between first axis and the direction to define.

secondAngle double

Angle between second axis and the direction to define.

independentAngles IndependentDirectionAngles

Flag that indicates the meaning of the parameters firstAngle and secondAngle.

positiveZ bool

If true, the z-axis will lie inside the +z half space, if false, inside the -z half space

zeta double

Angle zeta which is a rotation about the z-axis.

directionAnglesApplicationBeforeZetaRotation bool

flag, 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

orientationToCopy OrientationByDirectionAngles

Orientation 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

double

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

double

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

double

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

double

DefinitionType

Gets the OrientationDefinitionType associated this orientation.

public override OrientationDefinitionType DefinitionType { get; }

Property Value

OrientationDefinitionType

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

bool

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

IndependentDirectionAngles

ListOfRotations

Gets a list of simple rotations, describing the complete rotation as a sequence.

public override List<SimpleRotation> ListOfRotations { get; }

Property Value

List<SimpleRotation>

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

otherObject object

The object to compare with this instance.

equalityIntent EqualityIntent

Defines what kind of equality you want to check when comparing two objects, for example all values or physical equality.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

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

rho double

Angle between x-axis and the direction to define.

sigma double

Angle between y-axis and the direction to define.

tau double

Angle 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

firstAngle double

Angle between first axis and the direction to define.

secondAngle double

Angle between second axis and the direction to define.

independentAngles IndependentDirectionAngles

Flag that indicates the meaning of the parameters firstAngle and secondAngle.

positiveHalfSpaceForThirdAngle bool

If true, the z-axis will lie inside the positive half space of that axis which corresponds to the independent angle, if false, inside the negative half space.

ToString()

Overridden ToString method.

public override string ToString()

Returns

string

A string that represents this instance.