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);
102 public:
float GetMaxHeight()
const;
106 public:
float GetMinHeight()
const;
110 public:
int GetSubSampling()
const;
123 private:
int LoadTerrainFile(
const std::string &_filename);
126 private:
int LoadDEMAsTerrain(
const std::string &_filename);
135 private:
int LoadImageAsTerrain(
const std::string &_filename);
139 private:
void OnRequest(ConstRequestPtr &_msg);
169 private: std::string fileFormat;
int subSampling
The amount of subsampling. Default is 2.
Definition: HeightmapShape.hh:157
common::HeightmapData * heightmapData
HeightmapData used to generate the heights.
Definition: HeightmapShape.hh:148
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:151
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:48
Encapsulates a generic heightmap data file.
Definition: HeightmapData.hh:34
common::ImageHeightmap img
Image used to generate the heights.
Definition: HeightmapShape.hh:145
Generic integer x, y vector.
Definition: Vector2i.hh:39
Forward declarations for transport.
bool flipY
True to flip the heights along the y direction.
Definition: HeightmapShape.hh:154
Base class for all shapes.
Definition: Shape.hh:40
Encapsulates an image that will be interpreted as a heightmap.
Definition: ImageHeightmap.hh:37
default namespace for gazebo
std::vector< float > heights
Lookup table of heights.
Definition: HeightmapShape.hh:142
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:94
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:52
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Encapsulates an image.
Definition: Image.hh:68
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:44
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48