CmDebugCamera.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include "CmPrerequisites.h"
  3. #include "CmComponent.h"
  4. #include "CmInputHandler.h"
  5. #include "CmMath.h"
  6. namespace CamelotEngine
  7. {
  8. class DebugCamera : public Component
  9. {
  10. private:
  11. float mCurrentSpeed;
  12. bool mGoingForward;
  13. bool mGoingBack;
  14. bool mGoingLeft;
  15. bool mGoingRight;
  16. bool mFastMove;
  17. bool mCameraRotating;
  18. Degree mPitch;
  19. Degree mYaw;
  20. CameraPtr mCamera;
  21. void keyDown(CamelotEngine::KeyCode keyCode);
  22. void keyUp(CamelotEngine::KeyCode keyCode);
  23. void mouseDown(const CamelotEngine::MouseEvent& event, CamelotEngine::MouseButton buttonID);
  24. void mouseUp(const CamelotEngine::MouseEvent& event, CamelotEngine::MouseButton buttonID);
  25. static const float START_SPEED;
  26. static const float TOP_SPEED;
  27. static const float ACCELERATION;
  28. static const float FAST_MODE_MULTIPLIER;
  29. static const float ROTATION_SPEED; // Degrees/second
  30. /************************************************************************/
  31. /* COMPONENT OVERRIDES */
  32. /************************************************************************/
  33. private:
  34. friend class GameObject;
  35. /** Standard constructor.
  36. */
  37. DebugCamera(GameObjectPtr parent);
  38. public:
  39. virtual void update();
  40. };
  41. }