Encapsulates an image that will be interpreted as a heightmap.
More...
#include <common/common.hh>
Encapsulates an image that will be interpreted as a heightmap.
gazebo::common::ImageHeightmap::ImageHeightmap |
( |
) | |
|
Constructor.
- Parameters
-
[in] | _filename | the path to the image |
void gazebo::common::ImageHeightmap::FillHeightMap |
( |
int |
_subSampling, |
|
|
unsigned int |
_vertSize, |
|
|
const math::Vector3 & |
_size, |
|
|
const math::Vector3 & |
_scale, |
|
|
bool |
_flipY, |
|
|
std::vector< float > & |
_heights |
|
) |
| |
|
virtual |
Create a lookup table of the terrain's height.
- Parameters
-
[in] | _subsampling | Multiplier 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] | _vertSize | Number of points per row. |
[in] | _size | Real dimmensions of the terrain. |
[in] | _scale | Vector3 used to scale the height. |
[in] | _flipY | If true, it inverts the order in which the vector is filled. |
[out] | _heights | Vector containing the terrain heights. |
Implements gazebo::common::HeightmapData.
std::string gazebo::common::ImageHeightmap::GetFilename |
( |
) | |
const |
Get the full filename of the image.
- Returns
- The filename used to load the image
unsigned int gazebo::common::ImageHeightmap::GetHeight |
( |
) | |
const |
|
virtual |
float gazebo::common::ImageHeightmap::GetMaxElevation |
( |
) | |
const |
|
virtual |
unsigned int gazebo::common::ImageHeightmap::GetWidth |
( |
) | |
const |
|
virtual |
int gazebo::common::ImageHeightmap::Load |
( |
const std::string & |
_filename = "" ) | |
|
Load an image file as a heightmap.
- Parameters
-
[in] | _filename | the path to the image file. |
- Returns
- True when the operation succeeds to open a file.
The documentation for this class was generated from the following file: