source: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Transform3.h @ 3113

Revision 3113, 1.2 KB checked in by mattausch, 16 years ago (diff)

problm with technique system

Line 
1#ifndef __TRANSFORM3_H
2#define __TRANSFORM3_H
3
4#include "Matrix4x4.h"
5#include "common.h"
6
7
8namespace CHCDemoEngine
9{
10
11class RenderState;
12
13
14/** Wrapper class for a 3D transformation
15*/
16class Transform3
17{
18public:
19       
20        /** Creates a transformation.
21        */
22        Transform3(const Matrix4x4 &trafo);
23        /** The identity transformation.
24        */
25        Transform3();
26        /** Loads this transformation.
27        */
28        void Load(RenderState *state); 
29        /** Unloads this transformation
30        */
31        void Unload(RenderState *state);
32        /** Returns the trafo matrix.
33        */
34        inline Matrix4x4 GetMatrix() const  { return mMatrix; }
35        /** Returns pointer to trafo matrix
36        */
37        inline const Matrix4x4 *GetPMatrix() const { return &mMatrix; }
38        /** See Get
39        */
40        inline void SetMatrix(const Matrix4x4 &trafo) { mIsIdentity = false; mMatrix = trafo; }
41        /** Right multiplies with the given matrix.
42        */
43        void MultMatrix(const Matrix4x4 &trafo);
44        /** Resets trafo to identiy.
45        */
46        void Reset();
47        /** Returns true if this transformation is the identity.
48        */
49        inline bool IsIdentity() const { return mIsIdentity; }
50
51
52protected:
53
54        /// transform matrix
55        Matrix4x4 mMatrix;
56        /// if this matrix is still the identity matrix
57        bool mIsIdentity;
58};
59
60
61}
62
63#endif // __TRANSFORM_H
Note: See TracBrowser for help on using the repository browser.