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 /utils/hlmv/physmesh.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'utils/hlmv/physmesh.h')
| -rw-r--r-- | utils/hlmv/physmesh.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/utils/hlmv/physmesh.h b/utils/hlmv/physmesh.h new file mode 100644 index 0000000..1695ed6 --- /dev/null +++ b/utils/hlmv/physmesh.h @@ -0,0 +1,72 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef PHYSMESH_H +#define PHYSMESH_H + +#ifdef _WIN32 +#pragma once +#endif + +#include "datacache/imdlcache.h" +#include "vphysics_interface.h" +#include "vcollide_parse.h" + + +struct studiohdr_t; + +struct hlmvsolid_t : public solid_t +{ + float massBias; + int surfacePropIndex; +}; + +struct merge_t +{ + int parent; + int child; +}; + +struct editparams_t +{ + float totalMass; + char rootName[128]; + int concave; + int mergeCount; + merge_t mergeList[32]; // there are never very many of these, so don't bother doing anything dynamic +}; + +class CPhysmesh +{ +public: + void Clear( void ); + + char m_boneName[64]; + int m_vertCount; + Vector *m_pVerts; + matrix3x4_t m_matrix; + + hlmvsolid_t m_solid; + constraint_ragdollparams_t m_constraint; + ICollisionQuery *m_pCollisionModel; +}; + +class IStudioPhysics +{ +public: + virtual ~IStudioPhysics( void ) {} + + virtual char *DumpQC( void ) = 0; + virtual int Count( void ) = 0; + virtual CPhysmesh *GetMesh( int index ) = 0; + virtual float GetMass( void ) = 0; +}; + +IStudioPhysics *LoadPhysics( MDLHandle_t mdlHandle ); +void DestroyPhysics( IStudioPhysics *pStudioPhysics ); + +#endif // PHYSMESH_H |