Team Fortress 2 Source Code as on 22/4/2020
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.

59 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // various transform-related inputs - translation, rotation, etc.
  4. //
  5. //=============================================================================
  6. #ifndef DMETRANSFORMINPUT_H
  7. #define DMETRANSFORMINPUT_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "movieobjects/dmeinput.h"
  12. //-----------------------------------------------------------------------------
  13. // translation input
  14. //-----------------------------------------------------------------------------
  15. class CDmeTranslationInput : public CDmeInput
  16. {
  17. DEFINE_ELEMENT( CDmeTranslationInput, 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. protected:
  24. CDmaVar< Vector > m_translation;
  25. };
  26. //-----------------------------------------------------------------------------
  27. // rotation input
  28. //-----------------------------------------------------------------------------
  29. class CDmeRotationInput : public CDmeInput
  30. {
  31. DEFINE_ELEMENT( CDmeRotationInput, CDmeInput );
  32. public:
  33. virtual bool IsDirty(); // ie needs to operate
  34. virtual void Operate();
  35. virtual void GetInputAttributes ( CUtlVector< CDmAttribute * > &attrs );
  36. virtual void GetOutputAttributes( CUtlVector< CDmAttribute * > &attrs );
  37. // these should only be used by the application - not other dme's!
  38. void SetRotation( const Quaternion& quat );
  39. void SetRotation( const QAngle& qangle );
  40. protected:
  41. CDmaVar< Quaternion > m_orientation;
  42. CDmaVar< QAngle > m_angles;
  43. };
  44. #endif // DMETRANSFORMINPUT_H