Table of Contents

Class OrientationBySphereAngles

Namespace
VirtualLabAPI.Core.Numerics
Assembly
VirtualLabAPI.dll

A class for defining orientations by sphere angles.

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

Constructors

OrientationBySphereAngles()

Default constructor, setting all angles to zero.

public OrientationBySphereAngles()

OrientationBySphereAngles(double, double, double)

Constructor with all angles.

public OrientationBySphereAngles(double phi, double theta, double zeta)

Parameters

phi double

Sphere angle phi, measured in the x-y-plane from the x-axis. It represents a rotation about the z-axis.

theta double

Sphere angle theta, measured from the z-axis in a plane constructed by rotating the x-z-plane by the other sphere angle phi.

zeta double

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

OrientationBySphereAngles(double, double, double, bool)

Constructor with all parameters.

public OrientationBySphereAngles(double phi, double theta, double zeta, bool sphereAnglesApplicationBeforeZetaRotation)

Parameters

phi double

Sphere angle phi, measured in the x-y-plane from the x-axis. It represents a rotation about the z-axis.

theta double

Sphere angle theta, measured from the z-axis in a plane constructed by rotating the x-z-plane by the other sphere angle phi.

zeta double

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

sphereAnglesApplicationBeforeZetaRotation bool

Flag, indicating if the inclination of the z-axis by applying the sphere angles shall be done before the rotation about the z-axis (by AngleZeta).

OrientationBySphereAngles(OrientationBySphereAngles)

Copy constructor.

public OrientationBySphereAngles(OrientationBySphereAngles orientationToCopy)

Parameters

orientationToCopy OrientationBySphereAngles

Orientation 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. In case of SphereAnglesApplicationBeforeZetaRotation == false the flag PhiRefersToRotatedXAxis determines, whether this angle is measured from the old x-axis or the new x'-axis.

public double AnglePhi { get; set; }

Property Value

double

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

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 sphere angles, which is defined by SphereAnglesApplicationBeforeZetaRotation. If this rotation is performed first, the flag PhiRefersToRotatedXAxis indicates, if the AnglePhi refers to the not rotated x-axis anyway.

public double AngleZeta { get; set; }

Property Value

double

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>

SphereAnglesApplicationBeforeZetaRotation

Gets or sets if the inclination of the z-axis by applying the sphere angles shall be done before the rotation about the z-axis (by AngleZeta).

public bool SphereAnglesApplicationBeforeZetaRotation { get; set; }

Property Value

bool

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.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Overridden ToString method.

public override string ToString()

Returns

string

A string that represents this instance.