Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.2 KiB

  1. //====== Copyright � 1996-2004, Valve Corporation, All rights reserved. =======
  2. //
  3. // The abstract base operator class - all actions within the scenegraph happen via operators
  4. //
  5. //=============================================================================
  6. #ifndef DMEMOUSEINPUT_H
  7. #define DMEMOUSEINPUT_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "movieobjects/dmeinput.h"
  12. //-----------------------------------------------------------------------------
  13. // A class representing a camera
  14. //-----------------------------------------------------------------------------
  15. class CDmeMouseInput : public CDmeInput
  16. {
  17. DEFINE_ELEMENT( CDmeMouseInput, CDmeInput );
  18. public:
  19. virtual bool IsDirty(); // ie needs to operate
  20. virtual void Operate();
  21. virtual void GetInputAttributes ( CUtlVector< CDmAttribute * > &attrs );
  22. virtual void GetOutputAttributes( CUtlVector< CDmAttribute * > &attrs );
  23. // makes the current mouse position be the origin
  24. void ResetOrigin() { ResetOrigin( 0.0f, 0.0f ); }
  25. void ResetOrigin( float dx, float dy );
  26. protected:
  27. void GetNormalizedCursorPos( float &flX, float &flY );
  28. float m_xOrigin;
  29. float m_yOrigin;
  30. CDmaVar< float > m_x;
  31. CDmaVar< float > m_y;
  32. };
  33. #endif // DMEMOUSEINPUT_H