HeightmapData Class Referenceabstract

Encapsulates a generic heightmap data file. More...

#include <common/common.hh>

Inherited by Dem, and ImageHeightmap.

Public Member Functions

virtual ~HeightmapData ()
 Destructor. More...
 
virtual void FillHeightMap (int _subSampling, unsigned int _vertSize, const ignition::math::Vector3d &_size, const ignition::math::Vector3d &_scale, bool _flipY, std::vector< float > &_heights)=0
 Create a lookup table of the terrain's height. More...
 
virtual unsigned int GetHeight () const =0
 Get the terrain's height. More...
 
virtual float GetMaxElevation () const =0
 Get the maximum terrain's elevation. More...
 
virtual unsigned int GetWidth () const =0
 Get the terrain's width. More...
 

Detailed Description

Encapsulates a generic heightmap data file.

Constructor & Destructor Documentation

§ ~HeightmapData()

Member Function Documentation

§ FillHeightMap()

virtual void FillHeightMap ( int  _subSampling,
unsigned int  _vertSize,
const ignition::math::Vector3d &  _size,
const ignition::math::Vector3d &  _scale,
bool  _flipY,
std::vector< float > &  _heights 
)
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 dimmensions 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 Dem, and ImageHeightmap.

Referenced by HeightmapData::~HeightmapData().

§ GetHeight()

virtual unsigned int GetHeight ( ) const
pure virtual

Get the terrain's height.

Returns
The terrain's height.

Implemented in Dem, and ImageHeightmap.

Referenced by HeightmapData::~HeightmapData().

§ GetMaxElevation()

virtual float GetMaxElevation ( ) const
pure virtual

Get the maximum terrain's elevation.

Returns
The maximum terrain's elevation.

Implemented in ImageHeightmap, and Dem.

Referenced by HeightmapData::~HeightmapData().

§ GetWidth()

virtual unsigned int GetWidth ( ) const
pure virtual

Get the terrain's width.

Returns
The terrain's width.

Implemented in Dem, and ImageHeightmap.

Referenced by HeightmapData::~HeightmapData().


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