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

Public Member Functions | |
| Wiimote (void) | |
| Default constructor. | |
| Wiimote (wiimote *wiimote) | |
| Constructor. | |
| ~Wiimote (void) | |
| Destructor. | |
| void | addEvent (const unsigned int &event) |
| Add a wiimote event to the event queue. | |
| unsigned int | popEvent (void) |
| Pop the oldest event in the queue. | |
| unsigned int | topEvent (void) |
| Pop the oldest event in the queue. | |
| unsigned int | popError (void) |
| Return the oldest error of the queue. | |
| unsigned int | topError (void) |
| Return the oldest error of the queue. | |
| void | clearEvents (void) |
| Removes all events in the queue. | |
| unsigned int | getExpansion (void) const |
| Returns the expansion connected to the wiimote. | |
| void | toggleRumble (void) |
| Switches the rumble's status. | |
| bool | isRumbleSet (void) const |
| Checkes if the rumble is on or off. | |
| void | toggleLED (const unsigned int &id) |
| Switches the specific led's status. | |
| bool | isLEDSet (const unsigned int &id) const |
| Returns the status of a specific led. | |
| void | toggleIR (void) |
| Switches IR dots tracking status. | |
| bool | isIRSet (void) const |
| Returns IR dots tracking status. | |
| int | getIRSensitivity (void) const |
| Returns IR dots tracking sensitivity value. | |
| void | setIRSensitivity (const int &lvl) |
| Sets IR dots tracking sensitivity value. | |
| unsigned int | getDotsNumber (void) const |
| Returns the number of detected IR dots. | |
| WiimoteIRDot | getDot (const unsigned int &i) const |
| Returns data about a specif detected IR dot. | |
| WiimoteIRPointer | getPointer (void) const |
| Returns values corresponding to conversion of IR dots into a cursor. | |
| void | setIRParameters (const unsigned int &width, const unsigned int &height, const unsigned int &aspect=ASPECT_4_3, const unsigned int &position=IR_POSITION_BELOW) |
| Defines parameters for IR dots conversion into a cursor. | |
| void | toggleMotion (void) |
| Switches motion detection. | |
| bool | isMotionSet (void) const |
| Returns if motion detection is on or off. | |
| void | toggleSmoothAccelerations (void) |
| Switches to smooth motion detection. | |
| float | getRoll (void) const |
| Return the roll value of the wiimote. | |
| float | getAbsoluteRoll (void) const |
| Return the absolute roll value of the wiimote. | |
| float | getPitch (void) const |
| Return the pitch value of the wiimote. | |
| float | getAbsolutePitch (void) const |
| Return the absolute pitch value of the wiimote. | |
| float | getYaw (void) const |
| Return the yaw value of the wiimote. | |
| 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. | |
| void | showStatus (void) |
| Prints some information about the wiimote. | |
| Nunchuk & | getNunchuk (void) |
| Returns the nunchuk connected to the wiimote. | |
Friends | |
| std::ostream & | operator<< (std::ostream &, const Wiimote &) |
| Output Wiimote infos. | |
Definition at line 98 of file Wiimote.hpp.
| kn::Wiimote::Wiimote | ( | void | ) | [inline] |
| kn::Wiimote::Wiimote | ( | wiimote * | wiimote | ) |
Constructor.
| wiimote | a pointer to a wiiuse wiimote descriptor |
Definition at line 27 of file Wiimote.cpp.
| kn::Wiimote::~Wiimote | ( | void | ) | [inline] |
| void kn::Wiimote::addEvent | ( | const unsigned int & | event | ) |
Add a wiimote event to the event queue.
| event | event descriptor |
Definition at line 50 of file Wiimote.cpp.
| void kn::Wiimote::clearEvents | ( | void | ) |
| float kn::Wiimote::getAbsolutePitch | ( | void | ) | const [inline] |
Return the absolute pitch value of the wiimote.
In degree and between -180 to 180. It is the value directly emitted by the wiimote
Definition at line 418 of file Wiimote.hpp.
| float kn::Wiimote::getAbsoluteRoll | ( | void | ) | const [inline] |
Return the absolute roll value of the wiimote.
In degree and between -180 to 180. It is the value directly emitted by the wiimote
Definition at line 396 of file Wiimote.hpp.
| WiimoteIRDot kn::Wiimote::getDot | ( | const unsigned int & | i | ) | const |
Returns data about a specif detected IR dot.
| i | id of a specific dot (lower than getDotsNumber()) |
Definition at line 90 of file Wiimote.cpp.
| unsigned int kn::Wiimote::getDotsNumber | ( | void | ) | const [inline] |
Returns the number of detected IR dots.
Definition at line 319 of file Wiimote.hpp.
| unsigned int kn::Wiimote::getExpansion | ( | void | ) | const [inline] |
Returns the expansion connected to the wiimote.
Definition at line 239 of file Wiimote.hpp.
| int kn::Wiimote::getIRSensitivity | ( | void | ) | const [inline] |
Returns IR dots tracking sensitivity value.
Definition at line 299 of file Wiimote.hpp.
| Nunchuk& kn::Wiimote::getNunchuk | ( | void | ) | [inline] |
Returns the nunchuk connected to the wiimote.
You have to check if the nunchuck is really connected
Definition at line 477 of file Wiimote.hpp.
| float kn::Wiimote::getPitch | ( | void | ) | const [inline] |
Return the pitch value of the wiimote.
In degree and between -180 to 180. Value is smoothed by the wiiuse interface
Definition at line 407 of file Wiimote.hpp.
| WiimoteIRPointer kn::Wiimote::getPointer | ( | void | ) | const |
Returns values corresponding to conversion of IR dots into a cursor.
Definition at line 102 of file Wiimote.cpp.
| float kn::Wiimote::getRoll | ( | void | ) | const [inline] |
Return the roll value of the wiimote.
In degree and between -180 to 180. Value is smoothed by the wiiuse interface
Definition at line 385 of file Wiimote.hpp.
| float kn::Wiimote::getXForce | ( | void | ) | const [inline] |
Return acceleration on X axis.
The accelerometer is sensitive to within +/- 3 gravity units.
Definition at line 439 of file Wiimote.hpp.
| float kn::Wiimote::getYaw | ( | void | ) | const [inline] |
Return the yaw value of the wiimote.
In degree and between -180 to 180. The value is computed using IR dots detection.
Definition at line 429 of file Wiimote.hpp.
| float kn::Wiimote::getYForce | ( | void | ) | const [inline] |
Return acceleration on Y axis.
The accelerometer is sensitive to within +/- 3 gravity units.
Definition at line 449 of file Wiimote.hpp.
| float kn::Wiimote::getZForce | ( | void | ) | const [inline] |
Return acceleration on Z axis.
The accelerometer is sensitive to within +/- 3 gravity units.
Definition at line 459 of file Wiimote.hpp.
| bool kn::Wiimote::isIRSet | ( | void | ) | const [inline] |
Returns IR dots tracking status.
Definition at line 290 of file Wiimote.hpp.
| bool kn::Wiimote::isLEDSet | ( | const unsigned int & | id | ) | const |
Returns the status of a specific led.
| id | led's id (must be 1, 2, 3 or 4) |
Definition at line 66 of file Wiimote.cpp.
| bool kn::Wiimote::isMotionSet | ( | void | ) | const [inline] |
Returns if motion detection is on or off.
Definition at line 367 of file Wiimote.hpp.
| bool kn::Wiimote::isRumbleSet | ( | void | ) | const [inline] |
Checkes if the rumble is on or off.
Definition at line 255 of file Wiimote.hpp.
| unsigned int kn::Wiimote::popError | ( | 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 212 of file Wiimote.hpp.
| unsigned int kn::Wiimote::popEvent | ( | void | ) | [inline, virtual] |
Pop the oldest event in the queue.
The event is removed from the queue
Implements kn::InputController.
Definition at line 191 of file Wiimote.hpp.
| void kn::Wiimote::setIRParameters | ( | const unsigned int & | width, | |
| const unsigned int & | height, | |||
| const unsigned int & | aspect = ASPECT_4_3, |
|||
| const unsigned int & | position = IR_POSITION_BELOW | |||
| ) |
Defines parameters for IR dots conversion into a cursor.
| width | window width | |
| height | window height | |
| aspect | window ratio (either ASPECT_4_3 or ASPECT_16_9) | |
| position | sensor bar position related to screen (either IR_POSITION_BELOW or IR_POSITION_ABOVE) |
Definition at line 110 of file Wiimote.cpp.
| void kn::Wiimote::setIRSensitivity | ( | const int & | lvl | ) | [inline] |
Sets IR dots tracking sensitivity value.
The camera sensitivity is a degree between 1 (lowest) and 5 (highest). The default is 3.
| lvl | IR dots tracking sensitivity value |
Definition at line 310 of file Wiimote.hpp.
| void kn::Wiimote::showStatus | ( | void | ) |
| void kn::Wiimote::toggleIR | ( | void | ) | [inline] |
| void kn::Wiimote::toggleLED | ( | const unsigned int & | id | ) |
Switches the specific led's status.
| id | led's id (must be 1, 2, 3 or 4) |
Definition at line 79 of file Wiimote.cpp.
| void kn::Wiimote::toggleMotion | ( | void | ) | [inline] |
| void kn::Wiimote::toggleRumble | ( | void | ) | [inline] |
| void kn::Wiimote::toggleSmoothAccelerations | ( | void | ) | [inline] |
| unsigned int kn::Wiimote::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 223 of file Wiimote.hpp.
| unsigned int kn::Wiimote::topEvent | ( | void | ) | [inline, virtual] |
Pop the oldest event in the queue.
The event is kept in the queue
Implements kn::InputController.
Definition at line 201 of file Wiimote.hpp.
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const Wiimote & | wiimote | |||
| ) | [friend] |
1.5.8