00001 00002 // X3D_BBoxUpdaterStateVariables.h // 00004 00005 #ifndef BBOXUPDATERGLOBALVARIABLES_H 00006 #define BBOXUPDATERGLOBALVARIABLES_H 00007 00008 #include "X3D_SceneGraphTypes.h" 00009 #include "StateVariables.h" 00010 #include "BBox.h" 00011 00012 #include <list> 00013 00014 namespace X3DTK { 00015 namespace X3D { 00016 00018 00019 class BBoxUpdaterStateVariables : public StateVariables 00020 { 00021 public: 00023 BBoxUpdaterStateVariables(); 00025 virtual ~BBoxUpdaterStateVariables(); 00026 00028 virtual void finish(); 00029 00031 void setStaticProcessing(bool value); 00033 void addBBox(SFNode N, BBox *BB); 00035 void setShapeBBox(const BBox &BB); 00037 void addBBoxToMergeList(const BBox &BB); 00038 00040 inline bool getStaticProcessing() const {return _staticProcessing;}; 00042 BBox getShapeBBox() const {return _shapeBBox;}; 00044 BBox *getBBox(SFNode N) const; 00046 BBox mergeBBox(); 00047 00048 private: 00049 bool _staticProcessing; 00050 BBox _shapeBBox; 00051 std::list<std::pair<SFNode, BBox *> > _BBList; 00052 std::list<BBox> _BBToMergeList; 00053 }; 00054 00055 } 00056 } 00057 00058 #endif