#include <fob.h>

Public Member Functions | |
| bird (fob &parent) | |
| Default constructor. | |
| bird (const bird &cpy) | |
| Copy constructor. | |
| ~bird (void) | |
| Default destructor. | |
| const bird & | operator= (const bird &rhs) |
| Assignment operator. | |
| void | get_position (math::vector3 &output) const |
| Gets the bird's position. | |
| void | get_position (real_t output[3]) const |
| Gets the bird's position. | |
| void | get_angles (math::vector3 &output) |
| Gets the bird's angles (in degress). | |
| void | get_angles (real_t output[3]) |
| Gets the bird's angles (in degress). | |
| void | get_quaternion (math::quaternion &output) |
| Gets the bird's orientation. | |
| void | get_quaternion (real_t output[4]) |
| Gets the bird's orientation. | |
| void | get_matrix (math::matrix4 &output) |
| Gets a 4x4 matrix describing the bird's orientation/position. | |
| void | get_matrix (real_t output[16]) |
| Gets a 4x4 matrix describing the bird's orientation/position. | |
| bool | set_mode (fob::mode mask) |
| Sets what type of data we will get back from the flock for this bird. | |
| void | set_rotation (const math::quaternion &rot) |
| Applies the given rotation to the each orientation update. | |
| unsigned char | get_buttons (void) const |
| Returns the currently pressed button. | |
Friends | |
| class | fob |
Definition at line 129 of file fob.h.
| void fob::bird::get_angles | ( | real_t | output[3] | ) | [inline] |
| void fob::bird::get_angles | ( | math::vector3 & | output | ) | [inline] |
| unsigned char fob::bird::get_buttons | ( | void | ) | const [inline] |
Returns the currently pressed button.
The flock hardware is not capable of determing if multiple buttons are pressed. If multiple buttons are pressed, any of the pressed buttons may be returned. You can check to see if a button was pressed as follows:
if( buttons == fob::BUTTON_LEFT ) //left pressed else if( buttons == fob::BUTTON_MIDDLE ) //middle pressed else if( buttons == fob::BUTTON_RIGHT ) //right pressed else //nothing pressed
| void fob::bird::get_matrix | ( | real_t | output[16] | ) | [inline] |
| void fob::bird::get_matrix | ( | math::matrix4 & | output | ) | [inline] |
| bool fob::bird::set_mode | ( | fob::mode | mask | ) |
Sets what type of data we will get back from the flock for this bird.
| mask | Bitwised or'ed fob::mode telling what data we want back from the flock. Options are fob::POSITION, fob::ORIENTATION, and fob::BUTTONS. |
true on success. false on error. Flock that bird is apart of contains error message on error. Definition at line 168 of file fob.cpp.
References fob::BUTTONS, fob::check_error(), fob::clear_device(), fob::ORIENTATION, fob::POSITION, fob::select_bird(), fob::send_cmd(), and fob::set_error().
1.5.7.1