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

It defines the basic type CRadians, used to store an angle value in radians. More...

#include <angles.h>

List of all members.

Public Member Functions

 CRadians ()
 Class constructor It initializes m_fValue to 0 radians.
 CRadians (Real f_value)
 Class constructor It initializes m_fValue to the passed value.
void FromValueInDegrees (Real f_value)
 Sets the value from a value in degrees It sets m_fValue (which is in radians) converting from the passed value in degrees.
void FromValueInAseba (SInt16 n_value)
 Sets the value from a value in Aseba format It sets m_fValue (which is in radians) converting from the passed value in Aseba format.
Real GetValue () const
 Returns the value in radians.
Real GetAbsoluteValue () const
 Returns the absolute value in radians.
void SetValue (Real f_value)
 Sets the value in radians.
CRadiansSignedNormalize ()
 Normalizes the value in the range [-PI:PI].
CRadiansUnsignedNormalize ()
 Normalizes the value in the range [0:TWO_PI].
CRadiansNegate ()
CRadiansoperator+ ()
CRadians operator- () const
CRadiansoperator+= (const CRadians &c_radians)
CRadiansoperator-= (const CRadians &c_radians)
CRadiansoperator*= (Real f_value)
CRadiansoperator/= (Real f_value)
CRadians operator+ (const CRadians &c_radians) const
CRadians operator- (const CRadians &c_radians) const
CRadians operator* (Real f_value) const
Real operator/ (const CRadians &c_radians) const
CRadians operator/ (Real f_value) const
bool operator< (const CRadians &c_radians) const
bool operator<= (const CRadians &c_radians) const
bool operator> (const CRadians &c_radians) const
bool operator>= (const CRadians &c_radians) const
bool operator== (const CRadians &c_radians) const
bool operator!= (const CRadians &c_radians) const

Static Public Attributes

static const CRadians PI
 The PI constant.
static const CRadians TWO_PI
 Set to PI * 2.
static const CRadians PI_OVER_TWO
 Set to PI / 2.
static const CRadians PI_OVER_THREE
 Set to PI / 3.
static const CRadians PI_OVER_FOUR
 Set to PI / 4.
static const CRadians PI_OVER_SIX
 Set to PI / 6.
static const CRadians ZERO
 Set to zero radians.
static const CRange< CRadiansSIGNED_RANGE
 The signed normalization range [-PI:PI].
static const CRange< CRadiansUNSIGNED_RANGE
 The unsigned normalization range [0:TWO_PI].
static const CRange< SInt32ASEBA_RANGE
 The Aseba normalization range [-32768:32767].
static const Real RADIANS_TO_DEGREES
 Constant to convert from radians to degrees.

Friends

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

Detailed Description

It defines the basic type CRadians, used to store an angle value in radians.

Definition at line 42 of file angles.h.


Constructor & Destructor Documentation

Class constructor It initializes m_fValue to 0 radians.

Definition at line 85 of file angles.h.

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

Class constructor It initializes m_fValue to the passed value.

Parameters:
f_valuethe wanted value in radians

Definition at line 94 of file angles.h.


Member Function Documentation

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

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

Parameters:
n_valuea value in Aseba format

Definition at line 112 of file angles.h.

void argos::CRadians::FromValueInDegrees ( Real  f_value) [inline]

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

Parameters:
f_valuea value in degrees

Definition at line 103 of file angles.h.

Returns the absolute value in radians.

Returns:
the absolute value in radians

Definition at line 128 of file angles.h.

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

Returns the value in radians.

Returns:
the value in radians

Definition at line 120 of file angles.h.

Definition at line 162 of file angles.h.

bool argos::CRadians::operator!= ( const CRadians c_radians) const [inline]

Definition at line 250 of file angles.h.

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

Definition at line 207 of file angles.h.

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

Definition at line 185 of file angles.h.

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

Definition at line 167 of file angles.h.

CRadians argos::CRadians::operator+ ( const CRadians c_radians) const [inline]

Definition at line 195 of file angles.h.

CRadians& argos::CRadians::operator+= ( const CRadians c_radians) [inline]

Definition at line 175 of file angles.h.

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

Definition at line 171 of file angles.h.

CRadians argos::CRadians::operator- ( const CRadians c_radians) const [inline]

Definition at line 201 of file angles.h.

CRadians& argos::CRadians::operator-= ( const CRadians c_radians) [inline]

Definition at line 180 of file angles.h.

Real argos::CRadians::operator/ ( const CRadians c_radians) const [inline]

Definition at line 220 of file angles.h.

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

Definition at line 224 of file angles.h.

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

Definition at line 190 of file angles.h.

bool argos::CRadians::operator< ( const CRadians c_radians) const [inline]

Definition at line 230 of file angles.h.

bool argos::CRadians::operator<= ( const CRadians c_radians) const [inline]

Definition at line 234 of file angles.h.

bool argos::CRadians::operator== ( const CRadians c_radians) const [inline]

Definition at line 246 of file angles.h.

bool argos::CRadians::operator> ( const CRadians c_radians) const [inline]

Definition at line 238 of file angles.h.

bool argos::CRadians::operator>= ( const CRadians c_radians) const [inline]

Definition at line 242 of file angles.h.

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

Sets the value in radians.

Parameters:
f_valuethe wanted value in radians

Definition at line 136 of file angles.h.

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

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

Definition at line 146 of file angles.h.

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

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

Definition at line 157 of file angles.h.


Friends And Related Function Documentation

CRadians operator* ( Real  f_value,
const CRadians c_radians 
) [friend]

Definition at line 213 of file angles.h.

std::ostream& operator<< ( std::ostream &  c_os,
const CRadians c_radians 
) [friend]

Definition at line 260 of file angles.h.

std::istream& operator>> ( std::istream &  is,
CRadians c_radians 
) [friend]

Definition at line 271 of file angles.h.

CDegrees ToDegrees ( const CRadians c_radians) [friend]

Converts this object to CDegrees.

Returns:
the conversion of m_fValue into CDegrees
Parameters:
c_radiansthe object to convert
Returns:
the converted CDegrees object

Definition at line 495 of file angles.h.


Member Data Documentation

The Aseba normalization range [-32768:32767].

Definition at line 281 of file angles.h.

const CRadians argos::CRadians::PI [static]

The PI constant.

Definition at line 49 of file angles.h.

Set to PI / 4.

Definition at line 69 of file angles.h.

Set to PI / 6.

Definition at line 74 of file angles.h.

Set to PI / 3.

Definition at line 64 of file angles.h.

Set to PI / 2.

Definition at line 59 of file angles.h.

Constant to convert from radians to degrees.

Definition at line 282 of file angles.h.

The signed normalization range [-PI:PI].

Definition at line 279 of file angles.h.

Set to PI * 2.

Definition at line 54 of file angles.h.

The unsigned normalization range [0:TWO_PI].

Definition at line 280 of file angles.h.

Set to zero radians.

Definition at line 79 of file angles.h.


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