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;
152 class GZ_PHYSICS_VISIBLE QuadNode
156 public: QuadNode(QuadNode *_parent)
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;
194 public: QuadNode *parent;
197 public: std::deque<QuadNode*> children;
200 public:
bool occupied;
Forward declarations for the common classes.
Definition: Animation.hh:33
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
Base class for all shapes.
Definition: Shape.hh:46
Creates box extrusions based on an image.
Definition: MapShape.hh:46
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Encapsulates an image.
Definition: Image.hh:74
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:104