Gazebo Common

API Reference

5.6.0
HeightmapData Class Referenceabstract

Encapsulates a generic heightmap data file. More...

#include <HeightmapData.hh>

Public Member Functions

virtual ~HeightmapData ()=default
 Destructor. More...
 
virtual std::string Filename () const =0
 Get the full filename of loaded heightmap image/dem. More...
 
virtual void FillHeightMap (int _subSampling, unsigned int _vertSize, const math::Vector3d &_size, const math::Vector3d &_scale, bool _flipY, std::vector< float > &_heights) const =0
 Create a lookup table of the terrain's height. More...
 
virtual unsigned int Height () const =0
 Get the terrain's height. More...
 
virtual float MaxElevation () const =0
 Get the maximum terrain's elevation. More...
 
virtual float MinElevation () const
 Get the min terrain's elevation. More...
 
virtual unsigned int Width () const =0
 Get the terrain's width. More...
 

Detailed Description

Encapsulates a generic heightmap data file.

Constructor & Destructor Documentation

◆ ~HeightmapData()

virtual ~HeightmapData ( )
virtualdefault

Destructor.

Member Function Documentation

◆ Filename()

virtual std::string Filename ( ) const
pure virtual

Get the full filename of loaded heightmap image/dem.

Returns
The filename used to load the heightmap image/dem

Implemented in Dem, and ImageHeightmap.

◆ FillHeightMap()

virtual void FillHeightMap ( int  _subSampling,
unsigned int  _vertSize,
const math::Vector3d _size,
const math::Vector3d _scale,
bool  _flipY,
std::vector< float > &  _heights 
) const
pure virtual

Create a lookup table of the terrain's height.

Parameters
[in]_subsamplingMultiplier used to increase the resolution. Ex: A subsampling of 2 in a terrain of 129x129 means that the height vector will be 257 * 257.
[in]_vertSizeNumber of points per row.
[in]_sizeReal dimensions of the terrain.
[in]_scaleVector3 used to scale the height.
[in]_flipYIf true, it inverts the order in which the vector is filled.
[out]_heightsVector containing the terrain heights.

Implemented in ImageHeightmap, and Dem.

◆ Height()

virtual unsigned int Height ( ) const
pure virtual

Get the terrain's height.

Returns
The terrain's height [pixels].

Implemented in Dem, and ImageHeightmap.

◆ MaxElevation()

virtual float MaxElevation ( ) const
pure virtual

Get the maximum terrain's elevation.

Returns
The maximum terrain's elevation.

Implemented in Dem, and ImageHeightmap.

◆ MinElevation()

virtual float MinElevation ( ) const
inlinevirtual

Get the min terrain's elevation.

Returns
The min terrain's elevation.

Reimplemented in Dem.

◆ Width()

virtual unsigned int Width ( ) const
pure virtual

Get the terrain's width.

Returns
The terrain's width [pixels].

Implemented in Dem, and ImageHeightmap.


The documentation for this class was generated from the following file: