00001 00002 00003 00005 00006 00011 00016 00021 // Transform.h // 00023 00024 #ifndef TRANSFORM_H 00025 #define TRANSFORM_H 00026 00027 #include "X3DTypes.h" 00028 #include "X3DGroupingNode.h" 00029 #include "X3DBoundedObject.h" 00030 00031 namespace X3DTK { 00032 namespace X3D { 00033 00038 00039 class Transform : public X3DGroupingNode, public X3DBoundedObject 00040 { 00041 public: 00043 Transform(); 00045 Transform(const SFVec3f ¢er, 00046 const SFRotation &rotation, 00047 const SFVec3f &scale, 00048 const SFRotation &scaleOrientation, 00049 const SFVec3f &translation, 00050 const SFVec3f &bboxCenter, 00051 const SFVec3f &bboxSize); 00053 virtual SFNode clone() const; 00055 virtual ~Transform(); 00056 00058 void setCenter(const SFVec3f ¢er); 00060 void setRotation(const SFRotation &rotation); 00062 void setScale(const SFVec3f &scale); 00064 void setScaleOrientation(const SFRotation &scaleOrientation); 00066 void setTranslation(const SFVec3f &translation); 00067 00069 inline const SFVec3f &getCenter() const {return _center;}; 00071 inline const SFRotation &getRotation() const {return _rotation;}; 00073 inline const SFVec3f &getScale() const {return _scale;}; 00075 inline const SFRotation &getScaleOrientation() const {return _scaleOrientation;}; 00077 inline const SFVec3f &getTranslation() const {return _translation;}; 00078 00080 void load(const X3DFileElement *element); 00082 virtual SFString write() const; 00083 00084 protected: 00086 Transform(const Transform &T); 00087 00088 private: 00090 SFVec3f _center; 00092 SFRotation _rotation; 00094 SFVec3f _scale; 00096 SFRotation _scaleOrientation; 00098 SFVec3f _translation; 00099 }; 00100 00101 } 00102 } 00103 00104 #endif