BodyGlove Class Reference

A special structure to stre Fingertracking device data (in connection with Finger struct). More...

#include <bodies.h>

Inheritance diagram for BodyGlove:

Body Body

List of all members.

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 FingerGetFinger (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 FingerGetFinger (int num)
 returns specified finger

Protected Attributes

bool leftHand
 flag whether the glove is left hand or right hand
int fingerCount
 Number of fingers.
Fingerfingers
 Array of fingers (size is specified with fingerCount).
Fingerfingers
 Array of fingers (size is specified with fingerCount).


Detailed Description

A special structure to stre Fingertracking device data (in connection with Finger struct).

Definition at line 153 of file bodies.h.


Constructor & Destructor Documentation

BodyGlove::BodyGlove ( int  id,
float  qu,
int  numFingers,
bool  leftHand = true,
float *  shift = NULL,
float *  rotation = NULL 
)

Constructor.

Parameters:
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 (  ) 

Destructor.

Definition at line 118 of file bodies.cpp.

00119 {
00120        delete [] fingers;
00121 }

BodyGlove::BodyGlove ( int  id,
float  qu,
int  numFingers,
bool  leftHand = true,
float *  shift = NULL,
float *  rotation = NULL 
)

Constructor.

Parameters:
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.


Member Function Documentation

void BodyGlove::addFinger ( int  pos,
Finger  finger 
)

adds Finger to specified position

Note that fingers are ordered in sequence starting with thumb

Parameters:
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

Parameters:
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 
)

adds Finger to specified position

Note that fingers are ordered in sequence starting with thumb

Parameters:
pos - A position of tracked finger
finger - Finger to be added

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

Parameters:
num specifier of the finger

Reimplemented from Body.


Member Data Documentation

bool BodyGlove::leftHand [protected]

flag whether the glove is left hand or right hand

Definition at line 157 of file bodies.h.

int BodyGlove::fingerCount [protected]

Number of fingers.

Definition at line 159 of file bodies.h.

Finger* BodyGlove::fingers [protected]

Array of fingers (size is specified with fingerCount).

Definition at line 161 of file bodies.h.

Finger* BodyGlove::fingers [protected]

Array of fingers (size is specified with fingerCount).

Definition at line 161 of file bodies.h.


The documentation for this class was generated from the following files:

Generated on Tue Mar 10 14:41:37 2009 for VRUT by  doxygen 1.5.5