00001 00002 // X3D_X3DTextureTransform2DNode.h // 00004 00005 #ifndef X3DTEXTURETRANSFORM2DNODE_H 00006 #define X3DTEXTURETRANSFORM2DNODE_H 00007 00008 #include "X3DTypes.h" 00009 #include "X3D_X3DTextureTransformNode.h" 00010 00011 namespace X3DTK { 00012 namespace X3D { 00013 00018 00019 class X3DTextureTransform2DNode : public X3DTextureTransformNode 00020 { 00021 public: 00023 X3DTextureTransform2DNode(); 00025 X3DTextureTransform2DNode(const SFVec2f ¢er, 00026 SFFloat rotation, 00027 const SFVec2f &scale, 00028 const SFVec2f &translation); 00030 virtual ~X3DTextureTransform2DNode(); 00031 00033 void setCenter(const SFVec2f ¢er); 00035 void setRotation(const SFFloat &rotation); 00037 void setScale(const SFVec2f &scale); 00039 void setTranslation(const SFVec2f &translation); 00040 00042 inline const SFVec2f &getCenter() const {return _center;}; 00044 inline const SFFloat &getRotation() const {return _rotation;}; 00046 inline const SFVec2f &getScale() const {return _scale;}; 00048 inline const SFVec2f &getTranslation() const {return _translation;}; 00049 00051 void load(const X3DFileElement *element); 00053 virtual SFString &write(SFString &output) const; 00054 00055 protected: 00057 X3DTextureTransform2DNode(const X3DTextureTransform2DNode &T); 00058 00059 private: 00061 SFVec2f _center; 00063 SFFloat _rotation; 00065 SFVec2f _scale; 00067 SFVec2f _translation; 00068 }; 00069 00070 } 00071 } 00072 00073 #endif