ARGoS  3
A parallel, multi-engine simulator for swarm robotics
argos::CDegrees Class Reference

It defines the basic type CDegrees, used to store an angle value in degrees. More...

#include <angles.h>

List of all members.

Public Member Functions

 CDegrees ()
 Class constructor It initializes m_fValue to 0 degrees.
 CDegrees (Real f_value)
 Class constructor It initializes m_fValue to the passed value.
void FromValueInRadians (Real f_value)
 Sets the value from a value in radians It sets m_fValue (which is in degrees) converting from the passed value in radians.
void FromValueInAseba (SInt16 n_value)
 Sets the value from a value in Aseba format It sets m_fValue (which is in degrees) converting from the passed value in Aseba format.
Real GetValue () const
 Returns the value in degrees.
void SetValue (Real f_value)
 Sets the value in degrees.
CDegreesSignedNormalize ()
 Normalizes the value in the range [-180:180].
CDegreesUnsignedNormalize ()
 Normalizes the value in the range [0:360].
CDegreesoperator+ ()
CDegrees operator- () const
CDegreesoperator+= (const CDegrees &c_degrees)
CDegreesoperator-= (const CDegrees &c_degrees)
CDegreesoperator*= (Real f_value)
CDegreesoperator/= (Real f_value)
CDegrees operator+ (const CDegrees &c_degrees) const
CDegrees operator- (const CDegrees &c_degrees) const
CDegrees operator* (Real f_value) const
Real operator/ (const CDegrees &c_degrees) const
CDegrees operator/ (Real f_value) const
bool operator< (const CDegrees &c_degrees) const
bool operator<= (const CDegrees &c_degrees) const
bool operator> (const CDegrees &c_degrees) const
bool operator>= (const CDegrees &c_degrees) const
bool operator== (const CDegrees &c_degrees) const
bool operator!= (const CDegrees &c_degrees) const

Friends

CDegrees operator* (Real f_value, const CDegrees &c_degrees)
CRadians ToRadians (const CDegrees &c_degrees)
 Converts this object to CRadians.
std::ostream & operator<< (std::ostream &c_os, const CDegrees &c_degrees)
std::istream & operator>> (std::istream &is, CDegrees &c_degrees)

Detailed Description

It defines the basic type CDegrees, used to store an angle value in degrees.

Definition at line 295 of file angles.h.


Constructor & Destructor Documentation

Class constructor It initializes m_fValue to 0 degrees.

Definition at line 303 of file angles.h.

argos::CDegrees::CDegrees ( Real  f_value) [inline, explicit]

Class constructor It initializes m_fValue to the passed value.

Parameters:
f_valuethe wanted value in degrees

Definition at line 312 of file angles.h.


Member Function Documentation

void argos::CDegrees::FromValueInAseba ( SInt16  n_value) [inline]

Sets the value from a value in Aseba format It sets m_fValue (which is in degrees) converting from the passed value in Aseba format.

Parameters:
n_valuea value in Aseba format

Definition at line 330 of file angles.h.

void argos::CDegrees::FromValueInRadians ( Real  f_value) [inline]

Sets the value from a value in radians It sets m_fValue (which is in degrees) converting from the passed value in radians.

Parameters:
f_valuea value in radians

Definition at line 321 of file angles.h.

Real argos::CDegrees::GetValue ( ) const [inline]

Returns the value in degrees.

Returns:
the value in degrees

Definition at line 338 of file angles.h.

bool argos::CDegrees::operator!= ( const CDegrees c_degrees) const [inline]

Definition at line 453 of file angles.h.

CDegrees argos::CDegrees::operator* ( Real  f_value) const [inline]

Definition at line 410 of file angles.h.

CDegrees& argos::CDegrees::operator*= ( Real  f_value) [inline]

Definition at line 388 of file angles.h.

CDegrees& argos::CDegrees::operator+ ( ) [inline]

Definition at line 370 of file angles.h.

CDegrees argos::CDegrees::operator+ ( const CDegrees c_degrees) const [inline]

Definition at line 398 of file angles.h.

CDegrees& argos::CDegrees::operator+= ( const CDegrees c_degrees) [inline]

Definition at line 378 of file angles.h.

CDegrees argos::CDegrees::operator- ( ) const [inline]

Definition at line 374 of file angles.h.

CDegrees argos::CDegrees::operator- ( const CDegrees c_degrees) const [inline]

Definition at line 404 of file angles.h.

CDegrees& argos::CDegrees::operator-= ( const CDegrees c_degrees) [inline]

Definition at line 383 of file angles.h.

Real argos::CDegrees::operator/ ( const CDegrees c_degrees) const [inline]

Definition at line 423 of file angles.h.

CDegrees argos::CDegrees::operator/ ( Real  f_value) const [inline]

Definition at line 427 of file angles.h.

CDegrees& argos::CDegrees::operator/= ( Real  f_value) [inline]

Definition at line 393 of file angles.h.

bool argos::CDegrees::operator< ( const CDegrees c_degrees) const [inline]

Definition at line 433 of file angles.h.

bool argos::CDegrees::operator<= ( const CDegrees c_degrees) const [inline]

Definition at line 437 of file angles.h.

bool argos::CDegrees::operator== ( const CDegrees c_degrees) const [inline]

Definition at line 449 of file angles.h.

bool argos::CDegrees::operator> ( const CDegrees c_degrees) const [inline]

Definition at line 441 of file angles.h.

bool argos::CDegrees::operator>= ( const CDegrees c_degrees) const [inline]

Definition at line 445 of file angles.h.

void argos::CDegrees::SetValue ( Real  f_value) [inline]

Sets the value in degrees.

Parameters:
f_valuethe wanted value in degrees

Definition at line 346 of file angles.h.

Normalizes the value in the range [-180:180].

Returns:
A reference to the current object
See also:
CRange

Definition at line 355 of file angles.h.

Normalizes the value in the range [0:360].

Returns:
A reference to the current object
See also:
CRange

Definition at line 365 of file angles.h.


Friends And Related Function Documentation

CDegrees operator* ( Real  f_value,
const CDegrees c_degrees 
) [friend]

Definition at line 416 of file angles.h.

std::ostream& operator<< ( std::ostream &  c_os,
const CDegrees c_degrees 
) [friend]

Definition at line 463 of file angles.h.

std::istream& operator>> ( std::istream &  is,
CDegrees c_degrees 
) [friend]

Definition at line 471 of file angles.h.

CRadians ToRadians ( const CDegrees c_degrees) [friend]

Converts this object to CRadians.

Returns:
the conversion of m_fValue into CRadians
Parameters:
c_degreesthe object to convert
Returns:
the converted CRadians object

Definition at line 504 of file angles.h.


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