Angle Class Reference

Models an angle (in degree and / or radian). More...

#include <Angle.h>

Inheritance diagram for Angle:

Object

List of all members.

Public Member Functions

 Angle ()
 Standard constructor.
 Angle (const Angle &a)
 Copy constructor.
 Angle (const GLfloat &a, const enum angleType &currentAngleType)
 Constructor for initializing by value.
const GLfloat getRad () const
 Returns the angle in radian.
const GLfloat getDeg () const
 Returns the angle in degree.
void setRad (const GLfloat &a)
 Sets the angle in radian.
void setDeg (const GLfloat &a)
 Sets the angle in degree.
virtual string toString () const
 Returns a textual representation.
virtual string className () const
 Returns the class name of the object.
virtual enum classId classId () const
 Returns the class id of the object.
Angle operator= (const Angle &a)
Angle operator+= (const Angle &a)
Angle operator-= (const Angle &a)
bool operator== (const Angle &a)
bool operator!= (const Angle &a)
bool operator< (const Angle &a)
bool operator> (const Angle &a)
bool operator<= (const Angle &a)
bool operator>= (const Angle &a)

Private Attributes

GLfloat angle
 The angle in radian.

Friends

Angle operator- (const Angle &a)
Angle operator+ (const Angle &a1, const Angle &a2)
Angle operator- (const Angle &a1, const Angle &a2)
Angle operator* (const Angle &s, const float &a)
Angle operator* (const float &a, const Angle &s)
Angle operator/ (const Angle &s, const float &a)
Angle operator/ (const float &a, const Angle &s)


Detailed Description

Models an angle (in degree and / or radian).

Provides basic mathematical angle functionality i.e. switch between degree (0..360) and radian (0..2*PI)


Constructor & Destructor Documentation

Angle::Angle (  ) 

Standard constructor.

Standard Constructor sets angle to 0.0

Angle::Angle ( const Angle a  ) 

Copy constructor.

Constructor for initialization by reference

Parameters:
a The Angle that is copied

Angle::Angle ( const GLfloat &  a,
const enum angleType currentAngleType 
)

Constructor for initializing by value.

Constructor for initialization by value

Parameters:
a The value
currentAngleType The type of the value (either DEGREE or RADIANCE)


Member Function Documentation

const GLfloat Angle::getRad (  )  const

Returns the angle in radian.

Returns:
the angle in radian

const GLfloat Angle::getDeg (  )  const

Returns the angle in degree.

Returns:
The angle in degree

void Angle::setRad ( const GLfloat &  a  ) 

Sets the angle in radian.

Sets the angle in radian

Parameters:
a The value (in radiance)

void Angle::setDeg ( const GLfloat &  a  ) 

Sets the angle in degree.

Sets the angle in degree

Parameters:
a The value (in degree)

string Angle::toString (  )  const [virtual]

Returns a textual representation.

Returns:
a string descriping the run-time object

Reimplemented from Object.

string Angle::className (  )  const [virtual]

Returns the class name of the object.

Returns:
a string with the name of the object's class

Reimplemented from Object.

enum classId Angle::classId (  )  const [virtual]

Returns the class id of the object.

Returns:
an id of the object's class

Reimplemented from Object.

Angle Angle::operator= ( const Angle a  )  [inline]

Angle Angle::operator+= ( const Angle a  )  [inline]

Angle Angle::operator-= ( const Angle a  )  [inline]

bool Angle::operator== ( const Angle a  )  [inline]

bool Angle::operator!= ( const Angle a  )  [inline]

bool Angle::operator< ( const Angle a  )  [inline]

bool Angle::operator> ( const Angle a  )  [inline]

bool Angle::operator<= ( const Angle a  )  [inline]

bool Angle::operator>= ( const Angle a  )  [inline]


Friends And Related Function Documentation

Angle operator- ( const Angle a  )  [friend]

Angle operator+ ( const Angle a1,
const Angle a2 
) [friend]

Angle operator- ( const Angle a1,
const Angle a2 
) [friend]

Angle operator* ( const Angle s,
const float &  a 
) [friend]

Angle operator* ( const float &  a,
const Angle s 
) [friend]

Angle operator/ ( const Angle s,
const float &  a 
) [friend]

Angle operator/ ( const float &  a,
const Angle s 
) [friend]


Member Data Documentation

GLfloat Angle::angle [private]

The angle in radian.


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

Generated on Mon Jul 7 13:30:33 2008 for Firefly by  doxygen 1.5.6