#include <angle.h>
Inheritance diagram for geometric::angle< contents >:


Public Types | |
| enum | angular_units { DEGREES, RADIANS } |
| angles can be measured in degrees or radians in this class. More... | |
Public Member Functions | |
| angle (contents inital_rotation=0, angular_units unit=RADIANS) | |
| constructs a new angle with "initial_rotation" in the "unit". | |
| void | set (contents a, angular_units unit) |
| sets the angle to a new rotation "a" in the "unit". | |
| contents | get (angular_units unit) const |
| retrieves the current angular measure. | |
| angle | operator- (void) const |
| returns the negation of this angle. | |
| angle | operator+ (const angle &to_add) const |
| angle | operator- (const angle &to_subtract) const |
| angle | operator * (contents to_multiply) const |
| angle | operator/ (contents to_divide) const |
| angle & | operator+= (const angle &to_add) |
| angle & | operator-= (const angle &to_subtract) |
| angle & | operator *= (contents to_multiply) |
| angle & | operator/= (contents to_divide) |
| contents | sine () const |
| returns the sin function of this angle. | |
| contents | cosine () const |
| returns the cos function of this angle. | |
| contents | tangent () const |
| returns the tan function of this angle. | |
| virtual void | pack (byte_array &packed_form) const |
| packs the angle for shipping in bytes. | |
| virtual bool | unpack (byte_array &packed_form) |
| unpacks the angle from the "packed_form". | |
Static Public Member Functions | |
| static angle | arctangent (contents opposite, contents adjacent, outcome &retval) |
| returns the atan of the angle. | |
| static angle | arccosine (contents adjacent, contents hypotenuse, outcome &retval) |
| returns the acos of the angle. | |
| static angle | arcsine (contents opposite, contents hypotenuse, outcome &retval) |
| returns the asin of the angle. | |
Definition at line 25 of file angle.h.
| enum geometric::angle::angular_units |
| geometric::angle< contents >::angle | ( | contents | inital_rotation = 0, |
|
| angular_units | unit = RADIANS | |||
| ) |
constructs a new angle with "initial_rotation" in the "unit".
Definition at line 28 of file angle.cpp.
References geometric::angle< contents >::set().
| void geometric::angle< contents >::set | ( | contents | a, | |
| angular_units | unit | |||
| ) |
sets the angle to a new rotation "a" in the "unit".
Definition at line 108 of file angle.cpp.
Referenced by geometric::angle< contents >::angle().
| contents geometric::angle< contents >::get | ( | angular_units | unit | ) | const |
retrieves the current angular measure.
Definition at line 112 of file angle.cpp.
Referenced by geometric::ellipse::location(), and geometric::circle::location().
| angle< contents > geometric::angle< contents >::operator- | ( | void | ) | const |
| angle< contents > geometric::angle< contents >::operator+ | ( | const angle< contents > & | to_add | ) | const |
| angle< contents > geometric::angle< contents >::operator- | ( | const angle< contents > & | to_subtract | ) | const |
| angle< contents > geometric::angle< contents >::operator * | ( | contents | to_multiply | ) | const |
| angle< contents > geometric::angle< contents >::operator/ | ( | contents | to_divide | ) | const |
| angle< contents > & geometric::angle< contents >::operator+= | ( | const angle< contents > & | to_add | ) |
| angle< contents > & geometric::angle< contents >::operator-= | ( | const angle< contents > & | to_subtract | ) |
| angle< contents > & geometric::angle< contents >::operator *= | ( | contents | to_multiply | ) |
| angle< contents > & geometric::angle< contents >::operator/= | ( | contents | to_divide | ) |
| contents geometric::angle< contents >::sine | ( | ) | const |
returns the sin function of this angle.
Definition at line 71 of file angle.cpp.
Referenced by geometric::point< numeric_type >::rotate(), and geometric::point< numeric_type >::set().
| contents geometric::angle< contents >::cosine | ( | ) | const |
returns the cos function of this angle.
Definition at line 74 of file angle.cpp.
Referenced by geometric::point< numeric_type >::rotate(), and geometric::point< numeric_type >::set().
| contents geometric::angle< contents >::tangent | ( | ) | const |
returns the tan function of this angle.
Definition at line 77 of file angle.cpp.
Referenced by geometric::ellipse::location().
| angle< contents > geometric::angle< contents >::arctangent | ( | contents | opposite, | |
| contents | adjacent, | |||
| outcome & | retval | |||
| ) | [static] |
returns the atan of the angle.
the outcome will be set to OKAY if the function operated successfully. otherwise it will be set to BAD_INPUT.
Definition at line 138 of file angle.cpp.
References common::BAD_INPUT, and common::OKAY.
| angle< contents > geometric::angle< contents >::arccosine | ( | contents | adjacent, | |
| contents | hypotenuse, | |||
| outcome & | retval | |||
| ) | [static] |
returns the acos of the angle.
Definition at line 116 of file angle.cpp.
References common::BAD_INPUT, bounds_return, and common::OKAY.
| angle< contents > geometric::angle< contents >::arcsine | ( | contents | opposite, | |
| contents | hypotenuse, | |||
| outcome & | retval | |||
| ) | [static] |
returns the asin of the angle.
Definition at line 127 of file angle.cpp.
References common::BAD_INPUT, bounds_return, and common::OKAY.
| void geometric::angle< contents >::pack | ( | byte_array & | packed_form | ) | const [virtual] |
packs the angle for shipping in bytes.
Implements packable.
Definition at line 80 of file angle.cpp.
References basis::attach().
| bool geometric::angle< contents >::unpack | ( | byte_array & | packed_form | ) | [virtual] |
unpacks the angle from the "packed_form".
Implements packable.
Definition at line 84 of file angle.cpp.
References basis::detach().
1.5.1