#include <AbstractMotionReceiver.h>


Public Member Functions | |
| AbstractMotionReceiver () | |
| virtual | ~AbstractMotionReceiver () |
| bool | addObserver (IMotionObserver *obs) |
| bool | removeObserver (IMotionObserver *obs) |
| void | notify (const Vector3d &v) |
| virtual void | start ()=0 |
| virtual void | run ()=0 |
| virtual void | stop ()=0 |
| const bool | isRunning () const |
Protected Member Functions | |
| void | setRunning (const bool run) |
Interface for receiving motion events (from a wiimote or such)
Definition at line 13 of file AbstractMotionReceiver.h.
| AbstractMotionReceiver::AbstractMotionReceiver | ( | ) |
Inits m_run with false, should be called by every child of AbstractMotionReceiver
Definition at line 7 of file AbstractMotionReceiver.cpp.
| AbstractMotionReceiver::~AbstractMotionReceiver | ( | ) | [virtual] |
does nothing so far
Definition at line 12 of file AbstractMotionReceiver.cpp.
| bool AbstractMotionReceiver::addObserver | ( | IMotionObserver * | obs | ) |
Observer Pattern:
Adds observer to internal list
Definition at line 19 of file AbstractMotionReceiver.cpp.
| const bool AbstractMotionReceiver::isRunning | ( | ) | const [inline] |
Definition at line 60 of file AbstractMotionReceiver.h.
| void AbstractMotionReceiver::notify | ( | const Vector3d & | v | ) |
Observer Pattern: Notifies all Observers in List - children should call this in their run-methods
| v | Vector containing motion data |
Definition at line 39 of file AbstractMotionReceiver.cpp.
| bool AbstractMotionReceiver::removeObserver | ( | IMotionObserver * | obs | ) |
Observer Pattern: Removes observer from internal list
Definition at line 29 of file AbstractMotionReceiver.cpp.
| virtual void AbstractMotionReceiver::run | ( | ) | [pure virtual] |
motion grabbing happens here
Implemented in CWiidMotionReceiver, RandomMotionReceiver, and WiiuseMotionReceiver.
| void AbstractMotionReceiver::setRunning | ( | const bool | run | ) | [inline, protected] |
| run | true if run should run, false if not |
Definition at line 66 of file AbstractMotionReceiver.h.
| virtual void AbstractMotionReceiver::start | ( | ) | [pure virtual] |
initialization goes here
Implemented in CWiidMotionReceiver, RandomMotionReceiver, and WiiuseMotionReceiver.
| virtual void AbstractMotionReceiver::stop | ( | ) | [pure virtual] |
deinitialization goes here
Implemented in CWiidMotionReceiver, RandomMotionReceiver, and WiiuseMotionReceiver.
1.5.7.1