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.

49 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // A class representing a transform
  4. //
  5. //=============================================================================
  6. #ifndef DMETRANSFORM_H
  7. #define DMETRANSFORM_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "datamodel/dmelement.h"
  12. //-----------------------------------------------------------------------------
  13. // Forward declarations
  14. //-----------------------------------------------------------------------------
  15. struct matrix3x4_t;
  16. //-----------------------------------------------------------------------------
  17. // A class representing a transformation matrix
  18. //-----------------------------------------------------------------------------
  19. class CDmeTransform : public CDmElement
  20. {
  21. DEFINE_ELEMENT( CDmeTransform, CDmElement );
  22. public:
  23. // FIXME: Replace this with actual methods to do editing
  24. // (scale/shear, etc.)
  25. void SetTransform( const matrix3x4_t &transform );
  26. void GetTransform( matrix3x4_t &transform );
  27. const Vector &GetPosition() const;
  28. void SetPosition( const Vector &vecPosition );
  29. const Quaternion &GetOrientation() const;
  30. void SetOrientation( const Quaternion &orientation );
  31. CDmAttribute *GetPositionAttribute();
  32. CDmAttribute *GetOrientationAttribute();
  33. private:
  34. CDmaVar<Vector> m_Position;
  35. CDmaVar<Quaternion> m_Orientation;
  36. };
  37. #endif // DMETRANSFORM_H