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??

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