#include <WiimoteNunchuk.hpp>
Inherits kn::InputController.

Public Member Functions | |
| Nunchuk (void) | |
| Pointer to the wiimote with which the nunchuk is connected. | |
| Nunchuk (wiimote *wiimote) | |
| Constructor for nunchuk. | |
| ~Nunchuk (void) | |
| Destructor for nunchuk. | |
| void | addEvent (const unsigned int &event) |
| Add an event for the nunchuk. | |
| void | clearEvents (void) |
| Delete all events of the queue. | |
| unsigned int | popEvent (void) |
| Return the oldest event of the queue. | |
| unsigned int | topEvent (void) |
| Return the oldest event of the queue. | |
| unsigned int | popError (void) |
| Should return the oldest error of the queue. | |
| unsigned int | topError (void) |
| Return the oldest error of the queue. | |
| float | getRoll (void) const |
| Return the roll value of the nunchuck. | |
| float | getAbsoluteRoll (void) const |
| Return the absolute roll value of the nunchuck. | |
| float | getPitch (void) const |
| Return the pitch value of the nunchuck. | |
| float | getAbsolutePitch (void) const |
| Return the absolute pitch value of the nunchuck. | |
| float | getXForce (void) const |
| Return acceleration on X axis. | |
| float | getYForce (void) const |
| Return acceleration on Y axis. | |
| float | getZForce (void) const |
| Return acceleration on Z axis. | |
| float | getJoystickAngle (void) const |
| Returns the angle at which the joystick is being held. | |
| float | getJoystickMagnitude (void) const |
| Returns the magnitude at which the joystick is being held. | |
| bool | isConnected (void) const |
| Returns if the nunchuck is connected or not. | |
Parameters are nearly the same for wiimote and nunchuk
Motions of the wiimote
Definition at line 102 of file WiimoteNunchuk.hpp.
| kn::Nunchuk::Nunchuk | ( | void | ) | [inline] |
Pointer to the wiimote with which the nunchuk is connected.
Default constructor
Definition at line 119 of file WiimoteNunchuk.hpp.
| kn::Nunchuk::Nunchuk | ( | wiimote * | wiimote | ) |
Constructor for nunchuk.
| wiimote | the wiimote with which the nunchuk is connected |
Definition at line 33 of file WiimoteNunchuk.cpp.
| kn::Nunchuk::~Nunchuk | ( | void | ) | [inline] |
| void kn::Nunchuk::addEvent | ( | const unsigned int & | event | ) |
| void kn::Nunchuk::clearEvents | ( | void | ) |
| float kn::Nunchuk::getAbsolutePitch | ( | void | ) | const [inline] |
Return the absolute pitch value of the nunchuck.
In degree and between -180 to 180. It is the value directly emitted by the nunchuck
Definition at line 240 of file WiimoteNunchuk.hpp.
| float kn::Nunchuk::getAbsoluteRoll | ( | void | ) | const [inline] |
Return the absolute roll value of the nunchuck.
In degree and between -180 to 180. It is the value directly emitted by the nunchuck
Definition at line 218 of file WiimoteNunchuk.hpp.
| float kn::Nunchuk::getJoystickAngle | ( | void | ) | const [inline] |
Returns the angle at which the joystick is being held.
Straight up is 0 degrees, to the right is 90 degrees, down is 180 degrees, and to the left is 270 degrees.
The angle can often be 'not a number' (nan). This may occur if the joystick is in the central position.
Definition at line 289 of file WiimoteNunchuk.hpp.
| float kn::Nunchuk::getJoystickMagnitude | ( | void | ) | const [inline] |
Returns the magnitude at which the joystick is being held.
In the center is 0, and at the far edges is 1. So if the magnitude is 0.5 then the joystick is half way between the middle and outter edge.
Definition at line 300 of file WiimoteNunchuk.hpp.
| float kn::Nunchuk::getPitch | ( | void | ) | const [inline] |
Return the pitch value of the nunchuck.
In degree and between -180 to 180. Value is smoothed by the wiiuse interface
Definition at line 229 of file WiimoteNunchuk.hpp.
| float kn::Nunchuk::getRoll | ( | void | ) | const [inline] |
Return the roll value of the nunchuck.
In degree and between -180 to 180. Value is smoothed by the wiiuse interface
Definition at line 207 of file WiimoteNunchuk.hpp.
| float kn::Nunchuk::getXForce | ( | void | ) | const [inline] |
Return acceleration on X axis.
The accelerometer is sensitive to within +/- 3 gravity units.
Definition at line 251 of file WiimoteNunchuk.hpp.
| float kn::Nunchuk::getYForce | ( | void | ) | const [inline] |
Return acceleration on Y axis.
The accelerometer is sensitive to within +/- 3 gravity units.
Definition at line 262 of file WiimoteNunchuk.hpp.
| float kn::Nunchuk::getZForce | ( | void | ) | const [inline] |
Return acceleration on Z axis.
The accelerometer is sensitive to within +/- 3 gravity units.
Definition at line 273 of file WiimoteNunchuk.hpp.
| bool kn::Nunchuk::isConnected | ( | void | ) | const [inline] |
Returns if the nunchuck is connected or not.
Definition at line 309 of file WiimoteNunchuk.hpp.
| unsigned int kn::Nunchuk::popError | ( | void | ) | [inline, virtual] |
Should return the oldest error of the queue.
The error should be removed from the queue.
Error managing is not implemented because there is no error message for the moment. However the method is required because of InputController class heritage
Implements kn::InputController.
Definition at line 184 of file WiimoteNunchuk.hpp.
| unsigned int kn::Nunchuk::popEvent | ( | void | ) | [inline, virtual] |
Return the oldest event of the queue.
The event is removed from the queue
Implements kn::InputController.
Definition at line 163 of file WiimoteNunchuk.hpp.
| unsigned int kn::Nunchuk::topError | ( | void | ) | [inline, virtual] |
Return the oldest error of the queue.
Error managing is not implemented because there is no error message for the moment. However the method is required because of InputController class heritage
Implements kn::InputController.
Definition at line 196 of file WiimoteNunchuk.hpp.
| unsigned int kn::Nunchuk::topEvent | ( | void | ) | [inline, virtual] |
Return the oldest event of the queue.
Implements kn::InputController.
Definition at line 172 of file WiimoteNunchuk.hpp.
1.5.8