Table of Contents

Class DirectionByDirectionAngles

Namespace
VirtualLabAPI.Core.Numerics
Assembly
VirtualLabAPI.dll

A class for defining directions by direction angles.

[Serializable]
public class DirectionByDirectionAngles : DirectionDefinitionBase, IEquatable<IObjectBase>, ICloneable, ISerializable, IDeserializationCallback
Inheritance
ObjectBase
SerializableObjectBase
ManualSerialization
DirectionByDirectionAngles
Implements
IEquatable<IObjectBase>
Inherited Members

Constructors

DirectionByDirectionAngles()

Default constructor. Sets rho and sigma to 90° and tau to 0. So the defined direction is equal to the z-axis.

public DirectionByDirectionAngles()

DirectionByDirectionAngles(double, double, double)

Constructor with all parameters

public DirectionByDirectionAngles(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.

DirectionByDirectionAngles(double, double, IndependentDirectionAngles, bool)

Constructor with all two independent angles and all other parameters.

public DirectionByDirectionAngles(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

DirectionByDirectionAngles(DirectionByDirectionAngles)

Copy constructor

public DirectionByDirectionAngles(DirectionByDirectionAngles orientationToCopy)

Parameters

orientationToCopy DirectionByDirectionAngles

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

DefinitionType

public override DirectionDefinitionType DefinitionType { get; }

Property Value

DirectionDefinitionType

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

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

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.

GetThirdAngle(double, double, bool)

Method that calculates one direction angles from the two other independent angles.

public static double GetThirdAngle(double angle1, double angle2, bool negativeHalfSpaceForThirdAngle)

Parameters

angle1 double

First independent angle.

angle2 double

Second independent angle.

negativeHalfSpaceForThirdAngle bool

The third angle cannot be determined uniquely from angle1 and angle2, so this flag says whether the third angle has to lie within the positive half space (false) or the negative half space (true).

Returns

double

Third, dependent angle

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 direction will lie inside the positive half space of the axis which corresponds to the third angle, if false, inside the negative half space. Example: if the third (i.e. the dependent angle) is tau, then the resulting direction will lie in the +z - half space in case the flag is set to true.

ToString()

Overridden ToString method.

public override string ToString()

Returns

string

A string that represents this instance.