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/dmetransform.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'public/movieobjects/dmetransform.h')
| -rw-r--r-- | public/movieobjects/dmetransform.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/public/movieobjects/dmetransform.h b/public/movieobjects/dmetransform.h new file mode 100644 index 0000000..d539ab5 --- /dev/null +++ b/public/movieobjects/dmetransform.h @@ -0,0 +1,49 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// A class representing a transform +// +//============================================================================= + +#ifndef DMETRANSFORM_H +#define DMETRANSFORM_H +#ifdef _WIN32 +#pragma once +#endif + +#include "datamodel/dmelement.h" + + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +struct matrix3x4_t; + + +//----------------------------------------------------------------------------- +// A class representing a transformation matrix +//----------------------------------------------------------------------------- +class CDmeTransform : public CDmElement +{ + DEFINE_ELEMENT( CDmeTransform, CDmElement ); + +public: + // FIXME: Replace this with actual methods to do editing + // (scale/shear, etc.) + void SetTransform( const matrix3x4_t &transform ); + void GetTransform( matrix3x4_t &transform ); + + const Vector &GetPosition() const; + void SetPosition( const Vector &vecPosition ); + const Quaternion &GetOrientation() const; + void SetOrientation( const Quaternion &orientation ); + + CDmAttribute *GetPositionAttribute(); + CDmAttribute *GetOrientationAttribute(); + +private: + CDmaVar<Vector> m_Position; + CDmaVar<Quaternion> m_Orientation; +}; + + +#endif // DMETRANSFORM_H |