ZeusMath-Library  2.0.4
zeus::TAngle Class Reference

#include <Angle.h>

Inheritance diagram for zeus::TAngle:
zeus::IAngle

Public Member Functions

 TAngle ()
 Default constructor. More...
 
 TAngle (const Float &fAngle, ESystem eSystem)
 Constructor with value. More...
 
 TAngle (const TAngle &rAngle)
 Copy constructor: Constructor taking class type object. More...
 
 TAngle (const IAngle &rAngle)
 Constructor taking interface type object. More...
 
virtual ~TAngle ()
 Virtual destructor. More...
 
virtual Float MQUALIFIER getRadians () const
 
virtual Float MQUALIFIER getDegrees () const
 
virtual void MQUALIFIER setRadians (const Float &fAngle)
 
virtual void MQUALIFIER setDegrees (const Float &fAngle)
 
virtual void MQUALIFIER assign (const IAngle &rAngle)
 
virtual bool MQUALIFIER isEqual (const IAngle &rAngle, bool bNormalizeToSingleCircle=false) const
 
virtual Float MQUALIFIER cos () const
 
virtual Float MQUALIFIER sin () const
 
virtual Float MQUALIFIER tan () const
 
virtual void MQUALIFIER normalizeToInterval (const IAngle &rAngleMin, const IAngle &rAngleMax, bool bIncludeMin, bool bIncludeMax)
 
virtual void MQUALIFIER normalizeToSingleCircle ()
 
const TAngleoperator= (const IAngle &rAngle)
 Assignment of interface type object. More...
 
const TAngleoperator= (const TAngle &rAngle)
 Assignment of class type object. More...
 
TAngle operator+ (const IAngle &rAngle) const
 
TAngle operator- (const IAngle &rAngle) const
 
const TAngleoperator+= (const IAngle &rAngle)
 
const TAngleoperator-= (const IAngle &rAngle)
 
TAngle operator* (const Float &rFloat) const
 
TAngle operator/ (const Float &rFloat) const
 
bool operator== (const IAngle &rAngle) const
 
bool operator!= (const IAngle &rAngle) const
 
bool operator< (const IAngle &rAngle) const
 
bool operator<= (const IAngle &rAngle) const
 
bool operator> (const IAngle &rAngle) const
 
bool operator>= (const IAngle &rAngle) const
 
Float getValue (ESystem eSystem) const
 

Static Public Member Functions

static Float radiansToDegrees (const Float &fAngle)
 
static Float degreesToRadians (const Float &fAngle)
 

Additional Inherited Members

- Public Types inherited from zeus::IAngle
enum  ESystem { etRadians = 0, etDegrees = 1 }
 

Detailed Description

TAngle encapsulates a floating point angle. Its value can be read specifically as radians or degrees. The class also serves as convertor between different angle systems.

TAngle objects are stack objects.

Constructor & Destructor Documentation

§ TAngle() [1/4]

zeus::TAngle::TAngle ( )
inline

Default constructor.

§ TAngle() [2/4]

zeus::TAngle::TAngle ( const Float &  fAngle,
ESystem  eSystem 
)

Constructor with value.

Constructor with value.

Parameters
fAngle[IN]: The angle.
eSystem[IN]: The angle system.

§ TAngle() [3/4]

zeus::TAngle::TAngle ( const TAngle rAngle)
inline

Copy constructor: Constructor taking class type object.

§ TAngle() [4/4]

zeus::TAngle::TAngle ( const IAngle rAngle)
inline

Constructor taking interface type object.

§ ~TAngle()

virtual zeus::TAngle::~TAngle ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

§ assign()

virtual void MQUALIFIER zeus::TAngle::assign ( const IAngle rAngle)
inlinevirtual

Assignment.

Parameters
rAngle[IN]: Reference to interface type object to be assigned to this object.

Implements zeus::IAngle.

§ cos()

virtual Float MQUALIFIER zeus::TAngle::cos ( ) const
inlinevirtual

Trigonometry.

Calculate the cosine of this angle.

Returns
: Cosine of this angle.

Implements zeus::IAngle.

§ degreesToRadians()

static Float zeus::TAngle::degreesToRadians ( const Float &  fAngle)
inlinestatic

Static conversion method to convert an angle from degrees to radiant

Parameters
fAngle: angle in degrees
Returns
angle in radiant

§ getDegrees()

virtual Float MQUALIFIER zeus::TAngle::getDegrees ( ) const
inlinevirtual

Read the angle's value in degrees.

Returns
: Angle in degrees.

Implements zeus::IAngle.

§ getRadians()

virtual Float MQUALIFIER zeus::TAngle::getRadians ( ) const
inlinevirtual

Read the angle's value in radians.

Returns
: Angle in radians.

Implements zeus::IAngle.

§ getValue()

Float zeus::TAngle::getValue ( ESystem  eSystem) const

returns the value depending on the system

Parameters
eSystem: requested angle system
Returns
value converted in the requested system

§ isEqual()

bool MQUALIFIER zeus::TAngle::isEqual ( const IAngle rAngle,
bool  bNormalizeToSingleCircle = false 
) const
virtual

Checks if two angles are equal. If normalisation is selected the angle is normalized to 0-360

Parameters
rAngle: angle to check
bNormalizeToSingleCircle: selects the normalisation (default = false)
Return values
true: angles are equal
false: angles are not equal.

Implements zeus::IAngle.

§ normalizeToInterval()

void MQUALIFIER zeus::TAngle::normalizeToInterval ( const IAngle rAngleMin,
const IAngle rAngleMax,
bool  bIncludeMin,
bool  bIncludeMax 
)
virtual

Normalizes the angle to an angle interval

Parameters
rAngleMin: minimum interval value
rAngleMax: maximum interval value
bIncludeMin: flag if the minumum is included
bIncludeMax: flag if the maximum is included

Implements zeus::IAngle.

§ normalizeToSingleCircle()

void MQUALIFIER zeus::TAngle::normalizeToSingleCircle ( )
virtual

Normalizes the angle to an angle interval between 0 and 360 degrees

Implements zeus::IAngle.

§ operator!=()

bool zeus::TAngle::operator!= ( const IAngle rAngle) const
inline

§ operator*()

TAngle zeus::TAngle::operator* ( const Float &  rFloat) const
inline

§ operator+()

TAngle zeus::TAngle::operator+ ( const IAngle rAngle) const
inline

§ operator+=()

const TAngle& zeus::TAngle::operator+= ( const IAngle rAngle)
inline

§ operator-()

TAngle zeus::TAngle::operator- ( const IAngle rAngle) const
inline

§ operator-=()

const TAngle& zeus::TAngle::operator-= ( const IAngle rAngle)
inline

§ operator/()

TAngle zeus::TAngle::operator/ ( const Float &  rFloat) const
inline

§ operator<()

bool zeus::TAngle::operator< ( const IAngle rAngle) const
inline

§ operator<=()

bool zeus::TAngle::operator<= ( const IAngle rAngle) const
inline

§ operator=() [1/2]

const TAngle& zeus::TAngle::operator= ( const IAngle rAngle)
inline

Assignment of interface type object.

§ operator=() [2/2]

const TAngle& zeus::TAngle::operator= ( const TAngle rAngle)
inline

Assignment of class type object.

§ operator==()

bool zeus::TAngle::operator== ( const IAngle rAngle) const
inline

§ operator>()

bool zeus::TAngle::operator> ( const IAngle rAngle) const
inline

§ operator>=()

bool zeus::TAngle::operator>= ( const IAngle rAngle) const
inline

§ radiansToDegrees()

static Float zeus::TAngle::radiansToDegrees ( const Float &  fAngle)
inlinestatic

Static conversion method to convert an angle from radiant to degrees

Parameters
fAngle: radiant angle
Returns
angle in degrees

§ setDegrees()

virtual void MQUALIFIER zeus::TAngle::setDegrees ( const Float &  fAngle)
inlinevirtual

Set the angle's value in degrees.

Parameters
fAngle[IN]: Angle in degrees.

Implements zeus::IAngle.

§ setRadians()

virtual void MQUALIFIER zeus::TAngle::setRadians ( const Float &  fAngle)
inlinevirtual

Set the angle's value in radians.

Parameters
fAngle[IN]: Angle in radians.

Implements zeus::IAngle.

§ sin()

virtual Float MQUALIFIER zeus::TAngle::sin ( ) const
inlinevirtual

Calculate the sine of this angle.

Returns
: Sine of this angle.

Implements zeus::IAngle.

§ tan()

virtual Float MQUALIFIER zeus::TAngle::tan ( ) const
inlinevirtual

Calculate the tangent of this angle.

Returns
: Tangent of this angle.

Implements zeus::IAngle.


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


Written by Benjamin Hadorn http://www.xatlantis.ch.
Last change made on Wed Sep 14 2016 06:46:05