00001 00002 // X3D_X3DBoundedObject.h // 00004 00005 #ifndef X3DBOUNDEDOBJECT_H 00006 #define X3DBOUNDEDOBJECT_H 00007 00008 #include "X3DTypes.h" 00009 #include "X3D_X3DObject.h" 00010 #include "X3DFileElement.h" 00011 00012 namespace X3DTK { 00013 namespace X3D { 00014 00019 00020 class X3DBoundedObject : public X3DObject 00021 { 00022 public: 00024 X3DBoundedObject(); 00026 X3DBoundedObject(const SFVec3f &bboxCenter, 00027 const SFVec3f &bboxSize); 00029 virtual ~X3DBoundedObject(); 00030 00032 void setBBoxCenter(const SFVec3f &bboxCenter); 00034 void setBBoxSize(const SFVec3f &bboxSize); 00035 00037 inline const SFVec3f &getBBoxCenter() const {return _bboxCenter;}; 00039 inline const SFVec3f &getBBoxSize() const {return _bboxSize;}; 00040 00042 virtual void load(const X3DFileElement *element); 00044 virtual SFString &write(SFString &output) const; 00045 00046 protected: 00048 X3DBoundedObject(const X3DBoundedObject &N); 00049 00050 private: 00052 SFVec3f _bboxCenter; 00054 SFVec3f _bboxSize; 00055 }; 00056 00057 } 00058 } 00059 00060 #endif