Main Page | Modules | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

X3D_Transform.h

Go to the documentation of this file.
00001 #ifndef X3DTK_X3D_TRANSFORM_H
00002 #define X3DTK_X3D_TRANSFORM_H
00003 
00004 #include "X3DTypes.h"
00005 #include "X3D_X3DGroupingNode.h"
00006 #include "X3D_X3DBoundedObject.h"
00007 
00008 namespace X3DTK {
00009 namespace X3D {
00010 
00019 class Transform : public X3DGroupingNode, public X3DBoundedObject
00020 {
00021 public:  
00023   Transform();
00025   Transform(const SFVec3f &center, 
00026             const SFRotation &rotation, 
00027             const SFVec3f &scale, 
00028             const SFRotation &scaleOrientation, 
00029             const SFVec3f &translation, 
00030             const SFVec3f &bboxCenter, 
00031             const SFVec3f &bboxSize);
00033   virtual SFAbstractNode clone() const;
00035   virtual ~Transform();
00036 
00038   void setCenter(const SFVec3f &center);
00040   void setRotation(const SFRotation &rotation);
00042   void setScale(const SFVec3f &scale);
00044   void setScaleOrientation(const SFRotation &scaleOrientation);
00046   void setTranslation(const SFVec3f &translation);
00047 
00049   inline const SFVec3f &getCenter() const {return _center;};
00051   inline const SFRotation &getRotation() const {return _rotation;};
00053   inline const SFVec3f &getScale() const {return _scale;};
00055   inline const SFRotation &getScaleOrientation() const {return _scaleOrientation;};
00057   inline const SFVec3f &getTranslation() const {return _translation;};
00058 
00060   void load(const X3DFileElement *element);
00062   virtual SFString &write(SFString &output) const;
00063 
00064 protected:
00066   Transform(const Transform &T);
00067 
00068 private:
00070   SFVec3f _center;
00072   SFRotation _rotation;
00074   SFVec3f _scale;
00076   SFRotation _scaleOrientation;
00078   SFVec3f _translation;
00079 };
00080 
00081 }
00082 }
00083 
00084 #endif

Generated on Wed Apr 7 12:15:22 2004 for X3DToolKit by doxygen 1.3.3