summaryrefslogtreecommitdiff
path: root/public/movieobjects/dmemdl.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/movieobjects/dmemdl.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'public/movieobjects/dmemdl.h')
-rw-r--r--public/movieobjects/dmemdl.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/public/movieobjects/dmemdl.h b/public/movieobjects/dmemdl.h
new file mode 100644
index 0000000..1d79f86
--- /dev/null
+++ b/public/movieobjects/dmemdl.h
@@ -0,0 +1,79 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// A class representing an MDL
+//
+//=============================================================================
+
+#ifndef DMEMDL_H
+#define DMEMDL_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "datamodel/dmelement.h"
+#include "datamodel/dmattribute.h"
+#include "datamodel/dmattributevar.h"
+#include "movieobjects/dmeshape.h"
+#include "datacache/imdlcache.h"
+#include "tier3/mdlutils.h"
+
+#include "mathlib/vector.h"
+#include <string>
+#include <vector>
+
+
+//-----------------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------------
+class CDmeTransform;
+class IMorph;
+class IMaterial;
+struct SubdivMesh_t;
+class IMesh;
+class CDmeDrawSettings;
+struct matrix3x4_t;
+class CStudioHdr;
+
+
+//-----------------------------------------------------------------------------
+// A class representing an MDL
+//-----------------------------------------------------------------------------
+class CDmeMDL : public CDmeShape
+{
+ DEFINE_ELEMENT( CDmeMDL, CDmeShape );
+
+public:
+ virtual void Draw( const matrix3x4_t& shapeToWorld, CDmeDrawSettings *pDrawSettings = NULL );
+
+ void DrawInEngine( bool bDrawInEngine );
+ bool IsDrawingInEngine() const;
+
+ void SetMDL( MDLHandle_t handle );
+ MDLHandle_t GetMDL( ) const;
+ float GetRadius() const; // NOTE: This radius is one that is centered at the origin
+ void GetBoundingSphere( Vector &vecCenter, float &flRadius );
+ void GetBoundingBox( Vector *pMins, Vector *pMaxs ) const;
+
+ // Computes bone-to-world transforms
+ void SetUpBones( const matrix3x4_t& shapeToWorld, int nMaxBoneCount, matrix3x4_t *pOutputMatrices );
+
+public:
+ CDmaColor m_Color;
+ CDmaVar<int> m_nSkin;
+ CDmaVar<int> m_nBody;
+ CDmaVar<int> m_nSequence;
+ CDmaVar<int> m_nLOD;
+ CDmaVar<float> m_flPlaybackRate;
+ CDmaVar<float> m_flTime;
+ CDmaVar<Vector> m_vecViewTarget;
+ CDmaVar<bool> m_bWorldSpaceViewTarget;
+
+private:
+ void UpdateMDL();
+
+ CMDL m_MDL;
+ bool m_bDrawInEngine;
+};
+
+#endif // DMEMDL_H