00001 #ifndef X3DTK_MESH_TRANSFORM_H 00002 #define X3DTK_MESH_TRANSFORM_H 00003 00004 #include "MESH_X3DGroupingNode.h" 00005 00006 namespace X3DTK { 00007 namespace MESH { 00008 00015 class Transform : public X3DGroupingNode 00016 { 00017 public: 00019 Transform(); 00021 Transform(const SFVec3f ¢er, 00022 const SFRotation &rotation, 00023 const SFVec3f &scale, 00024 const SFRotation &scaleOrientation, 00025 const SFVec3f &translation); 00027 virtual SFAbstractNode clone() const; 00029 virtual ~Transform(); 00030 00032 void setCenter(const SFVec3f ¢er); 00034 void setRotation(const SFRotation &rotation); 00036 void setScale(const SFVec3f &scale); 00038 void setScaleOrientation(const SFRotation &scaleOrientation); 00040 void setTranslation(const SFVec3f &translation); 00041 00043 inline const SFVec3f &getCenter() const {return _center;}; 00045 inline const SFRotation &getRotation() const {return _rotation;}; 00047 inline const SFVec3f &getScale() const {return _scale;}; 00049 inline const SFRotation &getScaleOrientation() const {return _scaleOrientation;}; 00051 inline const SFVec3f &getTranslation() const {return _translation;}; 00052 00054 SFMatrix34f getTransform() const; 00055 00056 protected: 00058 Transform(const Transform &T); 00059 00060 private: 00061 SFVec3f _center; 00062 SFRotation _rotation; 00063 SFVec3f _scale; 00064 SFRotation _scaleOrientation; 00065 SFVec3f _translation; 00066 }; 00067 00068 } 00069 } 00070 00071 #endif