Controller.h 426 B

123456789101112131415161718192021
  1. #pragma once
  2. #include "Vector.h"
  3. class Controller{
  4. public:
  5. Controller(int controllerId);
  6. ~Controller();
  7. Vec3f ypr;
  8. Vec2f joystick;
  9. bool button, joystickButton, magnetSwitch;
  10. bool lastButton, lastJoystickButton, lastMagetSwitch;
  11. int controllerId;
  12. void setConnected(bool connected);
  13. bool isConnected(void);
  14. void rumble(int duration, int power);
  15. private:
  16. bool connected = false;
  17. };