#include <bodies.h>

Public Types | |
| enum | BodyType { NRECG = 0, B3D = 1, B6D = 2, BGL = 3, B6DF2 = 4, B6DF = 5, B6DMT = 6, NRECG = 0, B3D = 1, B6D = 2, BGL = 3, B6DF2 = 4, B6DF = 5, B6DMT = 6 } |
| The type of the body identificator. More... | |
| enum | BodyType { NRECG = 0, B3D = 1, B6D = 2, BGL = 3, B6DF2 = 4, B6DF = 5, B6DMT = 6, NRECG = 0, B3D = 1, B6D = 2, BGL = 3, B6DF2 = 4, B6DF = 5, B6DMT = 6 } |
| The type of the body identificator. More... | |
Public Member Functions | |
| Body (int id, float qu, BodyType type, float *shift=NULL, float *rotation=NULL) | |
| Constructor. | |
| ~Body () | |
| destructor | |
| void | Identity () |
| Set matrix to identity. | |
| void | SetShift (float *shift) |
| Copy shift vector to tMatrix (3 values). | |
| void | SetRotation (float *rotation) |
| Copy rotation matrix to tMatrix (9 values). | |
| void | SetMatrix (MATRIX &matr) |
| Sets new values for matrix. | |
| int | GetID () |
| Returns Id of the device. | |
| BodyType | GetType () |
| Returns type of the device. | |
| vector3 | GetShift () |
| Reconstructs a shift vector. | |
| MATRIX | GetRotation () |
| Reconstructs a rotation matrix. | |
| MATRIX | Matrix () |
| Pointer to transofrmation matrix (inner matrix of current structure - see tMatrix). | |
| float | GetQuality () |
| Returns quality indicator. | |
| virtual int | Button (int num) |
| shows whether the button is switched or not | |
| virtual int | ButonsNumber () |
| Number of buttons. | |
| virtual int | ControlsNuber () |
| Number of Controls. | |
| virtual float | Control (int num) |
| Returns analog value of control from range -1.000 to 1.000. | |
| virtual int | LeftHand () |
| Indicator, whether the Fingertracking glove is left or right hand. | |
| virtual int | FingersNum () |
| Number of tracked fingers. | |
| virtual Finger * | GetFinger (int num) |
| Returns the Finger specification (for Fingertracking device only). | |
| virtual int | ButtonsMask32 () |
| returns mask of first 32 buttons | |
| void | Scale (float num) |
| scale matrix with value; | |
| Body (int id, float qu, BodyType type, float *shift=NULL, float *rotation=NULL) | |
| Constructor. | |
| ~Body () | |
| destructor | |
| void | Identity () |
| Set matrix to identity. | |
| void | SetShift (float *shift) |
| Copy shift vector to tMatrix (3 values). | |
| void | SetRotation (float *rotation) |
| Copy rotation matrix to tMatrix (9 values). | |
| void | SetMatrix (MATRIX &matr) |
| Sets new values for matrix. | |
| int | GetID () |
| Returns Id of the device. | |
| BodyType | GetType () |
| Returns type of the device. | |
| vector3 | GetShift () |
| Reconstructs a shift vector. | |
| MATRIX | GetRotation () |
| Reconstructs a rotation matrix. | |
| MATRIX | Matrix () |
| Pointer to transofrmation matrix (inner matrix of current structure - see tMatrix). | |
| float | GetQuality () |
| Returns quality indicator. | |
| virtual int | Button (int num) |
| shows whether the button is switched or not | |
| virtual int | ButonsNumber () |
| Number of buttons. | |
| virtual int | ControlsNuber () |
| Number of Controls. | |
| virtual float | Control (int num) |
| Returns analog value of control from range -1.000 to 1.000. | |
| virtual int | LeftHand () |
| Indicator, whether the Fingertracking glove is left or right hand. | |
| virtual int | FingersNum () |
| Number of tracked fingers. | |
| virtual Finger * | GetFinger (int num) |
| Returns the Finger specification (for Fingertracking device only). | |
| virtual int | ButtonsMask32 () |
| returns mask of first 32 buttons | |
| void | Scale (float num) |
| scale matrix with value; | |
Protected Attributes | |
| BodyType | deviceType |
| The type of the Device. | |
| int | deviceID |
| ID identificator of the device. | |
| float | quality |
| quality parameter of the device | |
| MATRIX | tMatrix |
| column ordered transformation matrix | |
Definition at line 50 of file bodies.h.
| enum Body::BodyType |
The type of the body identificator.
| NRECG | Not recognized device. |
| B3D | Standard body - Additional marker with 3 degrees of freedom (3DoF). |
| B6D | Standard body - Additional marker with 6 degrees of freedom (6DoF). |
| BGL | Finger tracking data structure. |
| B6DF2 | Flystick 2 data structure. |
| B6DF | Flystick 1 data structure. |
| B6DMT | Measurement tools. Nearly the same data structure as Flystick 1. |
| NRECG | Not recognized device. |
| B3D | Standard body - Additional marker with 3 degrees of freedom (3DoF). |
| B6D | Standard body - Additional marker with 6 degrees of freedom (6DoF). |
| BGL | Finger tracking data structure. |
| B6DF2 | Flystick 2 data structure. |
| B6DF | Flystick 1 data structure. |
| B6DMT | Measurement tools. Nearly the same data structure as Flystick 1. |
Definition at line 54 of file bodies.h.
00055 { 00056 NRECG = 0, 00057 B3D = 1, 00058 B6D = 2, 00059 BGL = 3, 00060 B6DF2 = 4, 00061 B6DF = 5, 00062 B6DMT = 6 00063 };
| enum Body::BodyType |
The type of the body identificator.
| NRECG | Not recognized device. |
| B3D | Standard body - Additional marker with 3 degrees of freedom (3DoF). |
| B6D | Standard body - Additional marker with 6 degrees of freedom (6DoF). |
| BGL | Finger tracking data structure. |
| B6DF2 | Flystick 2 data structure. |
| B6DF | Flystick 1 data structure. |
| B6DMT | Measurement tools. Nearly the same data structure as Flystick 1. |
| NRECG | Not recognized device. |
| B3D | Standard body - Additional marker with 3 degrees of freedom (3DoF). |
| B6D | Standard body - Additional marker with 6 degrees of freedom (6DoF). |
| BGL | Finger tracking data structure. |
| B6DF2 | Flystick 2 data structure. |
| B6DF | Flystick 1 data structure. |
| B6DMT | Measurement tools. Nearly the same data structure as Flystick 1. |
Definition at line 54 of file bodies.h.
00055 { 00056 NRECG = 0, 00057 B3D = 1, 00058 B6D = 2, 00059 BGL = 3, 00060 B6DF2 = 4, 00061 B6DF = 5, 00062 B6DMT = 6 00063 };
| Body::Body | ( | int | id, | |
| float | qu, | |||
| Body::BodyType | type, | |||
| float * | shift = NULL, |
|||
| float * | rotation = NULL | |||
| ) |
Constructor.
Creates new representation of data structure and fills tMatrix - transformation matrix with values of shift vectro and rotation matrix
| Id | identificator - contained in the apcket | |
| Qu | quality parameter. Devices with buttons returns 1.0 or -1.0; Without buttons only 1.0 is returned. | |
| Shift | pointer to array of 3 values - shift vector | |
| Rotation | pointer to array of 9 values - rotation matrix |
Definition at line 13 of file bodies.cpp.
00014 { 00015 deviceID = id; 00016 quality = qu; 00017 deviceType = type; 00018 //this->Identity(); // init matrix with identity 00019 this->SetRotation(rotation);// copy rotation matrix to transform matrix 00020 this->SetShift(shift); // copy shift vector to transform matrix 00021 }
| Body::~Body | ( | ) |
| Body::Body | ( | int | id, | |
| float | qu, | |||
| BodyType | type, | |||
| float * | shift = NULL, |
|||
| float * | rotation = NULL | |||
| ) |
Constructor.
Creates new representation of data structure and fills tMatrix - transformation matrix with values of shift vectro and rotation matrix
| id | identificator - contained in the apcket | |
| qu | quality parameter. Devices with buttons returns 1.0 or -1.0; Without buttons only 1.0 is returned. | |
| shift | pointer to array of 3 values - shift vector | |
| rotation | pointer to array of 9 values - rotation matrix |
| Body::~Body | ( | ) |
destructor
| void Body::Identity | ( | ) |
| void Body::SetShift | ( | float * | shift | ) |
| void Body::SetRotation | ( | float * | rotation | ) |
Copy rotation matrix to tMatrix (9 values).
Definition at line 50 of file bodies.cpp.
00051 { 00052 if (rotation != NULL) 00053 { 00054 tMatrix._m11 = rotation[0]; tMatrix._m12 = rotation[3]; tMatrix._m13 = rotation[6]; 00055 tMatrix._m21 = rotation[1]; tMatrix._m22 = rotation[4]; tMatrix._m23 = rotation[7]; 00056 tMatrix._m31 = rotation[2]; tMatrix._m32 = rotation[5]; tMatrix._m33 = rotation[8]; 00057 } 00058 }
| void Body::SetMatrix | ( | MATRIX & | matr | ) |
Sets new values for matrix.
Definition at line 30 of file bodies.cpp.
00031 { 00032 tMatrix = matr; 00033 }
| int Body::GetID | ( | ) |
Returns Id of the device.
Definition at line 59 of file bodies.cpp.
00060 { 00061 return deviceID; 00062 }
| Body::BodyType Body::GetType | ( | ) |
Returns type of the device.
Definition at line 63 of file bodies.cpp.
00064 { 00065 return deviceType; 00066 }
| vector3 Body::GetShift | ( | ) |
Reconstructs a shift vector.
| vect | An array where to reconstruct a shift vector |
Definition at line 67 of file bodies.cpp.
00068 { 00069 return tMatrix.ExtractTranslation(); 00070 }
| MATRIX Body::GetRotation | ( | ) |
Reconstructs a rotation matrix.
| vect | An array where to reconstruct a rotation matrix (column ordered) |
Definition at line 71 of file bodies.cpp.
00072 { 00073 return tMatrix.ExtractRotation(); 00074 }
| MATRIX Body::Matrix | ( | ) |
Pointer to transofrmation matrix (inner matrix of current structure - see tMatrix).
Definition at line 75 of file bodies.cpp.
00076 { 00077 return tMatrix; 00078 }
| float Body::GetQuality | ( | ) |
Returns quality indicator.
In case of standard bodies (6DoF, 3DoF) value 1.000 is always returned
In case of Flystick 1, Flystick 2, Measurement tools or Fingertracking gloves either 1.000 or -1.000 is returned. Value 1.000 means that device is currently visible with the DTrack A.R.T tracking system. Value -1.000 means that device is not visible now (but it may contain some informations about buttons or analog controls)
Definition at line 79 of file bodies.cpp.
00080 { 00081 return quality; 00082 }
| int Body::Button | ( | int | num | ) | [virtual] |
shows whether the button is switched or not
Returns 1 if button is switched on
Returns 0 if button is switched off
Returns -10 if button is unavailable (num parameter is not in scope of the device buttons)
| num | Number of buttons |
Reimplemented in ButtonDevice, FlyStick2, ButtonDevice, and FlyStick2.
Definition at line 83 of file bodies.cpp.
| int Body::ButonsNumber | ( | ) | [virtual] |
Number of buttons.
Reimplemented in ButtonDevice, FlyStick2, ButtonDevice, and FlyStick2.
Definition at line 87 of file bodies.cpp.
| int Body::ControlsNuber | ( | ) | [virtual] |
Number of Controls.
Reimplemented in FlyStick2, and FlyStick2.
Definition at line 91 of file bodies.cpp.
| float Body::Control | ( | int | num | ) | [virtual] |
Returns analog value of control from range -1.000 to 1.000.
if -10 is returned, Control is not in scope of the device (or Device is not equiped with controls)
| num | - specifies the analog control. |
Reimplemented in FlyStick2, and FlyStick2.
Definition at line 95 of file bodies.cpp.
| int Body::LeftHand | ( | ) | [virtual] |
Indicator, whether the Fingertracking glove is left or right hand.
Returns 1 if device is left hand glove Returns 0 if device is right hand glove Returns -10 if device is not a fingertacking glove
Reimplemented in BodyGlove, and BodyGlove.
Definition at line 99 of file bodies.cpp.
| int Body::FingersNum | ( | ) | [virtual] |
Number of tracked fingers.
Returns value 0 if device is no Fingertracking glove or no finger is tracked
Reimplemented in BodyGlove, and BodyGlove.
Definition at line 103 of file bodies.cpp.
| Finger * Body::GetFinger | ( | int | num | ) | [virtual] |
Returns the Finger specification (for Fingertracking device only).
Returns 0 if device is not Fingertracking or thumb num parameter is out of scope
| num | Specification of finger in sequence starting with thumb |
Reimplemented in BodyGlove, and BodyGlove.
Definition at line 107 of file bodies.cpp.
| int Body::ButtonsMask32 | ( | ) | [virtual] |
returns mask of first 32 buttons
Reimplemented in ButtonDevice, FlyStick2, ButtonDevice, and FlyStick2.
Definition at line 225 of file bodies.cpp.
| void Body::Scale | ( | float | num | ) |
| void Body::Identity | ( | ) |
Set matrix to identity.
| void Body::SetShift | ( | float * | shift | ) |
Copy shift vector to tMatrix (3 values).
| void Body::SetRotation | ( | float * | rotation | ) |
Copy rotation matrix to tMatrix (9 values).
| int Body::GetID | ( | ) |
Returns Id of the device.
| BodyType Body::GetType | ( | ) |
Returns type of the device.
| vector3 Body::GetShift | ( | ) |
Reconstructs a shift vector.
| vect | An array where to reconstruct a shift vector |
| MATRIX Body::GetRotation | ( | ) |
| MATRIX Body::Matrix | ( | ) |
| float Body::GetQuality | ( | ) |
Returns quality indicator.
In case of standard bodies (6DoF, 3DoF) value 1.000 is always returned
In case of Flystick 1, Flystick 2, Measurement tools or Fingertracking gloves either 1.000 or -1.000 is returned. Value 1.000 means that device is currently visible with the DTrack A.R.T tracking system. Value -1.000 means that device is not visible now (but it may contain some informations about buttons or analog controls)
| virtual int Body::Button | ( | int | num | ) | [virtual] |
shows whether the button is switched or not
Returns 1 if button is switched on
Returns 0 if button is switched off
Returns -10 if button is unavailable (num parameter is not in scope of the device buttons)
| num | Number of buttons |
Reimplemented in ButtonDevice, FlyStick2, ButtonDevice, and FlyStick2.
| virtual int Body::ButonsNumber | ( | ) | [virtual] |
| virtual int Body::ControlsNuber | ( | ) | [virtual] |
| virtual float Body::Control | ( | int | num | ) | [virtual] |
| virtual int Body::LeftHand | ( | ) | [virtual] |
| virtual int Body::FingersNum | ( | ) | [virtual] |
| virtual Finger* Body::GetFinger | ( | int | num | ) | [virtual] |
| virtual int Body::ButtonsMask32 | ( | ) | [virtual] |
returns mask of first 32 buttons
Reimplemented in ButtonDevice, FlyStick2, ButtonDevice, and FlyStick2.
| void Body::Scale | ( | float | num | ) |
scale matrix with value;
BodyType Body::deviceType [protected] |
int Body::deviceID [protected] |
float Body::quality [protected] |
MATRIX Body::tMatrix [protected] |
1.5.5