#ifndef OSG_TEXMAT #define OSG_TEXMAT 1 #include #include namespace osg { /** Texture Matrix state class for encapsulating OpenGL texture matrix functionality.*/ class SG_EXPORT TexMat : public StateAttribute { public : TexMat( void ); virtual Object* clone() const { return new TexMat(); } virtual bool isSameKindAs(const Object* obj) const { return dynamic_cast(obj)!=NULL; } virtual const char* className() const { return "TexMat"; } virtual const Type getType() const { return TEXMAT; } /** Set the texture matrix */ inline void setMatrix(const Matrix& matrix) { _matrix = matrix; } /** Get the texture matrix */ inline Matrix& getMatrix() { return _matrix; } /** Get the const texture matrix */ inline const Matrix& getMatrix() const { return _matrix; } /** apply as OpenGL texture matrix.*/ virtual void apply(State& state) const; protected: virtual ~TexMat( void ); Matrix _matrix; }; }; #endif