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

  1. //**********************************************************************
  2. //  DIVE Laboratories, Inc.
  3. //  Copyright(c) 1995
  4. //  All rights reserved.
  5. //  FILE:   JOYSTICK.HPP
  6. //
  7. //  DESCRIPTION
  8. //  This file provides the function prototypes for the joystickClass
  9. //  that is the driver for the standard window joystick.
  10. //
  11. //  Author: M. Doucet
  12. //
  13. //  Modification History:
  14. //  7/3/95    Created
  15. //
  16. //**********************************************************************
  17. #ifndef _JOYSTICK_HPP
  18. #define _JOYSTICK_HPP
  19.  
  20. #include <windows.h>
  21. #include "sensor.hpp"
  22. #include "style.hpp"
  23.  
  24. class joystickClass : public sensorClass, public styleClass {
  25.  
  26. private:
  27.  
  28.     V3  mRotations;
  29.     V3  mDeltas;
  30.     V3  jmins, jmaxs, ranges, halfs, mids, posBias, negBias;
  31.     void *hostWnd;
  32.     int driverOk, nButtons;
  33.     unsigned int joyId;
  34.  
  35. public:
  36.  
  37.     // Current joystick position +-1.0
  38.     V3 pos;
  39.     unsigned int buttonMask;
  40.  
  41.     // Button down flags
  42.     int button[10];
  43.  
  44.     void style(void);
  45.  
  46.     void mouseEvent(mouseEventEnum event, I2 point, void *wnd);
  47.  
  48.     joystickClass(unsigned int joystickID = JOYSTICKID1,
  49.                   sensorAngleEnumType    sa = NO_ANGLES,
  50.                   sensorPositionEnumType sp = ABSOLUTE_POSITIONS);
  51.  
  52.  
  53.     ~joystickClass();
  54.  
  55. };
  56.  
  57. #endif
  58.