BALL
1.4.79
|
#include <BALL/MATHS/angle.h>
Public Types | |
Enums | |
enum | Range { RANGE__UNLIMITED = 0, RANGE__UNSIGNED = 1, RANGE__SIGNED = 2 } |
Public Member Functions | |
Constructors and Destructors | |
TAngle () | |
TAngle (const TAngle &angle) | |
TAngle (const T &new_value, bool radian=true) | |
virtual | ~TAngle () |
virtual void | clear () |
Assignment | |
void | swap (TAngle &angle) |
void | set (const T &new_value, bool radian=true) |
void | set (const TAngle &angle) |
TAngle & | operator= (const TAngle &angle) |
TAngle & | operator= (const T &new_value) |
void | get (TAngle &angle) const |
void | get (T &val, bool radian=true) const |
Predicates | |
bool | operator== (const TAngle &angle) const |
bool | operator!= (const TAngle &angle) const |
bool | operator< (const TAngle &angle) const |
bool | operator< (const T &val) const |
bool | operator<= (const TAngle &angle) const |
bool | operator>= (const TAngle &angle) const |
bool | operator> (const TAngle &angle) const |
bool | isEquivalent (TAngle angle) const |
Debugging and Diagnostics | |
bool | isValid () const |
void | dump (std::ostream &s=std::cout, Size depth=0) const |
Public Attributes | |
Attributes | |
T | value |
Accessors | |
operator T () const | |
T | toRadian () const |
T | toDegree () const |
void | normalize (Range range) |
void | negate () |
TAngle | operator+ () const |
TAngle | operator- () const |
TAngle & | operator+= (const TAngle &angle) |
TAngle & | operator+= (const T &val) |
TAngle | operator+ (const TAngle &angle) |
TAngle & | operator-= (const TAngle &angle) |
TAngle & | operator-= (const T &val) |
TAngle | operator- (const TAngle &angle) |
TAngle & | operator*= (const TAngle &angle) |
TAngle & | operator*= (const T &val) |
TAngle & | operator/= (const TAngle &angle) |
TAngle & | operator/= (const T &val) |
TAngle | operator/ (const TAngle &val) |
static T | toRadian (const T °ree) |
static T | toDegree (const T &radian) |
Generic Angle Class. Use this class to describe angles. The TAngle class permits the conversion from degree to radians and is the return type of all functions used to calculate angles.
enum BALL::TAngle::Range |
BALL::TAngle< T >::TAngle | ( | ) |
BALL::TAngle< T >::TAngle | ( | const TAngle< T > & | angle | ) |
|
explicit |
|
inlinevirtual |
|
inlinevirtual |
void BALL::TAngle< T >::dump | ( | std::ostream & | s = std::cout , |
Size | depth = 0 |
||
) | const |
void BALL::TAngle< T >::get | ( | TAngle< T > & | angle | ) | const |
void BALL::TAngle< T >::get | ( | T & | val, |
bool | radian = true |
||
) | const |
bool BALL::TAngle< T >::isEquivalent | ( | TAngle< T > | angle | ) | const |
Test whether two angles are equivalent. Both angles are normalized and afterwards compared with Maths::isEqual instead of comparing the values directly.
angle | the angle to compare with |
value
bool BALL::TAngle< T >::isValid | ( | ) | const |
void BALL::TAngle< T >::negate | ( | ) |
void BALL::TAngle< T >::normalize | ( | Range | range | ) |
BALL::TAngle< T >::operator T | ( | ) | const |
bool BALL::TAngle< T >::operator!= | ( | const TAngle< T > & | angle | ) | const |
Inequality operator This test uses Maths::isNotEqual instead of comparing the values directly.
angle | the angle to compare with |
TAngle< T > & BALL::TAngle< T >::operator*= | ( | const TAngle< T > & | angle | ) |
TAngle< T > & BALL::TAngle< T >::operator*= | ( | const T & | val | ) |
TAngle< T > BALL::TAngle< T >::operator+ | ( | ) | const |
TAngle< T > BALL::TAngle< T >::operator+ | ( | const TAngle< T > & | angle | ) |
TAngle< T > & BALL::TAngle< T >::operator+= | ( | const TAngle< T > & | angle | ) |
TAngle< T > & BALL::TAngle< T >::operator+= | ( | const T & | val | ) |
TAngle< T > BALL::TAngle< T >::operator- | ( | ) | const |
TAngle< T > BALL::TAngle< T >::operator- | ( | const TAngle< T > & | angle | ) |
Subtraction an angle from this angle.
angle | the angle to substract |
TAngle< T > & BALL::TAngle< T >::operator-= | ( | const TAngle< T > & | angle | ) |
TAngle< T > & BALL::TAngle< T >::operator-= | ( | const T & | val | ) |
TAngle< T > BALL::TAngle< T >::operator/ | ( | const TAngle< T > & | val | ) |
Divide this angle by a value.
val | the angle to divide by |
Exception::DivisionByZero | if val is zero |
TAngle< T > & BALL::TAngle< T >::operator/= | ( | const TAngle< T > & | angle | ) |
Division operator.
angle | the angle to divide by |
Exception::DivisionByZero | if angle is zero |
TAngle< T > & BALL::TAngle< T >::operator/= | ( | const T & | val | ) |
Divide this angle by a value.
val | the angle to divide by |
Exception::DivisionByZero | if val is zero |
bool BALL::TAngle< T >::operator< | ( | const TAngle< T > & | angle | ) | const |
Is less operator. This test uses Maths::isLess instead of comparing the values directly.
angle | the angle to compare with |
value
bool BALL::TAngle< T >::operator< | ( | const T & | val | ) | const |
Is less operator. This test uses Maths::isLess instead of comparing the values directly.
val | the value to compare with |
value
bool BALL::TAngle< T >::operator<= | ( | const TAngle< T > & | angle | ) | const |
Is less or equal operator. This test uses Maths::isLessOrEqual instead of comparing the values directly.
angle | the angle to compare with |
value
TAngle< T > & BALL::TAngle< T >::operator= | ( | const TAngle< T > & | angle | ) |
TAngle< T > & BALL::TAngle< T >::operator= | ( | const T & | new_value | ) |
bool BALL::TAngle< T >::operator== | ( | const TAngle< T > & | angle | ) | const |
Equality operator. This test uses Maths::isEqual instead of comparing the values directly.
angle | the angle to compare with |
bool BALL::TAngle< T >::operator> | ( | const TAngle< T > & | angle | ) | const |
Is greater operator. This test uses Maths::isGreater instead of comparing the values directly.
angle | the angle to compare with |
value
bool BALL::TAngle< T >::operator>= | ( | const TAngle< T > & | angle | ) | const |
Is greater or equal operator. This test uses Maths::isGreaterOrEqual instead of comparing the values directly.
angle | the angle to compare with |
value
void BALL::TAngle< T >::set | ( | const T & | new_value, |
bool | radian = true |
||
) |
void BALL::TAngle< T >::set | ( | const TAngle< T > & | angle | ) |
void BALL::TAngle< T >::swap | ( | TAngle< T > & | angle | ) |
T BALL::TAngle< T >::toDegree | ( | ) | const |
|
static |
T BALL::TAngle< T >::toRadian | ( | ) | const |
|
static |
T BALL::TAngle< T >::value |