17 #ifndef _GAZEBO_RENDERING_HEIGHTMAP_HH_ 18 #define _GAZEBO_RENDERING_HEIGHTMAP_HH_ 23 #include <ignition/math/Vector3.hh> 24 #include <ignition/math/Vector2.hh> 26 #include "gazebo/msgs/MessageTypes.hh" 61 class HeightmapPrivate;
82 public:
void LoadFromMsg(ConstVisualPtr &_msg);
90 public:
double GetHeight(
double _x,
double _y,
double _z = 1000)
98 public:
double Height(
const double _x,
const double _y,
99 const double _z = 1000)
const;
112 double _outsideRadius,
double _insideRadius,
125 const ignition::math::Vector2i &_mousePos,
126 const double _outsideRadius,
127 const double _insideRadius,
128 const double _weight = 0.1);
141 double _outsideRadius,
double _insideRadius,
154 const ignition::math::Vector2i &_mousePos,
155 const double _outsideRadius,
156 const double _insideRadius,
157 const double _weight = 0.1);
170 double _outsideRadius,
double _insideRadius,
183 const ignition::math::Vector2i &_mousePos,
184 const double _outsideRadius,
185 const double _insideRadius,
186 const double _weight = 0.1);
199 double _outsideRadius,
double _insideRadius,
212 const ignition::math::Vector2i &_mousePos,
213 const double _outsideRadius,
214 const double _insideRadius,
215 const double _weight = 0.1);
221 public:
double GetAvgHeight(Ogre::Vector3 _pos,
double _brushSize)
227 public:
double AvgHeight(
const ignition::math::Vector3d &_pos,
228 const double _brushSize)
const;
232 public:
void SetWireframe(
const bool _show);
241 public: Ogre::TerrainGroup *OgreTerrain()
const;
258 public: Ogre::TerrainGroup::RayResult GetMouseHit(
CameraPtr _camera,
266 public: Ogre::TerrainGroup::RayResult MouseHit(
CameraPtr _camera,
267 const ignition::math::Vector2i &_mousePos)
const;
273 public:
void SplitHeights(
const std::vector<float> &_heightmap,
274 const int _n, std::vector<std::vector<float> > &_v);
280 public:
unsigned int GetTerrainSubdivisionCount()
const 286 public:
unsigned int TerrainSubdivisionCount()
const;
295 private:
void ModifyTerrain(Ogre::Vector3 _pos,
296 const double _outsideRadius,
const double _insideRadius,
297 const double _weight,
const std::string &_op);
301 private:
bool InitBlendMaps(Ogre::Terrain *_terrain);
304 private:
void ConfigureTerrainDefaults();
309 private:
void DefineTerrain(
const int _x,
const int _y);
313 private:
void SetupShadows(
const bool _enabled);
322 private:
void UpdateTerrainHash(
const std::string &_hash,
323 const boost::filesystem::path &_terrainDir);
331 private:
bool PrepareTerrainPaging(
332 const boost::filesystem::path &_terrainDirPath);
336 private: std::unique_ptr<HeightmapPrivate> dataPtr;
Definition: JointMaker.hh:46
Forward declarations for the common classes.
Definition: Animation.hh:33
Generic integer x, y vector.
Definition: Vector2i.hh:36
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:48
boost::shared_ptr< Scene > ScenePtr
Definition: RenderTypes.hh:80
Rendering a terrain using heightmap information.
Definition: Heightmap.hh:68
Definition: JointMaker.hh:41
Encapsulates an image.
Definition: Image.hh:74
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:88