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.

153 lines
3.8 KiB

  1. //====== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. =====
  2. //
  3. // DmeAnimationAssemblyCommand
  4. //
  5. //=============================================================================
  6. #ifndef DMEANIMATIONASSEMBLYCOMMAND_H
  7. #define DMEANIMATIONASSEMBLYCOMMAND_H
  8. #if defined( _WIN32 )
  9. #pragma once
  10. #endif
  11. // Valve includes
  12. #include "mdlobjects/dmeassemblycommand.h"
  13. #include "mdlobjects/dmesequence.h"
  14. #include "movieobjects/dmelog.h"
  15. //-----------------------------------------------------------------------------
  16. // Forward Declarations
  17. //-----------------------------------------------------------------------------
  18. class CDmeSequence;
  19. //-----------------------------------------------------------------------------
  20. //
  21. //-----------------------------------------------------------------------------
  22. class CDmeAnimationAssemblyCommand : public CDmeAssemblyCommand
  23. {
  24. DEFINE_ELEMENT( CDmeAnimationAssemblyCommand, CDmeAssemblyCommand );
  25. public:
  26. };
  27. //-----------------------------------------------------------------------------
  28. //
  29. //-----------------------------------------------------------------------------
  30. class CDmeFixupLoop : public CDmeAnimationAssemblyCommand
  31. {
  32. DEFINE_ELEMENT( CDmeFixupLoop, CDmeAnimationAssemblyCommand );
  33. public:
  34. // From CDmeAssemblyCommand
  35. virtual bool Apply( CDmElement *pDmElement );
  36. CDmaVar< int > m_nStartFrame;
  37. CDmaVar< int > m_nEndFrame;
  38. protected:
  39. template< class T > void Apply(
  40. CDmeTypedLog< T > *pDmeTypedLog,
  41. const DmeTime_t &dmeTimeStart,
  42. const DmeTime_t &dmeTimeEnd ) const;
  43. };
  44. //-----------------------------------------------------------------------------
  45. //
  46. //-----------------------------------------------------------------------------
  47. class CDmeSubtract : public CDmeAnimationAssemblyCommand
  48. {
  49. DEFINE_ELEMENT( CDmeSubtract, CDmeAnimationAssemblyCommand );
  50. public:
  51. // From CDmeAssemblyCommand
  52. virtual bool Apply( CDmElement *pDmElement );
  53. CDmaElement< CDmeSequenceBase > m_eSequence;
  54. CDmaVar< int > m_nFrame;
  55. protected:
  56. template< class T > void Subtract(
  57. CDmeTypedLog< T > *pDmeTypedLogDst,
  58. const CDmeTypedLog< T > *pDmeTypedLogSrc,
  59. const DmeTime_t &dmeTimeSrc ) const;
  60. virtual void Subtract(
  61. Vector &vResult,
  62. const Vector &vDst,
  63. const Vector &vSrc ) const;
  64. virtual void Subtract(
  65. Quaternion &vResult,
  66. const Quaternion &vDst,
  67. const Quaternion &vSrc ) const;
  68. };
  69. //-----------------------------------------------------------------------------
  70. //
  71. //-----------------------------------------------------------------------------
  72. class CDmePreSubtract : public CDmeSubtract
  73. {
  74. DEFINE_ELEMENT( CDmePreSubtract, CDmeSubtract );
  75. public:
  76. protected:
  77. virtual void Subtract(
  78. Vector &vResult,
  79. const Vector &vDst,
  80. const Vector &vSrc ) const;
  81. virtual void Subtract(
  82. Quaternion &vResult,
  83. const Quaternion &vDst,
  84. const Quaternion &vSrc ) const;
  85. };
  86. //-----------------------------------------------------------------------------
  87. //
  88. //-----------------------------------------------------------------------------
  89. class CDmeRotateTo : public CDmeAnimationAssemblyCommand
  90. {
  91. DEFINE_ELEMENT( CDmeRotateTo, CDmeAnimationAssemblyCommand );
  92. public:
  93. // From CDmeAssemblyCommand
  94. virtual bool Apply( CDmElement *pDmElement );
  95. CDmaVar< float > m_flAngle; // Specified in degrees
  96. protected:
  97. void SubApply( CDmeDag *pDmeDag, CDmeChannelsClip *pDmeChannelsClip, bool bZUp );
  98. };
  99. //-----------------------------------------------------------------------------
  100. //
  101. //-----------------------------------------------------------------------------
  102. class CDmeBoneMaskCmd : public CDmeAnimationAssemblyCommand
  103. {
  104. DEFINE_ELEMENT( CDmeBoneMaskCmd, CDmeAnimationAssemblyCommand );
  105. public:
  106. // From CDmeAssemblyCommand
  107. virtual bool Apply( CDmElement *pDmElement );
  108. protected:
  109. void SubApply( CDmeChannelsClip *pDmeChannelsClip, CDmeDag *pDmeDag, CDmeBoneMask *pDmeBoneMask );
  110. };
  111. #endif // DMEANIMATIONASSEMBLYCOMMAND_H