home *** CD-ROM | disk | FTP | other *** search
/ VRML Tools for 3D Cyberspace / VRML_Tools_For_3D_Cyberspace.iso / amber / include / glove95.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-01  |  3.2 KB  |  97 lines

  1. //**********************************************************************
  2. //  DIVE Laboratories, Inc.
  3. //  Copyright(c) 1995
  4. //**********************************************************************
  5. // NOTICE: THIS [PROGRAM, DATABASE, DOCUMENT].CONSISTS OF TRADE SECRETS 
  6. // THAT ARE THE PROPERTY OF DIVE LABORATORIES, INC. THE CONTENTS MAY NOT
  7. // BE USED OR DISCLOSED WITHOUT EXPRESS WRITTEN PERMISSION OF THE OWNER.
  8. //**********************************************************************
  9. //  FILE:   GLOVE95.HPP
  10. //
  11. //  DESCRIPTION
  12. //  This file provides the function prototypes for the glove95Class
  13. //  that is the driver for the 5DT Glove '95.
  14. //
  15. //  Author: P. Cattrone
  16. //
  17. //  Modification History:
  18. //  8/29/95      Created
  19. //
  20. //**********************************************************************
  21. #ifndef _GLOVE95_HPP
  22. #define _GLOVE95_HPP
  23.  
  24. #include "sensor.hpp"
  25. #include "style.hpp"
  26.  
  27. class glove95Class : public sensorClass, public styleClass {
  28.  
  29. private:
  30.  
  31.     V3      angle;
  32.     
  33. public:
  34.     
  35.     BOOL    rollPitch;      //Roll and pitch data available
  36.  
  37.     int     hand;           //O if Left Handed Glove, 1 if Right
  38.                         //      Handed Glove
  39.  
  40.     int     fingers[5];     //For Right Handed Glove
  41.                         //Thumb=0 Index=1 Middle=2 Ring=3 Little=4 
  42.                         //For Left Handed Glove
  43.                         //Thumb=4 Index=3 Middle=2 Ring=1 Little=0 
  44.  
  45.     int             pitch;          //-128 (Down) to 128 (Up)
  46.  
  47.     int     roll;           //-128 (Left) to 128 (Right)
  48.  
  49.     D2              pos;            //Pitch (pos[X]) and Roll (pos[Y]) 
  50.                         //      scaled to +/-1
  51.  
  52.     int             gestures[128][5];
  53.  
  54.     //Updates the glove input data
  55.     void    style(void);
  56.  
  57.     //Is the device connected and working?
  58.     BOOL    isActive(void);
  59.  
  60.     //Need this to support hooks
  61.     void    mouseEvent(mouseEventEnum event, I2 point, void *wnd);
  62.  
  63.     //Zero's out the gesture index
  64.     void    initGesture(void);
  65.  
  66.     //Sets a gesture in the gesture index
  67.     //      gestureNumber:  1 to 64
  68.     //      min: array of 5 int's holding values between 0 and 127
  69.     //              specifying the minimum values for the gesture
  70.     //      max: array of 5 int's holding values between 0 and 127
  71.     //              specifying the maximum values for the gesture
  72.     BOOL    setGesture(int gestureNumber, int *min, int *max);
  73.     
  74.     //Returns the gesture(s) matching the current glove 
  75.     //      configuration.  getGesture returns a 64 bit number
  76.     //      with a 1 in the bit(s) corresponding to the gesture(s)
  77.     //      matched.  If no gesture matches the current glove 
  78.     //  configuration, getGesture returns 0.
  79.     long    getGesture(void);
  80.  
  81.     //Constructor & Destructor
  82.     glove95Class(portEnumType      port=COM2,
  83.             int                    baud=19200,
  84.             sensorAngleEnumType    sa = ABSOLUTE_ANGLES,
  85.             sensorPositionEnumType sp = NO_POSITIONS);
  86.  
  87.     ~glove95Class();
  88.  
  89. };
  90.  
  91. #endif
  92. //**********************************************************************
  93. // NOTICE: THIS [PROGRAM, DATABASE, DOCUMENT].CONSISTS OF TRADE SECRETS 
  94. // THAT ARE THE PROPERTY OF DIVE LABORATORIES, INC. THE CONTENTS MAY NOT
  95. // BE USED OR DISCLOSED WITHOUT EXPRESS WRITTEN PERMISSION OF THE OWNER.
  96. //**********************************************************************
  97.