00001 00002 // X3DBoundedObject.h // 00004 00005 #ifndef X3DBOUNDEDOBJECT_H 00006 #define X3DBOUNDEDOBJECT_H 00007 00008 #include "X3DTypes.h" 00009 #include "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); 00028 00030 X3DBoundedObject(const X3DBoundedObject &N); 00031 00033 virtual ~X3DBoundedObject(); 00034 00036 void setBboxCenter(const SFVec3f &bboxCenter); 00038 void setBboxSize(const SFVec3f &bboxSize); 00039 00041 inline const SFVec3f &getBboxCenter() const {return _bboxCenter;}; 00043 inline const SFVec3f &getBboxSize() const {return _bboxSize;}; 00044 00046 virtual void load(const X3DFileElement *element); 00048 virtual SFString write() const; 00049 00050 private: 00052 SFVec3f _bboxCenter; 00054 SFVec3f _bboxSize; 00055 }; 00056 00057 } 00058 } 00059 00060 #endif