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/movieobjects/dmeshape.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'public/movieobjects/dmeshape.h')
| -rw-r--r-- | public/movieobjects/dmeshape.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/public/movieobjects/dmeshape.h b/public/movieobjects/dmeshape.h new file mode 100644 index 0000000..fc13b2f --- /dev/null +++ b/public/movieobjects/dmeshape.h @@ -0,0 +1,53 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// A class representing an abstract shape (ie drawable object) +// +//============================================================================= + +#ifndef DMESHAPE_H +#define DMESHAPE_H +#ifdef _WIN32 +#pragma once +#endif + +#include "mathlib/mathlib.h" +#include "datamodel/dmelement.h" +#include "datamodel/dmattribute.h" +#include "datamodel/dmattributevar.h" + + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +class CDmeTransform; +class CDmeDrawSettings; +class CDmeDag; + + +//----------------------------------------------------------------------------- +// A class representing a camera +//----------------------------------------------------------------------------- +class CDmeShape : public CDmElement +{ + DEFINE_ELEMENT( CDmeShape, CDmElement ); + +public: + virtual void Draw( const matrix3x4_t &shapeToWorld, CDmeDrawSettings *pDmeDrawSettings = NULL ); + + virtual void GetBoundingSphere( Vector &c, float &r ) const; + + // Find out how many DmeDag's have this DmeShape as their shape, could be 0 + int GetParentCount() const; + + // Get the nth DmeDag that has this DmeShape as its shape. The order is defined by g_pDataModel->FirstAttributeReferencingElement/NextAttr... + CDmeDag *GetParent( int nParentIndex = 0 ) const; + + // Get the Nth World Matrix for the shape (the world matrix of the Nth DmeDag parent) + void GetShapeToWorldTransform( matrix3x4_t &mat, int nParentIndex = 0 ) const; + +protected: + CDmaVar< bool > m_visible; +}; + + +#endif // DMESHAPE_H |