00001 #ifndef X3DTK_X3D_X3DTEXTURETRANSFORM2DNODE_H 00002 #define X3DTK_X3D_X3DTEXTURETRANSFORM2DNODE_H 00003 00004 #include "X3DTypes.h" 00005 #include "X3D_X3DTextureTransformNode.h" 00006 00007 namespace X3DTK { 00008 namespace X3D { 00009 00018 class X3DTextureTransform2DNode : public X3DTextureTransformNode 00019 { 00020 public: 00022 X3DTextureTransform2DNode(); 00024 X3DTextureTransform2DNode(const SFVec2f ¢er, 00025 SFFloat rotation, 00026 const SFVec2f &scale, 00027 const SFVec2f &translation); 00029 virtual ~X3DTextureTransform2DNode(); 00030 00032 void setCenter(const SFVec2f ¢er); 00034 void setRotation(const SFFloat &rotation); 00036 void setScale(const SFVec2f &scale); 00038 void setTranslation(const SFVec2f &translation); 00039 00041 inline const SFVec2f &getCenter() const {return _center;}; 00043 inline const SFFloat &getRotation() const {return _rotation;}; 00045 inline const SFVec2f &getScale() const {return _scale;}; 00047 inline const SFVec2f &getTranslation() const {return _translation;}; 00048 00050 void load(const X3DFileElement *element); 00052 virtual SFString &write(SFString &output) const; 00053 00054 protected: 00056 X3DTextureTransform2DNode(const X3DTextureTransform2DNode &T); 00057 00058 private: 00060 SFVec2f _center; 00062 SFFloat _rotation; 00064 SFVec2f _scale; 00066 SFVec2f _translation; 00067 }; 00068 00069 } 00070 } 00071 00072 #endif