Table of Contents

Class DirectionByCartesianAngles

Namespace
VirtualLabAPI.Core.Numerics
Assembly
VirtualLabAPI.dll

A class for defining directions by Cartesian angles.

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

Constructors

DirectionByCartesianAngles()

Default constructor, setting all angles to zero.

public DirectionByCartesianAngles()

DirectionByCartesianAngles(double, double, AxisDirection)

Constructor with all parameters.

public DirectionByCartesianAngles(double alpha, double beta, AxisDirection referenceAxis = AxisDirection.Z)

Parameters

alpha double

Angle between the reference axis and the projection of the direction to be defined onto the first containing plane.

beta double

Angle between the reference axis and the projection of the direction to be defined onto the second containing plane.

referenceAxis AxisDirection

Reference axis.

DirectionByCartesianAngles(DirectionByCartesianAngles)

Copy constructor.

public DirectionByCartesianAngles(DirectionByCartesianAngles directionToCopy)

Parameters

directionToCopy DirectionByCartesianAngles

Direction object to copy.

Properties

AngleAlpha

Gets and sets the Cartesian angle alpha, which is the angle between the reference axis and the projection of the direction to be defined onto the first containing plane (x-z-plane in case of z-axis as reference, x-y-plane in case of x- or y-axis as reference).

public double AngleAlpha { get; }

Property Value

double

AngleBeta

Gets and sets the Cartesian angle beta, which is the angle between the reference axis and the projection of the direction to be defined onto the second containing plane (y-z-plane in case of z- or y-axis as reference, x-z-plane in case of x-axis as reference).

public double AngleBeta { get; }

Property Value

double

DefinitionType

public override DirectionDefinitionType DefinitionType { get; }

Property Value

DirectionDefinitionType

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.

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.