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.

145 lines
3.5 KiB

  1. //===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
  2. //
  3. // Dme Ik rules
  4. //
  5. //===========================================================================
  6. #ifndef DMEIK_H
  7. #define DMEIK_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. // Valve includes
  12. #include "datamodel/dmelement.h"
  13. #include "datamodel/dmattributevar.h"
  14. //-----------------------------------------------------------------------------
  15. // DmeIkChain
  16. //-----------------------------------------------------------------------------
  17. class CDmeIkChain : public CDmElement
  18. {
  19. DEFINE_ELEMENT( CDmeIkChain, CDmElement );
  20. public:
  21. CDmaString m_sEndJoint;
  22. CDmaVar< float > m_flHeight;
  23. CDmaVar< float > m_flPad;
  24. CDmaVar< float > m_flFloor;
  25. CDmaVar< Vector > m_vKnee;
  26. CDmaVar< Vector > m_vCenter;
  27. };
  28. //-----------------------------------------------------------------------------
  29. // DmeIkLock
  30. //-----------------------------------------------------------------------------
  31. class CDmeIkLock : public CDmElement
  32. {
  33. DEFINE_ELEMENT( CDmeIkLock, CDmElement );
  34. public:
  35. CDmaElement< CDmeIkChain > m_eIkChain;
  36. CDmaVar< float > m_flLockPosition;
  37. CDmaVar< float > m_flLockRotation;
  38. };
  39. //-----------------------------------------------------------------------------
  40. // DmeIkRange
  41. //-----------------------------------------------------------------------------
  42. class CDmeIkRange : public CDmElement
  43. {
  44. DEFINE_ELEMENT( CDmeIkRange, CDmElement );
  45. public:
  46. CDmaVar< int > m_nStartFrame;
  47. CDmaVar< int > m_nMaxStartFrame;
  48. CDmaVar< int > m_nMaxEndFrame;
  49. CDmaVar< int > m_nEndFrame;
  50. };
  51. //-----------------------------------------------------------------------------
  52. // DmeIkRule
  53. //-----------------------------------------------------------------------------
  54. class CDmeIkRule : public CDmElement
  55. {
  56. DEFINE_ELEMENT( CDmeIkRule, CDmElement );
  57. public:
  58. enum Use_t
  59. {
  60. USE_NONE = 0,
  61. USE_SEQUENCE = 1,
  62. USE_SOURCE = 2
  63. };
  64. CDmaElement< CDmeIkChain > m_eIkChain;
  65. CDmaElement< CDmeIkRange > m_eRange;
  66. CDmaVar< int > m_nUseType;
  67. };
  68. //-----------------------------------------------------------------------------
  69. // DmeIkTouchRule
  70. //-----------------------------------------------------------------------------
  71. class CDmeIkTouchRule : public CDmeIkRule
  72. {
  73. DEFINE_ELEMENT( CDmeIkTouchRule, CDmeIkRule );
  74. public:
  75. CDmaString m_sBoneName;
  76. };
  77. //-----------------------------------------------------------------------------
  78. // DmeIkFootstepRule
  79. //-----------------------------------------------------------------------------
  80. class CDmeIkFootstepRule : public CDmeIkRule
  81. {
  82. DEFINE_ELEMENT( CDmeIkFootstepRule, CDmeIkRule );
  83. public:
  84. // These are optional
  85. // CDmaVar< int > m_nContact;
  86. // CDmaVar< float > m_flHeight;
  87. // CDmaVar< float > m_flFloor;
  88. // CDmaVar< float > m_flPad;
  89. };
  90. //-----------------------------------------------------------------------------
  91. // DmeIkAttachmentRule
  92. //-----------------------------------------------------------------------------
  93. class CDmeIkAttachmentRule : public CDmeIkRule
  94. {
  95. DEFINE_ELEMENT( CDmeIkAttachmentRule, CDmeIkRule );
  96. public:
  97. CDmaString m_sAttachmentName;
  98. CDmaVar< float > m_flRadius;
  99. // These are optional
  100. // CDmaString m_sFallbackBone;
  101. // CDmaVar< Vector > m_vFallbackPoint;
  102. // CDmaVar< Quaternion > m_qFallbackRotation;
  103. };
  104. //-----------------------------------------------------------------------------
  105. // DmeIkReleaseRule
  106. //-----------------------------------------------------------------------------
  107. class CDmeIkReleaseRule : public CDmeIkRule
  108. {
  109. DEFINE_ELEMENT( CDmeIkReleaseRule, CDmeIkRule );
  110. public:
  111. };
  112. #endif // DMEIK_H