diff options
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 |