Describes how a Heightmap should be loaded. More...
#include <HeightmapDescriptor.hh>
Public Member Functions | |
HeightmapDescriptor () | |
Constructor. More... | |
HeightmapDescriptor (const HeightmapDescriptor &_desc) | |
Copy constructor. More... | |
HeightmapDescriptor (HeightmapDescriptor &&_desc) noexcept | |
Move constructor. More... | |
virtual | ~HeightmapDescriptor () |
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... | |
std::shared_ptr< common::HeightmapData > | Data () const |
Get the heightfield data. More... | |
const std::string & | Name () const |
Get the heightmap's name used for caching. This is different from its unique Heightmap::Name() . More... | |
HeightmapDescriptor & | operator= (const HeightmapDescriptor &_desc) |
Copy Assignment operator. More... | |
HeightmapDescriptor & | operator= (HeightmapDescriptor &&_desc) |
Move assignment operator. More... | |
gz::math::Vector3d | Position () const |
Get the heightmap's position offset. More... | |
unsigned int | Sampling () const |
Get the heightmap's sampling per datum. More... | |
void | SetData (const std::shared_ptr< common::HeightmapData > &_data) |
Set the heightfield data. More... | |
void | SetName (const std::string &_name) |
Set the heightmap's name. More... | |
void | SetPosition (const gz::math::Vector3d &_position) |
Set the heightmap's position offset. More... | |
void | SetSampling (unsigned int _sampling) |
Set the heightmap's sampling. Defaults to 1. More... | |
void | SetSize (const gz::math::Vector3d &_size) |
Set the heightmap's final size in world units. Defaults to 1x1x1. More... | |
void | SetUseTerrainPaging (bool _use) |
Set whether the heightmap uses terrain paging. Defaults to false. More... | |
gz::math::Vector3d | Size () const |
Get the heightmap's final size in world units. 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... | |
bool | UseTerrainPaging () const |
Get whether the heightmap uses terrain paging. More... | |
Detailed Description
Describes how a Heightmap should be loaded.
Constructor & Destructor Documentation
◆ HeightmapDescriptor() [1/3]
Constructor.
◆ HeightmapDescriptor() [2/3]
HeightmapDescriptor | ( | const HeightmapDescriptor & | _desc | ) |
Copy constructor.
- Parameters
-
[in] _desc HeightmapDescriptor to copy.
◆ HeightmapDescriptor() [3/3]
|
noexcept |
Move constructor.
- Parameters
-
[in] _desc HeightmapDescriptor to move.
◆ ~HeightmapDescriptor()
|
virtual |
Destructor.
Member Function Documentation
◆ AddBlend()
void AddBlend | ( | const HeightmapBlend & | _blend | ) |
Add a heightmap blend.
- Parameters
-
[in] _blend Blend to add.
◆ AddTexture()
void AddTexture | ( | const HeightmapTexture & | _texture | ) |
Add a heightmap texture.
- Parameters
-
[in] _texture Texture to add.
◆ BlendByIndex()
const HeightmapBlend* BlendByIndex | ( | uint64_t | _index | ) | const |
Get a heightmap blend based on an index.
- Parameters
-
[in] _index Index of the heightmap blend. The index should be in the range [0..BlendCount()).
- Returns
- Pointer to the heightmap blend. Nullptr if the index does not exist.
- See also
- uint64_t BlendCount() const
◆ BlendCount()
uint64_t BlendCount | ( | ) | const |
Get the number of heightmap blends.
- Returns
- Number of heightmap blends contained in this Heightmap object.
◆ Data()
std::shared_ptr<common::HeightmapData> Data | ( | ) | const |
Get the heightfield data.
- Returns
- Heightmap data.
◆ Name()
const std::string& Name | ( | ) | const |
Get the heightmap's name used for caching. This is different from its unique Heightmap::Name()
.
- Returns
- Heightmap's given name. Defaults to
Heightmap::Name()
.
◆ operator=() [1/2]
HeightmapDescriptor& operator= | ( | const HeightmapDescriptor & | _desc | ) |
Copy Assignment operator.
- Parameters
-
[in] _desc The heightmap to set values from.
- Returns
- *this
◆ operator=() [2/2]
HeightmapDescriptor& operator= | ( | HeightmapDescriptor && | _desc | ) |
Move assignment operator.
- Parameters
-
[in] _desc HeightmapDescriptor to move.
- Returns
- Reference to this.
◆ Position()
gz::math::Vector3d Position | ( | ) | const |
Get the heightmap's position offset.
- Returns
- The heightmap's position offset.
◆ Sampling()
unsigned int Sampling | ( | ) | const |
Get the heightmap's sampling per datum.
- Returns
- The heightmap's sampling.
◆ SetData()
void SetData | ( | const std::shared_ptr< common::HeightmapData > & | _data | ) |
Set the heightfield data.
- Parameters
-
[in] _data New data.
◆ SetName()
void SetName | ( | const std::string & | _name | ) |
Set the heightmap's name.
- Parameters
-
[in] _name Heightmap's name.
◆ SetPosition()
void SetPosition | ( | const gz::math::Vector3d & | _position | ) |
Set the heightmap's position offset.
- Parameters
-
[in] _position The heightmap's position offset.
◆ SetSampling()
void SetSampling | ( | unsigned int | _sampling | ) |
Set the heightmap's sampling. Defaults to 1.
- Parameters
-
[in] _sampling The heightmap's sampling per datum.
◆ SetSize()
void SetSize | ( | const gz::math::Vector3d & | _size | ) |
Set the heightmap's final size in world units. Defaults to 1x1x1.
- Parameters
-
[in] _size The heightmap's size factor.
◆ SetUseTerrainPaging()
void SetUseTerrainPaging | ( | bool | _use | ) |
Set whether the heightmap uses terrain paging. Defaults to false.
- Parameters
-
[in] _use True to use.
◆ Size()
gz::math::Vector3d Size | ( | ) | const |
Get the heightmap's final size in world units.
- Returns
- The heightmap's size.
◆ TextureByIndex()
const HeightmapTexture* TextureByIndex | ( | uint64_t | _index | ) | const |
Get a heightmap texture based on an index.
- Parameters
-
[in] _index Index of the heightmap texture. The index should be in the range [0..TextureCount()).
- Returns
- Pointer to the heightmap texture. Nullptr if the index does not exist.
- See also
- uint64_t TextureCount() const
◆ TextureCount()
uint64_t TextureCount | ( | ) | const |
Get the number of heightmap textures.
- Returns
- Number of heightmap textures contained in this Heightmap object.
◆ UseTerrainPaging()
bool UseTerrainPaging | ( | ) | const |
Get whether the heightmap uses terrain paging.
- Returns
- True if the heightmap uses terrain paging.
The documentation for this class was generated from the following file: