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

Revision 3028, 1.3 KB checked in by mattausch, 16 years ago (diff)

debug version: what to do with shader programs??

Line 
1#ifndef __TRANSFORM3_H
2#define __TRANSFORM3_H
3
4#include "Matrix4x4.h"
5#include "glInterface.h"
6#include "common.h"
7#include <Cg/cg.h>
8#include <Cg/cgGL.h>
9
10
11namespace CHCDemoEngine
12{
13
14class RenderState;
15
16
17/** Class representing a wrapper class for a 3D transformation
18*/
19class Transform3
20{
21public:
22       
23        /** Creates a transformation.
24        */
25        Transform3(const Matrix4x4 &trafo);
26        /** The identity transformation.
27        */
28        Transform3();
29        /** Loads this transformation.
30        */
31        void Load(RenderState *state); 
32        /** Unloads this transformation
33        */
34        void Unload(RenderState *state);
35        /** Returns the trafo matrix.
36        */
37        inline Matrix4x4 GetMatrix() 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        static CGparameter sModelMatrixParam;
52
53
54protected:
55
56        /// transform matrix
57        Matrix4x4 mMatrix;
58        /// if this matrix is still the identity matrix
59        bool mIsIdentity;
60};
61
62
63}
64
65#endif // __TRANSFORM_H
Note: See TracBrowser for help on using the repository browser.