#include <bodies.h>

Public Member Functions | |
| BodyGlove (int id, float qu, int numFingers, bool leftHand=true, float *shift=NULL, float *rotation=NULL) | |
| Constructor. | |
| ~BodyGlove () | |
| Destructor. | |
| void | addFinger (int pos, Finger finger) |
| adds Finger to specified position | |
| virtual int | LeftHand () |
| returns whether the glove is left hand or right hand | |
| virtual int | FingersNum () |
| returns number of tracked fingers or 0 if no finger is tracked (not a Fingertracking device) | |
| virtual Finger * | GetFinger (int num) |
| returns specified finger | |
| BodyGlove (int id, float qu, int numFingers, bool leftHand=true, float *shift=NULL, float *rotation=NULL) | |
| Constructor. | |
| ~BodyGlove () | |
| Destructor. | |
| void | addFinger (int pos, Finger finger) |
| adds Finger to specified position | |
| virtual int | LeftHand () |
| returns whether the glove is left hand or right hand | |
| virtual int | FingersNum () |
| returns number of tracked fingers or 0 if no finger is tracked (not a Fingertracking device) | |
| virtual Finger * | GetFinger (int num) |
| returns specified finger | |
Protected Attributes | |
| bool | leftHand |
| flag whether the glove is left hand or right hand | |
| int | fingerCount |
| Number of fingers. | |
| Finger * | fingers |
| Array of fingers (size is specified with fingerCount). | |
| Finger * | fingers |
| Array of fingers (size is specified with fingerCount). | |
Definition at line 153 of file bodies.h.
| BodyGlove::BodyGlove | ( | int | id, | |
| float | qu, | |||
| int | numFingers, | |||
| bool | leftHand = true, |
|||
| float * | shift = NULL, |
|||
| float * | rotation = NULL | |||
| ) |
Constructor.
| id | Device ddentificator number | |
| qu | Quality of the device visibility | |
| numFingers | Sumber of tracked fingers | |
| leftHand | Specification if the glove is left hand (true) or right hand (false) | |
| shift | Shift vector coordinates (constructor makes a copy) | |
| rotation | Rotation matrix (constructor makes a copy) |
Definition at line 111 of file bodies.cpp.
00112 : Body(id, qu, Body::BGL, shift, rotation) 00113 { 00114 this->leftHand = lHand; 00115 this->fingerCount = numFingers; 00116 this->fingers = new Finger[fingerCount]; 00117 }
| BodyGlove::~BodyGlove | ( | ) |
| BodyGlove::BodyGlove | ( | int | id, | |
| float | qu, | |||
| int | numFingers, | |||
| bool | leftHand = true, |
|||
| float * | shift = NULL, |
|||
| float * | rotation = NULL | |||
| ) |
Constructor.
| id | Device ddentificator number | |
| qu | Quality of the device visibility | |
| numFingers | Sumber of tracked fingers | |
| leftHand | Specification if the glove is left hand (true) or right hand (false) | |
| shift | Shift vector coordinates (constructor makes a copy) | |
| rotation | Rotation matrix (constructor makes a copy) |
| BodyGlove::~BodyGlove | ( | ) |
Destructor.
| void BodyGlove::addFinger | ( | int | pos, | |
| Finger | finger | |||
| ) |
adds Finger to specified position
Note that fingers are ordered in sequence starting with thumb
| pos | - A position of tracked finger | |
| finger | - Finger to be added |
Definition at line 122 of file bodies.cpp.
00123 { 00124 if ((0 <= pos) && (pos < fingerCount)) fingers[pos] = finger; // Add finger only if pos is in scope of the array 00125 }
| int BodyGlove::LeftHand | ( | ) | [virtual] |
returns whether the glove is left hand or right hand
if position of the finger is not in scope no operation is done! Without any feedback! 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 from Body.
Definition at line 126 of file bodies.cpp.
00127 { 00128 return (this->leftHand ? 1 : 0); 00129 }
| int BodyGlove::FingersNum | ( | ) | [virtual] |
returns number of tracked fingers or 0 if no finger is tracked (not a Fingertracking device)
Reimplemented from Body.
Definition at line 130 of file bodies.cpp.
00131 { 00132 return fingerCount; 00133 }
| Finger * BodyGlove::GetFinger | ( | int | num | ) | [virtual] |
returns specified finger
0 is returned if num parameter is not in scope or it is not Fingertracking device. Note that fingers are ordered in sequence starting with thumb
| num | specifier of the finger |
Reimplemented from Body.
Definition at line 134 of file bodies.cpp.
00135 { 00136 if ((0 <= num) && (num < fingerCount)) return &(fingers[num]); 00137 else return NULL; 00138 }
| void BodyGlove::addFinger | ( | int | pos, | |
| Finger | finger | |||
| ) |
| virtual int BodyGlove::LeftHand | ( | ) | [virtual] |
returns whether the glove is left hand or right hand
if position of the finger is not in scope no operation is done! Without any feedback! 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 from Body.
| virtual int BodyGlove::FingersNum | ( | ) | [virtual] |
returns number of tracked fingers or 0 if no finger is tracked (not a Fingertracking device)
Reimplemented from Body.
| virtual Finger* BodyGlove::GetFinger | ( | int | num | ) | [virtual] |
returns specified finger
0 is returned if num parameter is not in scope or it is not Fingertracking device. Note that fingers are ordered in sequence starting with thumb
| num | specifier of the finger |
Reimplemented from Body.
bool BodyGlove::leftHand [protected] |
int BodyGlove::fingerCount [protected] |
Finger* BodyGlove::fingers [protected] |
Finger* BodyGlove::fingers [protected] |
1.5.5