home *** CD-ROM | disk | FTP | other *** search
- //**********************************************************************
- // DIVE Laboratories, Inc.
- // Copyright(c) 1995
- //**********************************************************************
- // NOTICE: THIS [PROGRAM, DATABASE, DOCUMENT].CONSISTS OF TRADE SECRETS
- // THAT ARE THE PROPERTY OF DIVE LABORATORIES, INC. THE CONTENTS MAY NOT
- // BE USED OR DISCLOSED WITHOUT EXPRESS WRITTEN PERMISSION OF THE OWNER.
- //**********************************************************************
- // FILE: GLOVE95.HPP
- //
- // DESCRIPTION
- // This file provides the function prototypes for the glove95Class
- // that is the driver for the 5DT Glove '95.
- //
- // Author: P. Cattrone
- //
- // Modification History:
- // 8/29/95 Created
- //
- //**********************************************************************
- #ifndef _GLOVE95_HPP
- #define _GLOVE95_HPP
-
- #include "sensor.hpp"
- #include "style.hpp"
-
- class glove95Class : public sensorClass, public styleClass {
-
- private:
-
- V3 angle;
-
- public:
-
- BOOL rollPitch; //Roll and pitch data available
-
- int hand; //O if Left Handed Glove, 1 if Right
- // Handed Glove
-
- int fingers[5]; //For Right Handed Glove
- //Thumb=0 Index=1 Middle=2 Ring=3 Little=4
- //For Left Handed Glove
- //Thumb=4 Index=3 Middle=2 Ring=1 Little=0
-
- int pitch; //-128 (Down) to 128 (Up)
-
- int roll; //-128 (Left) to 128 (Right)
-
- D2 pos; //Pitch (pos[X]) and Roll (pos[Y])
- // scaled to +/-1
-
- int gestures[128][5];
-
- //Updates the glove input data
- void style(void);
-
- //Is the device connected and working?
- BOOL isActive(void);
-
- //Need this to support hooks
- void mouseEvent(mouseEventEnum event, I2 point, void *wnd);
-
- //Zero's out the gesture index
- void initGesture(void);
-
- //Sets a gesture in the gesture index
- // gestureNumber: 1 to 64
- // min: array of 5 int's holding values between 0 and 127
- // specifying the minimum values for the gesture
- // max: array of 5 int's holding values between 0 and 127
- // specifying the maximum values for the gesture
- BOOL setGesture(int gestureNumber, int *min, int *max);
-
- //Returns the gesture(s) matching the current glove
- // configuration. getGesture returns a 64 bit number
- // with a 1 in the bit(s) corresponding to the gesture(s)
- // matched. If no gesture matches the current glove
- // configuration, getGesture returns 0.
- long getGesture(void);
-
- //Constructor & Destructor
- glove95Class(portEnumType port=COM2,
- int baud=19200,
- sensorAngleEnumType sa = ABSOLUTE_ANGLES,
- sensorPositionEnumType sp = NO_POSITIONS);
-
- ~glove95Class();
-
- };
-
- #endif
- //**********************************************************************
- // NOTICE: THIS [PROGRAM, DATABASE, DOCUMENT].CONSISTS OF TRADE SECRETS
- // THAT ARE THE PROPERTY OF DIVE LABORATORIES, INC. THE CONTENTS MAY NOT
- // BE USED OR DISCLOSED WITHOUT EXPRESS WRITTEN PERMISSION OF THE OWNER.
- //**********************************************************************
-