angle Class Reference

Abstraction of the concept of an angle. More...

#include <ETL/angle>

Inheritance diagram for angle:

angle::cos angle::deg angle::rad angle::rot angle::sin angle::tan List of all members.

Public Types

typedef float value_type

Public Member Functions

const angleoperator+= (const angle &rhs)
 Stored in rotations.
const angleoperator-= (const angle &rhs)
const angleoperator *= (const unit &rhs)
const angleoperator/= (const unit &rhs)
angle operator+ (const angle &rhs) const
 Angle Addition Operator.
angle operator- (const angle &rhs) const
 Angle Subtraction Operator.
angle operator * (const unit &rhs) const
 Angle Scalar Multiplication Operator.
angle operator/ (const unit &rhs) const
angle operator- () const
 Angle Negation.
angle operator~ () const
 180 degree rotation operator
bool operator< (const angle &rhs) const
bool operator> (const angle &rhs) const
bool operator<= (const angle &rhs) const
bool operator>= (const angle &rhs) const
bool operator== (const angle &rhs) const
bool operator!= (const angle &rhs) const
angle dist (const angle &rhs) const
 Angle Difference Function.
angle mod () const
 Rotation Modulus.
bool operator! () const

Static Public Member Functions

static angle zero ()
static angle one ()
static angle half ()

Protected Types

typedef value_type unit

Protected Attributes

unit v

Static Private Member Functions

static value_type rot_floor (value_type x)

Friends

class rad
class deg
class rot
class sin
class cos
class tan

Classes

class  cos
 Angle representation as a cosine function. More...
class  deg
 Angle representation in degrees. More...
class  rad
 Angle representation in radians. More...
class  rot
 Angle representation in rotations. More...
class  sin
 Angle representation as a sine function. More...
class  tan
 Angle representation as a tangent function. More...

Detailed Description

Abstraction of the concept of an angle.

See also:
angle::deg, angle::rad, angle::rot, angle::sin, angle::cos, angle::tan, fastangle
Todo:
This needs to be documented

Definition at line 54 of file _angle.h.


Member Typedef Documentation

typedef float angle::value_type

Definition at line 57 of file _angle.h.

typedef value_type angle::unit [protected]

Definition at line 60 of file _angle.h.


Member Function Documentation

const angle& angle::operator+= ( const angle rhs  )  [inline]

Stored in rotations.

Definition at line 71 of file _angle.h.

References v.

const angle& angle::operator-= ( const angle rhs  )  [inline]

Definition at line 75 of file _angle.h.

References v.

const angle& angle::operator *= ( const unit rhs  )  [inline]

Definition at line 79 of file _angle.h.

References v.

const angle& angle::operator/= ( const unit rhs  )  [inline]

Definition at line 83 of file _angle.h.

References v.

angle angle::operator+ ( const angle rhs  )  const [inline]

Angle Addition Operator.

Definition at line 88 of file _angle.h.

angle angle::operator- ( const angle rhs  )  const [inline]

Angle Subtraction Operator.

See also:
angle dist(const angle &)

Definition at line 94 of file _angle.h.

angle angle::operator * ( const unit rhs  )  const [inline]

Angle Scalar Multiplication Operator.

This operator will multiply the given angle by the given scalar value.

Definition at line 101 of file _angle.h.

angle angle::operator/ ( const unit rhs  )  const [inline]

Definition at line 105 of file _angle.h.

angle angle::operator- (  )  const [inline]

Angle Negation.

Definition at line 110 of file _angle.h.

References v.

angle angle::operator~ (  )  const [inline]

180 degree rotation operator

Returns the angle directly opposite of the given angle, and will yield a result between 0 and 2PI

Definition at line 122 of file _angle.h.

References f, floor(), and v.

bool angle::operator< ( const angle rhs  )  const [inline]

Returns true if the shortest angle between the left-hand and right-hand side is clockwise

Definition at line 133 of file _angle.h.

References v.

bool angle::operator> ( const angle rhs  )  const [inline]

Returns true if the shortest angle between the left-hand and right-hand side is counter-clockwise

Definition at line 141 of file _angle.h.

References v.

bool angle::operator<= ( const angle rhs  )  const [inline]

Returns true if the shortest angle between the left-hand and right-hand side is clockwise, or if the angles are refer to the same point on the unit circle.

Definition at line 151 of file _angle.h.

References v.

bool angle::operator>= ( const angle rhs  )  const [inline]

Returns true if the shortest angle between the left-hand and right-hand side is counter-clockwise, or if the angles are refer to the same point on the unit circle.

Definition at line 161 of file _angle.h.

References v.

bool angle::operator== ( const angle rhs  )  const [inline]

Returns true if the angles are refer to the same point on the unit circle.

Definition at line 169 of file _angle.h.

References v.

bool angle::operator!= ( const angle rhs  )  const [inline]

Returns false if the angles are refer to the same point on the unit circle.

Definition at line 177 of file _angle.h.

References v.

angle angle::dist ( const angle rhs  )  const [inline]

Angle Difference Function.

This function will return the shortest physical distance between two angles, from -PI/2 to PI/2

See also:
angle operator-(const angle &)

Reimplemented in angle::rad, angle::deg, angle::rot, angle::sin, angle::cos, and angle::tan.

Definition at line 187 of file _angle.h.

References PI, rot_floor(), and v.

Referenced by angle::tan::dist(), angle::cos::dist(), angle::sin::dist(), angle::rot::dist(), angle::deg::dist(), and angle::rad::dist().

angle angle::mod (  )  const [inline]

Rotation Modulus.

This function will return the value of the angle between 0 and 2PI

Reimplemented in angle::rad, angle::deg, angle::rot, angle::sin, angle::cos, and angle::tan.

Definition at line 202 of file _angle.h.

References rot_floor(), and v.

Referenced by angle::tan::mod(), angle::cos::mod(), angle::sin::mod(), angle::rot::mod(), angle::deg::mod(), and angle::rad::mod().

static angle angle::zero (  )  [inline, static]

Definition at line 210 of file _angle.h.

References v.

static angle angle::one (  )  [inline, static]

Definition at line 218 of file _angle.h.

References PI, and v.

static angle angle::half (  )  [inline, static]

Definition at line 226 of file _angle.h.

References PI, and v.

bool angle::operator! (  )  const [inline]

Definition at line 233 of file _angle.h.

References v.

static value_type angle::rot_floor ( value_type  x  )  [inline, static, private]

Definition at line 237 of file _angle.h.

References floor(), and PI.

Referenced by dist(), and mod().


Friends And Related Function Documentation

friend class rad [friend]

Definition at line 255 of file _angle.h.

friend class deg [friend]

Definition at line 262 of file _angle.h.

friend class rot [friend]

Definition at line 263 of file _angle.h.

friend class sin [friend]

Definition at line 264 of file _angle.h.

friend class cos [friend]

Definition at line 265 of file _angle.h.

friend class tan [friend]

Definition at line 266 of file _angle.h.


Member Data Documentation

unit angle::v [protected]

Definition at line 62 of file _angle.h.

Referenced by angle::cos::cos(), angle::deg::deg(), dist(), angle::tan::get(), angle::sin::get(), angle::rot::get(), angle::deg::get(), angle::rad::get(), half(), mod(), one(), operator *=(), operator!(), operator!=(), operator+=(), operator-(), operator-=(), operator/=(), operator<(), operator<=(), operator==(), operator>(), operator>=(), operator~(), angle::rad::rad(), angle::rot::rot(), angle::sin::sin(), angle::tan::tan(), and zero().


The documentation for this class was generated from the following file:
Generated on Fri Nov 3 21:07:28 2006 for ETL by  doxygen 1.4.7