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.

218 lines
6.6 KiB

  1. //===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
  2. //
  3. // Dme Ik rules
  4. //
  5. //===========================================================================
  6. // Valve includes
  7. #include "datamodel/dmelementfactoryhelper.h"
  8. #include "mdlobjects/dmeik.h"
  9. // memdbgon must be the last include file in a .cpp file!!!
  10. #include "tier0/memdbgon.h"
  11. //-----------------------------------------------------------------------------
  12. // DmeIkChain
  13. //-----------------------------------------------------------------------------
  14. IMPLEMENT_ELEMENT_FACTORY( DmeIkChain, CDmeIkChain );
  15. //-----------------------------------------------------------------------------
  16. //
  17. //-----------------------------------------------------------------------------
  18. void CDmeIkChain::OnConstruction()
  19. {
  20. m_sEndJoint.Init( this, "endJoint" );
  21. m_flHeight.InitAndSet( this, "height", 18.0f );
  22. m_flPad.Init( this, "pad" );
  23. m_flFloor.Init( this, "floor" );
  24. m_vKnee.Init( this, "knee" );
  25. m_vCenter.Init( this, "center" );
  26. }
  27. //-----------------------------------------------------------------------------
  28. //
  29. //-----------------------------------------------------------------------------
  30. void CDmeIkChain::OnDestruction()
  31. {
  32. }
  33. //-----------------------------------------------------------------------------
  34. // DmeIkLock
  35. //-----------------------------------------------------------------------------
  36. IMPLEMENT_ELEMENT_FACTORY( DmeIkLock, CDmeIkLock );
  37. //-----------------------------------------------------------------------------
  38. //
  39. //-----------------------------------------------------------------------------
  40. void CDmeIkLock::OnConstruction()
  41. {
  42. m_eIkChain.Init( this, "ikChain", FATTRIB_NEVERCOPY );
  43. m_flLockPosition.Init( this, "lockPosition" );
  44. m_flLockRotation.Init( this, "lockRotation" );
  45. }
  46. //-----------------------------------------------------------------------------
  47. //
  48. //-----------------------------------------------------------------------------
  49. void CDmeIkLock::OnDestruction()
  50. {
  51. }
  52. //-----------------------------------------------------------------------------
  53. // DmeIkRange
  54. //-----------------------------------------------------------------------------
  55. IMPLEMENT_ELEMENT_FACTORY( DmeIkRange, CDmeIkRange );
  56. //-----------------------------------------------------------------------------
  57. //
  58. //-----------------------------------------------------------------------------
  59. void CDmeIkRange::OnConstruction()
  60. {
  61. m_nStartFrame.Init( this, "startFrame" );
  62. m_nEndFrame.Init( this, "endFrame" );
  63. m_nMaxStartFrame.Init( this, "maxStartFrame" );
  64. m_nMaxEndFrame.Init( this, "maxEndFrame" );
  65. }
  66. //-----------------------------------------------------------------------------
  67. //
  68. //-----------------------------------------------------------------------------
  69. void CDmeIkRange::OnDestruction()
  70. {
  71. }
  72. //-----------------------------------------------------------------------------
  73. // DmeIkRule
  74. //-----------------------------------------------------------------------------
  75. IMPLEMENT_ELEMENT_FACTORY( DmeIkRule, CDmeIkRule );
  76. //-----------------------------------------------------------------------------
  77. //
  78. //-----------------------------------------------------------------------------
  79. void CDmeIkRule::OnConstruction()
  80. {
  81. m_eIkChain.Init( this, "ikChain", FATTRIB_NEVERCOPY );
  82. m_eRange.InitAndCreate( this, "range" );
  83. m_nUseType.InitAndSet( this, "useType", USE_SEQUENCE );
  84. }
  85. //-----------------------------------------------------------------------------
  86. //
  87. //-----------------------------------------------------------------------------
  88. void CDmeIkRule::OnDestruction()
  89. {
  90. }
  91. //-----------------------------------------------------------------------------
  92. // DmeIkTouchRule
  93. //-----------------------------------------------------------------------------
  94. IMPLEMENT_ELEMENT_FACTORY( DmeIkTouchRule, CDmeIkTouchRule );
  95. //-----------------------------------------------------------------------------
  96. //
  97. //-----------------------------------------------------------------------------
  98. void CDmeIkTouchRule::OnConstruction()
  99. {
  100. m_sBoneName.Init( this, "boneName" );
  101. }
  102. //-----------------------------------------------------------------------------
  103. //
  104. //-----------------------------------------------------------------------------
  105. void CDmeIkTouchRule::OnDestruction()
  106. {
  107. }
  108. //-----------------------------------------------------------------------------
  109. // DmeIkFootstepRule
  110. //-----------------------------------------------------------------------------
  111. IMPLEMENT_ELEMENT_FACTORY( DmeIkFootstepRule, CDmeIkFootstepRule );
  112. //-----------------------------------------------------------------------------
  113. //
  114. //-----------------------------------------------------------------------------
  115. void CDmeIkFootstepRule::OnConstruction()
  116. {
  117. // These are optional
  118. // m_nContact.Init( this, "contact" );
  119. // m_flHeight.Init( this, "height" );
  120. // m_flFloor.Init( this, "floor" );
  121. // m_flPad.Init( this, "pad" );
  122. }
  123. //-----------------------------------------------------------------------------
  124. //
  125. //-----------------------------------------------------------------------------
  126. void CDmeIkFootstepRule::OnDestruction()
  127. {
  128. }
  129. //-----------------------------------------------------------------------------
  130. // DmeIkAttachmentRule
  131. //-----------------------------------------------------------------------------
  132. IMPLEMENT_ELEMENT_FACTORY( DmeIkAttachmentRule, CDmeIkAttachmentRule );
  133. //-----------------------------------------------------------------------------
  134. //
  135. //-----------------------------------------------------------------------------
  136. void CDmeIkAttachmentRule::OnConstruction()
  137. {
  138. m_sAttachmentName.Init( this, "attachmentName" );
  139. m_flRadius.Init( this, "radius" );
  140. // These are optional
  141. // m_sFallbackBone.Init( this, "fallbackBone" );
  142. // m_vFallbackPoint.Init( this, "fallbackPoint" );
  143. // m_qFallbackRotation.Init( this, "fallbackRotation" );
  144. }
  145. //-----------------------------------------------------------------------------
  146. //
  147. //-----------------------------------------------------------------------------
  148. void CDmeIkAttachmentRule::OnDestruction()
  149. {
  150. }
  151. //-----------------------------------------------------------------------------
  152. // DmeIkReleaseRule
  153. //-----------------------------------------------------------------------------
  154. IMPLEMENT_ELEMENT_FACTORY( DmeIkReleaseRule, CDmeIkReleaseRule );
  155. //-----------------------------------------------------------------------------
  156. //
  157. //-----------------------------------------------------------------------------
  158. void CDmeIkReleaseRule::OnConstruction()
  159. {
  160. }
  161. //-----------------------------------------------------------------------------
  162. //
  163. //-----------------------------------------------------------------------------
  164. void CDmeIkReleaseRule::OnDestruction()
  165. {
  166. }