Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Kodu::KoduActionMotion Class Reference

Kodu Action Motion (derived from Kodu Action). More...

#include <KoduActionMotion.h>

Inheritance diagram for Kodu::KoduActionMotion:

Detailed Description

Kodu Action Motion (derived from Kodu Action).

Definition at line 91 of file KoduActionMotion.h.

List of all members.

Public Types

enum  MotionType_t {
  MT_MOVE_WANDER = 1L << 0, MT_MOVE_FORWARD = 1L << 1, MT_MOVE_TOWARDS = 1L << 2, MT_EMPTY_MOTION_TYPE = 1L << 3,
  MT_TURN_DIRECTION = 1L << 4, MT_TURN_LEFT = 1L << 5, MT_TURN_RIGHT = 1L << 6, MT_MOVE_GAMEPAD = 1L << 7
}
 

The different types of move and turn movements.

More...
enum  MotionRate_t { MR_NORMAL = 1L << 0, MR_QUICKLY = 1L << 1, MR_SLOWLY = 1L << 2 }
 

Helps set the speed of a particular motion type.

More...

Public Member Functions

 KoduActionMotion (MotionType_t type, MotionRate_t rate, unsigned int motionMagCount)
 Constructor #1.
 KoduActionMotion (Direction_t direction, MotionRate_t rate, unsigned int motionMagCount)
 Constructor #2.
 KoduActionMotion (const KoduActionMotion &kAction)
 Copy constructor.
 ~KoduActionMotion ()
 Destructor.
KoduActionMotionoperator= (const KoduActionMotion &kAction)
 Assignment operator.
const MotionCommand getMotionCommand ()
 Returns the motion command.
MotionType_t getMotionType () const
 Returns the motion type.
bool motionTypeIsMove () const
 Returns true if the motion type (action) is "move".
bool motionTypeIsTurn () const
 Returns true if the motion type (action) is "turn".
virtual void reinitialize ()
 Used to reinitialize certain variables (e.g. when switching to another page).

Private Attributes

MotionType_t motionType
 States what type of movement the robot will do.
NumericGenerator angleGen
 Used to generate constant or random angle values.
NumericGenerator distGen
 Used to generate constant or random distance values.
Direction_t directionToFace
 The direction the robot wants to face (north, west, etc.).

Member Enumeration Documentation

Helps set the speed of a particular motion type.

Enumerator:
MR_NORMAL 
MR_QUICKLY 
MR_SLOWLY 

Definition at line 106 of file KoduActionMotion.h.

The different types of move and turn movements.

Enumerator:
MT_MOVE_WANDER 
MT_MOVE_FORWARD 
MT_MOVE_TOWARDS 
MT_EMPTY_MOTION_TYPE 
MT_TURN_DIRECTION 
MT_TURN_LEFT 
MT_TURN_RIGHT 
MT_MOVE_GAMEPAD 

Definition at line 94 of file KoduActionMotion.h.


Constructor & Destructor Documentation

Kodu::KoduActionMotion::KoduActionMotion ( MotionType_t  type,
MotionRate_t  rate,
unsigned int  motionMagCount 
)

Constructor #1.

================================= Kodu Action Motion ================================= ///

Definition at line 127 of file KoduActionMotion.cc.

Kodu::KoduActionMotion::KoduActionMotion ( Direction_t  direction,
MotionRate_t  rate,
unsigned int  motionMagCount 
)

Constructor #2.

Definition at line 151 of file KoduActionMotion.cc.

Kodu::KoduActionMotion::KoduActionMotion ( const KoduActionMotion kAction  ) 

Copy constructor.

Definition at line 160 of file KoduActionMotion.cc.

Kodu::KoduActionMotion::~KoduActionMotion (  ) 

Destructor.

Definition at line 169 of file KoduActionMotion.cc.


Member Function Documentation

const MotionCommand Kodu::KoduActionMotion::getMotionCommand (  ) 

Returns the motion command.

Definition at line 185 of file KoduActionMotion.cc.

KoduActionMotion::MotionType_t Kodu::KoduActionMotion::getMotionType (  )  const

Returns the motion type.

Definition at line 280 of file KoduActionMotion.cc.

bool Kodu::KoduActionMotion::motionTypeIsMove (  )  const

Returns true if the motion type (action) is "move".

Definition at line 284 of file KoduActionMotion.cc.

bool Kodu::KoduActionMotion::motionTypeIsTurn (  )  const

Returns true if the motion type (action) is "turn".

Definition at line 288 of file KoduActionMotion.cc.

KoduActionMotion & Kodu::KoduActionMotion::operator= ( const KoduActionMotion kAction  ) 

Assignment operator.

Definition at line 174 of file KoduActionMotion.cc.

void Kodu::KoduActionMotion::reinitialize (  )  [virtual]

Used to reinitialize certain variables (e.g. when switching to another page).

Reimplemented from Kodu::KoduAction.

Definition at line 292 of file KoduActionMotion.cc.


Member Data Documentation

Used to generate constant or random angle values.

Definition at line 147 of file KoduActionMotion.h.

Referenced by getMotionCommand(), KoduActionMotion(), and operator=().

The direction the robot wants to face (north, west, etc.).

Definition at line 153 of file KoduActionMotion.h.

Referenced by getMotionCommand(), and operator=().

Used to generate constant or random distance values.

Definition at line 150 of file KoduActionMotion.h.

Referenced by getMotionCommand(), KoduActionMotion(), and operator=().

States what type of movement the robot will do.

Definition at line 144 of file KoduActionMotion.h.

Referenced by getMotionCommand(), getMotionType(), motionTypeIsMove(), motionTypeIsTurn(), and operator=().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:23 2016 by Doxygen 1.6.3