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.

74 lines
2.3 KiB

  1. //===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
  2. //
  3. // Dme version of QC $boneflexdriver
  4. //
  5. //===========================================================================
  6. #ifndef BONEFLEXDRIVER_H
  7. #define BONEFLEXDRIVER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. // Valve includes
  12. #include "mdlobjects/dmemdllist.h"
  13. //-----------------------------------------------------------------------------
  14. // The control for a DmeBoneFlexDriver
  15. //-----------------------------------------------------------------------------
  16. class CDmeBoneFlexDriverControl : public CDmElement
  17. {
  18. DEFINE_ELEMENT( CDmeBoneFlexDriverControl, CDmElement );
  19. public:
  20. // Sets the bone component to be in the range [STUDIO_BONE_FLEX_TX, STUDIO_BONE_FLEX_RZ]
  21. int SetBoneComponent( int nBoneComponent );
  22. CDmaString m_sFlexControllerName; // Name of flex controller to drive
  23. CDmaVar< int > m_nBoneComponent; // Component of bone to drive flex controller, StudioBoneFlexComponent_t
  24. CDmaVar< float > m_flMin; // Min value of bone component mapped to 0 on flex controller
  25. CDmaVar< float > m_flMax; // Max value of bone component mapped to 1 on flex controller (inches if T, degress if R)
  26. };
  27. //-----------------------------------------------------------------------------
  28. // $QC boneflexdriver
  29. //-----------------------------------------------------------------------------
  30. class CDmeBoneFlexDriver : public CDmeMdlList
  31. {
  32. DEFINE_ELEMENT( CDmeBoneFlexDriver, CDmeMdlList );
  33. public:
  34. virtual CDmAttribute *GetListAttr() { return m_eControlList.GetAttribute(); }
  35. CDmeBoneFlexDriverControl *FindOrCreateControl( const char *pszControlName );
  36. CDmaString m_sBoneName; // Name of bone to drive flex controller
  37. CDmaElementArray< CDmeBoneFlexDriverControl > m_eControlList; // List of flex controllers to drive
  38. };
  39. //-----------------------------------------------------------------------------
  40. // A list of DmeBoneFlexDriver elements
  41. //-----------------------------------------------------------------------------
  42. class CDmeBoneFlexDriverList : public CDmeMdlList
  43. {
  44. DEFINE_ELEMENT( CDmeBoneFlexDriverList, CDmeMdlList );
  45. public:
  46. virtual CDmAttribute *GetListAttr() { return m_eBoneFlexDriverList.GetAttribute(); }
  47. CDmeBoneFlexDriver *FindOrCreateBoneFlexDriver( const char *pszBoneName );
  48. CDmaElementArray< CDmeBoneFlexDriver > m_eBoneFlexDriverList;
  49. };
  50. #endif // BONEFLEXDRIVER_H