diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/mdlobjects/dmeboneflexdriver.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'public/mdlobjects/dmeboneflexdriver.h')
| -rw-r--r-- | public/mdlobjects/dmeboneflexdriver.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/public/mdlobjects/dmeboneflexdriver.h b/public/mdlobjects/dmeboneflexdriver.h new file mode 100644 index 0000000..2f0d1c8 --- /dev/null +++ b/public/mdlobjects/dmeboneflexdriver.h @@ -0,0 +1,74 @@ +//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ==== +// +// Dme version of QC $boneflexdriver +// +//=========================================================================== + + +#ifndef BONEFLEXDRIVER_H +#define BONEFLEXDRIVER_H + + +#ifdef _WIN32 +#pragma once +#endif + + +// Valve includes +#include "mdlobjects/dmemdllist.h" + + +//----------------------------------------------------------------------------- +// The control for a DmeBoneFlexDriver +//----------------------------------------------------------------------------- +class CDmeBoneFlexDriverControl : public CDmElement +{ + DEFINE_ELEMENT( CDmeBoneFlexDriverControl, CDmElement ); + +public: + // Sets the bone component to be in the range [STUDIO_BONE_FLEX_TX, STUDIO_BONE_FLEX_RZ] + int SetBoneComponent( int nBoneComponent ); + + CDmaString m_sFlexControllerName; // Name of flex controller to drive + CDmaVar< int > m_nBoneComponent; // Component of bone to drive flex controller, StudioBoneFlexComponent_t + CDmaVar< float > m_flMin; // Min value of bone component mapped to 0 on flex controller + CDmaVar< float > m_flMax; // Max value of bone component mapped to 1 on flex controller (inches if T, degress if R) + +}; + + +//----------------------------------------------------------------------------- +// $QC boneflexdriver +//----------------------------------------------------------------------------- +class CDmeBoneFlexDriver : public CDmeMdlList +{ + DEFINE_ELEMENT( CDmeBoneFlexDriver, CDmeMdlList ); + +public: + virtual CDmAttribute *GetListAttr() { return m_eControlList.GetAttribute(); } + + CDmeBoneFlexDriverControl *FindOrCreateControl( const char *pszControlName ); + + CDmaString m_sBoneName; // Name of bone to drive flex controller + CDmaElementArray< CDmeBoneFlexDriverControl > m_eControlList; // List of flex controllers to drive + +}; + + +//----------------------------------------------------------------------------- +// A list of DmeBoneFlexDriver elements +//----------------------------------------------------------------------------- +class CDmeBoneFlexDriverList : public CDmeMdlList +{ + DEFINE_ELEMENT( CDmeBoneFlexDriverList, CDmeMdlList ); + +public: + virtual CDmAttribute *GetListAttr() { return m_eBoneFlexDriverList.GetAttribute(); } + + CDmeBoneFlexDriver *FindOrCreateBoneFlexDriver( const char *pszBoneName ); + + CDmaElementArray< CDmeBoneFlexDriver > m_eBoneFlexDriverList; +}; + + +#endif // BONEFLEXDRIVER_H |