22 #ifndef _HEIGHTMAPSHAPE_HH_
23 #define _HEIGHTMAPSHAPE_HH_
59 public:
virtual void Load(sdf::ElementPtr _sdf);
62 public:
virtual void Init();
70 public: std::string GetURI()
const;
90 public:
float GetHeight(
int _x,
int _y)
const;
94 public:
void FillMsg(msgs::Geometry &_msg);
98 public:
virtual void ProcessMsg(
const msgs::Geometry &_msg);
101 public:
virtual double ComputeVolume()
const;
105 public:
float GetMaxHeight()
const;
109 public:
float GetMinHeight()
const;
113 public:
int GetSubSampling()
const;
126 private:
int LoadTerrainFile(
const std::string &_filename);
129 private:
int LoadDEMAsTerrain(
const std::string &_filename);
138 private:
int LoadImageAsTerrain(
const std::string &_filename);
142 private:
void OnRequest(ConstRequestPtr &_msg);
172 private: std::string fileFormat;
int subSampling
The amount of subsampling. Default is 2.
Definition: HeightmapShape.hh:160
common::HeightmapData * heightmapData
HeightmapData used to generate the heights.
Definition: HeightmapShape.hh:151
#define GZ_PHYSICS_VISIBLE
Definition: system.hh:259
HeightmapShape collision shape builds a heightmap from an image.
Definition: HeightmapShape.hh:48
unsigned int vertSize
Size of the height lookup table.
Definition: HeightmapShape.hh:154
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
Encapsulates a generic heightmap data file.
Definition: HeightmapData.hh:37
common::ImageHeightmap img
Image used to generate the heights.
Definition: HeightmapShape.hh:148
Generic integer x, y vector.
Definition: Vector2i.hh:36
Forward declarations for transport.
bool flipY
True to flip the heights along the y direction.
Definition: HeightmapShape.hh:157
Base class for all shapes.
Definition: Shape.hh:46
Encapsulates an image that will be interpreted as a heightmap.
Definition: ImageHeightmap.hh:39
default namespace for gazebo
std::vector< float > heights
Lookup table of heights.
Definition: HeightmapShape.hh:145
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:104
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
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< Publisher > PublisherPtr
Definition: TransportTypes.hh:49