Instrument Neutral Distributed Interface INDI 2.2.5
Public Member Functions | Public Attributes | List of all members
INDI::AlignmentSubsystem::TelescopeDirectionVector Struct Reference

Holds a normalised direction vector (direction cosines) More...

#include <Common.h>

Public Member Functions

 TelescopeDirectionVector ()
 Default constructor.
 
 TelescopeDirectionVector (double X, double Y, double Z)
 Copy constructor.
 
const TelescopeDirectionVector operator* (const TelescopeDirectionVector &RHS) const
 Override the * operator to return a cross product.
 
const TelescopeDirectionVector operator* (const double &RHS) const
 Override the * operator to return a scalar product.
 
const TelescopeDirectionVector & operator*= (const double &RHS)
 Override the *= operator to return a unary scalar product.
 
const TelescopeDirectionVector operator- (const TelescopeDirectionVector &RHS) const
 Override the - operator to return a binary vector subtract.
 
double operator^ (const TelescopeDirectionVector &RHS) const
 Override the ^ operator to return a dot product.
 
double Length () const
 Return the length of the vector.
 
void Normalise ()
 Normalise the vector.
 
void RotateAroundY (double Angle)
 Rotate the reference frame around the Y axis. This has the affect of rotating the vector itself in the opposite direction.
 

Public Attributes

double x
 
double y
 
double z
 

Detailed Description

Holds a normalised direction vector (direction cosines)

The x y,z fields of this class should normally represent a normalised (unit length) vector in a right handed rectangular coordinate space. However, for convenience a number a number of standard 3d vector methods are also supported.

Definition at line 68 of file Common.h.

Constructor & Destructor Documentation

◆ TelescopeDirectionVector() [1/2]

INDI::AlignmentSubsystem::TelescopeDirectionVector::TelescopeDirectionVector ( )
inline

Default constructor.

Definition at line 71 of file Common.h.

◆ TelescopeDirectionVector() [2/2]

INDI::AlignmentSubsystem::TelescopeDirectionVector::TelescopeDirectionVector ( double  X,
double  Y,
double  Z 
)
inline

Copy constructor.

Definition at line 74 of file Common.h.

Member Function Documentation

◆ Length()

double INDI::AlignmentSubsystem::TelescopeDirectionVector::Length ( ) const
inline

Return the length of the vector.

Returns
Length of the vector

Definition at line 125 of file Common.h.

◆ Normalise()

void INDI::AlignmentSubsystem::TelescopeDirectionVector::Normalise ( )
inline

Normalise the vector.

Definition at line 131 of file Common.h.

◆ operator*() [1/2]

const TelescopeDirectionVector INDI::AlignmentSubsystem::TelescopeDirectionVector::operator* ( const double &  RHS) const
inline

Override the * operator to return a scalar product.

Definition at line 92 of file Common.h.

◆ operator*() [2/2]

const TelescopeDirectionVector INDI::AlignmentSubsystem::TelescopeDirectionVector::operator* ( const TelescopeDirectionVector &  RHS) const
inline

Override the * operator to return a cross product.

Definition at line 81 of file Common.h.

◆ operator*=()

const TelescopeDirectionVector & INDI::AlignmentSubsystem::TelescopeDirectionVector::operator*= ( const double &  RHS)
inline

Override the *= operator to return a unary scalar product.

Definition at line 103 of file Common.h.

◆ operator-()

const TelescopeDirectionVector INDI::AlignmentSubsystem::TelescopeDirectionVector::operator- ( const TelescopeDirectionVector &  RHS) const
inline

Override the - operator to return a binary vector subtract.

Definition at line 112 of file Common.h.

◆ operator^()

double INDI::AlignmentSubsystem::TelescopeDirectionVector::operator^ ( const TelescopeDirectionVector &  RHS) const
inline

Override the ^ operator to return a dot product.

Definition at line 118 of file Common.h.

◆ RotateAroundY()

void INDI::AlignmentSubsystem::TelescopeDirectionVector::RotateAroundY ( double  Angle)

Rotate the reference frame around the Y axis. This has the affect of rotating the vector itself in the opposite direction.

Parameters
[in]AngleThe angle to rotate the reference frame by. Positive values give an anti-clockwise rotation from the perspective of looking down the positive axis towards the origin.

Definition at line 18 of file Common.cpp.

Member Data Documentation

◆ x

double INDI::AlignmentSubsystem::TelescopeDirectionVector::x

Definition at line 76 of file Common.h.

◆ y

double INDI::AlignmentSubsystem::TelescopeDirectionVector::y

Definition at line 77 of file Common.h.

◆ z

double INDI::AlignmentSubsystem::TelescopeDirectionVector::z

Definition at line 78 of file Common.h.


The documentation for this struct was generated from the following files: