Heightmap represents a shape defined by a 2D field, and is usually accessed through a Geometry. More...
#include <Heightmap.hh>
Public Member Functions | |
Heightmap () | |
Constructor. More... | |
Heightmap (const Heightmap &_heightmap) | |
Copy constructor. More... | |
Heightmap (Heightmap &&_heightmap) noexcept | |
Move constructor. More... | |
virtual | ~Heightmap () |
Destructor. More... | |
void | AddBlend (const HeightmapBlend &_blend) |
Add a heightmap blend. More... | |
void | AddTexture (const HeightmapTexture &_texture) |
Add a heightmap texture. More... | |
const HeightmapBlend * | BlendByIndex (uint64_t _index) const |
Get a heightmap blend based on an index. More... | |
uint64_t | BlendCount () const |
Get the number of heightmap blends. More... | |
sdf::ElementPtr | Element () const |
Get a pointer to the SDF element that was used during load. More... | |
const std::string & | FilePath () const |
The path to the file where this element was loaded from. More... | |
Errors | Load (ElementPtr _sdf) |
Load the heightmap geometry based on a element pointer. More... | |
Heightmap & | operator= (Heightmap &&_heightmap) |
Move assignment operator. More... | |
Heightmap & | operator= (const Heightmap &_heightmap) |
Copy Assignment operator. More... | |
ignition::math::Vector3d | Position () const |
Get the heightmap's position offset. More... | |
unsigned int | Sampling () const |
Get the heightmap's sampling per datum. More... | |
void | SetFilePath (const std::string &_filePath) |
Set the path to the file where this element was loaded from. More... | |
void | SetPosition (const ignition::math::Vector3d &_position) |
Set the heightmap's position offset. More... | |
void | SetSampling (unsigned int _sampling) |
Set the heightmap's sampling. More... | |
void | SetSize (const ignition::math::Vector3d &_size) |
Set the heightmap's scaling factor. More... | |
void | SetUri (const std::string &_uri) |
Set the URI to a grayscale image. More... | |
void | SetUseTerrainPaging (bool _use) |
Set whether the heightmap uses terrain paging. More... | |
ignition::math::Vector3d | Size () const |
Get the heightmap's scaling factor. More... | |
const HeightmapTexture * | TextureByIndex (uint64_t _index) const |
Get a heightmap texture based on an index. More... | |
uint64_t | TextureCount () const |
Get the number of heightmap textures. More... | |
std::string | Uri () const |
Get the heightmap's URI. More... | |
bool | UseTerrainPaging () const |
Get whether the heightmap uses terrain paging. More... | |
sdf::v9::Heightmap::Heightmap | ( | ) |
Constructor.
sdf::v9::Heightmap::Heightmap | ( | const Heightmap & | _heightmap | ) |
Copy constructor.
[in] | _heightmap | Heightmap to copy. |
|
noexcept |
Move constructor.
[in] | _heightmap | Heightmap to move. |
|
virtual |
Destructor.
void sdf::v9::Heightmap::AddBlend | ( | const HeightmapBlend & | _blend | ) |
Add a heightmap blend.
[in] | _blend | Blend to add. |
void sdf::v9::Heightmap::AddTexture | ( | const HeightmapTexture & | _texture | ) |
Add a heightmap texture.
[in] | _texture | Texture to add. |
const HeightmapBlend* sdf::v9::Heightmap::BlendByIndex | ( | uint64_t | _index | ) | const |
Get a heightmap blend based on an index.
[in] | _index | Index of the heightmap blend. The index should be in the range [0..BlendCount()). |
uint64_t sdf::v9::Heightmap::BlendCount | ( | ) | const |
Get the number of heightmap blends.
sdf::ElementPtr sdf::v9::Heightmap::Element | ( | ) | const |
const std::string& sdf::v9::Heightmap::FilePath | ( | ) | const |
The path to the file where this element was loaded from.
Errors sdf::v9::Heightmap::Load | ( | ElementPtr | _sdf | ) |
Copy Assignment operator.
[in] | _heightmap | The heightmap to set values from. |
ignition::math::Vector3d sdf::v9::Heightmap::Position | ( | ) | const |
Get the heightmap's position offset.
unsigned int sdf::v9::Heightmap::Sampling | ( | ) | const |
Get the heightmap's sampling per datum.
void sdf::v9::Heightmap::SetFilePath | ( | const std::string & | _filePath | ) |
Set the path to the file where this element was loaded from.
[in] _filePath Full path to the file on disk.
void sdf::v9::Heightmap::SetPosition | ( | const ignition::math::Vector3d & | _position | ) |
Set the heightmap's position offset.
void sdf::v9::Heightmap::SetSampling | ( | unsigned int | _sampling | ) |
Set the heightmap's sampling.
Defaults to 2.
[in] | _sampling | The heightmap's sampling per datum. |
void sdf::v9::Heightmap::SetSize | ( | const ignition::math::Vector3d & | _size | ) |
Set the heightmap's scaling factor.
Defaults to 1x1x1.
void sdf::v9::Heightmap::SetUri | ( | const std::string & | _uri | ) |
Set the URI to a grayscale image.
[in] | _uri | The URI of the heightmap. |
void sdf::v9::Heightmap::SetUseTerrainPaging | ( | bool | _use | ) |
Set whether the heightmap uses terrain paging.
Defaults to false.
[in] | _use | True to use. |
ignition::math::Vector3d sdf::v9::Heightmap::Size | ( | ) | const |
Get the heightmap's scaling factor.
const HeightmapTexture* sdf::v9::Heightmap::TextureByIndex | ( | uint64_t | _index | ) | const |
Get a heightmap texture based on an index.
[in] | _index | Index of the heightmap texture. The index should be in the range [0..TextureCount()). |
uint64_t sdf::v9::Heightmap::TextureCount | ( | ) | const |
Get the number of heightmap textures.
std::string sdf::v9::Heightmap::Uri | ( | ) | const |
Get the heightmap's URI.
bool sdf::v9::Heightmap::UseTerrainPaging | ( | ) | const |
Get whether the heightmap uses terrain paging.