Table of Contents

Class OrientationByCartesianAngles

Namespace
VirtualLabAPI.Core.Numerics
Assembly
VirtualLabAPI.dll

A class for defining orientations by Cartesian angles, i.e. the angles between the projection of the direction to be defined onto the x-z-plane and the z-axis (alpha), and between the projection of the direction to be defined onto the y-z-plane and the z-axis (beta).

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

Constructors

OrientationByCartesianAngles()

Default constructor, setting alpha, beta and zeta to zero.

public OrientationByCartesianAngles()

OrientationByCartesianAngles(double, double)

Constructor with the Cartesian angles only.

public OrientationByCartesianAngles(double alpha, double beta)

Parameters

alpha double

Angle between the projection of the direction to be defined onto the x-z-plane and the z-axis.

beta double

Angle between the projection of the direction to be defined onto the y-z-plane and the z-axis.

OrientationByCartesianAngles(double, double, double)

Constructor with all angles.

public OrientationByCartesianAngles(double alpha, double beta, double zeta)

Parameters

alpha double

Angle between the projection of the direction to be defined onto the x-z-plane and the z-axis.

beta double

Angle between the projection of the direction to be defined onto the y-z-plane and the z-axis.

zeta double

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

OrientationByCartesianAngles(double, double, double, bool)

Constructor with all parameters.

public OrientationByCartesianAngles(double alpha, double beta, double zeta, bool cartesianAnglesApplicationBeforeZetaRotation)

Parameters

alpha double

Angle between the projection of the direction to be defined onto the x-z-plane and the z-axis.

beta double

Angle between the projection of the direction to be defined onto the y-z-plane and the z-axis.

zeta double

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

cartesianAnglesApplicationBeforeZetaRotation 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).

OrientationByCartesianAngles(OrientationByCartesianAngles)

Copy constructor.

public OrientationByCartesianAngles(OrientationByCartesianAngles orientationToCopy)

Parameters

orientationToCopy OrientationByCartesianAngles

Orientation object to copy.

Properties

AngleAlpha

Gets and sets the Cartesian angle alpha, which is the angle between the z-axis and the projection of the direction to be defined onto the x-z-plane.

public double AngleAlpha { get; set; }

Property Value

double

AngleBeta

Gets and sets the Cartesian angle beta, which is the angle between the projection of the direction to be defined onto the y-z-plane and the z-axis.

public double AngleBeta { get; set; }

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 CartesianAnglesApplicationBeforeZetaRotation. 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

CartesianAnglesApplicationBeforeZetaRotation

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 CartesianAnglesApplicationBeforeZetaRotation { get; set; }

Property Value

bool

DefinitionType

Gets the OrientationDefinitionType associated this orientation.

public override OrientationDefinitionType DefinitionType { get; }

Property Value

OrientationDefinitionType

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.

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

alpha double

Angle between x-axis and the direction to define.

beta double

Angle between y-axis and the direction to define.

ToString()

Overridden ToString method.

public override string ToString()

Returns

string

A string that represents this instance.