56 public:
void Update();
60 public:
virtual void Load(sdf::ElementPtr _sdf);
63 public:
virtual void Init();
68 public:
void FillMsg(msgs::Geometry &_msg);
72 public:
virtual void ProcessMsg(
const msgs::Geometry &_msg);
76 public: std::string GetURI()
const;
90 public:
int GetThreshold()
const;
96 public:
double GetHeight()
const;
101 public:
int GetGranularity()
const;
105 private:
void BuildTree(
QuadNode *_node);
114 private:
void GetPixelCount(
unsigned int _xStart,
unsigned int _yStart,
115 unsigned int _width,
unsigned int _height,
116 unsigned int &_freePixels,
117 unsigned int &_occPixels);
121 private:
void ReduceTree(
QuadNode *_node);
129 private:
void CreateBox();
133 private:
void CreateBoxes(
QuadNode *_node);
142 private:
bool merged;
146 private:
static unsigned int collisionCounter;
157 : x(0), y(0), width(0), height(0)
168 std::deque<QuadNode*>::iterator iter;
169 for (iter = children.begin(); iter != children.end(); ++iter)
175 public:
void Print(std::string _space)
177 std::deque<QuadNode*>::iterator iter;
179 printf(
"%sXY[%d %d] WH[%d %d] O[%d] L[%d] V[%d]\n",
180 _space.c_str(), x, y, width, height, occupied, leaf, valid);
182 for (iter = children.begin(); iter != children.end(); ++iter)
183 if ((*iter)->occupied)
184 (*iter)->Print(_space);
188 public: uint32_t x, y;
191 public: uint32_t width, height;
197 public: std::deque<QuadNode*> children;
200 public:
bool occupied;