59 public:
virtual void Load(sdf::ElementPtr _sdf);
62 public:
virtual void Init();
67 public:
void FillMsg(msgs::Geometry &_msg);
71 public:
virtual void ProcessMsg(
const msgs::Geometry &_msg);
75 public: std::string
GetURI()
const;
104 private:
void BuildTree(
QuadNode *_node);
113 private:
void GetPixelCount(
unsigned int _xStart,
unsigned int _yStart,
114 unsigned int _width,
unsigned int _height,
115 unsigned int &_freePixels,
116 unsigned int &_occPixels);
120 private:
void ReduceTree(
QuadNode *_node);
128 private:
void CreateBox();
132 private:
void CreateBoxes(
QuadNode *_node);
141 private:
bool merged;
145 private:
static unsigned int collisionCounter;
156 : x(0), y(0), width(0), height(0)
167 std::deque<QuadNode*>::iterator iter;
168 for (iter = children.begin(); iter != children.end(); ++iter)
174 public:
void Print(std::string _space)
176 std::deque<QuadNode*>::iterator iter;
178 printf(
"%sXY[%d %d] WH[%d %d] O[%d] L[%d] V[%d]\n",
179 _space.c_str(), x, y, width, height, occupied, leaf, valid);
181 for (iter = children.begin(); iter != children.end(); ++iter)
182 if ((*iter)->occupied)
183 (*iter)->Print(_space);
187 public: uint32_t x, y;
190 public: uint32_t width, height;
196 public: std::deque<QuadNode*> children;
199 public:
bool occupied;