Heightmap represents a shape defined by a 2D field, and is usually accessed through a Geometry.
More...
#include <Heightmap.hh>
|
| | Heightmap () |
| | Constructor.
|
| |
| | Heightmap (const Heightmap &_heightmap) |
| | Copy constructor.
|
| |
| | Heightmap (Heightmap &&_heightmap) noexcept |
| | Move constructor.
|
| |
| virtual | ~Heightmap () |
| | Destructor.
|
| |
| void | AddBlend (const HeightmapBlend &_blend) |
| | Add a heightmap blend.
|
| |
| void | AddTexture (const HeightmapTexture &_texture) |
| | Add a heightmap texture.
|
| |
| const HeightmapBlend * | BlendByIndex (uint64_t _index) const |
| | Get a heightmap blend based on an index.
|
| |
| uint64_t | BlendCount () const |
| | Get the number of heightmap blends.
|
| |
| sdf::ElementPtr | Element () const |
| | Get a pointer to the SDF element that was used during load.
|
| |
| const std::string & | FilePath () const |
| | The path to the file where this element was loaded from.
|
| |
| Errors | Load (ElementPtr _sdf) |
| | Load the heightmap geometry based on a element pointer.
|
| |
| Heightmap & | operator= (const Heightmap &_heightmap) |
| | Copy Assignment operator.
|
| |
| Heightmap & | operator= (Heightmap &&_heightmap) |
| | Move assignment operator.
|
| |
| ignition::math::Vector3d | Position () const |
| | Get the heightmap's position offset.
|
| |
| unsigned int | Sampling () const |
| | Get the heightmap's sampling per datum.
|
| |
| void | SetFilePath (const std::string &_filePath) |
| | Set the path to the file where this element was loaded from.
|
| |
| void | SetPosition (const ignition::math::Vector3d &_position) |
| | Set the heightmap's position offset.
|
| |
| void | SetSampling (unsigned int _sampling) |
| | Set the heightmap's sampling.
|
| |
| void | SetSize (const ignition::math::Vector3d &_size) |
| | Set the heightmap's scaling factor.
|
| |
| void | SetUri (const std::string &_uri) |
| | Set the URI to a grayscale image.
|
| |
| void | SetUseTerrainPaging (bool _use) |
| | Set whether the heightmap uses terrain paging.
|
| |
| ignition::math::Vector3d | Size () const |
| | Get the heightmap's scaling factor.
|
| |
| const HeightmapTexture * | TextureByIndex (uint64_t _index) const |
| | Get a heightmap texture based on an index.
|
| |
| uint64_t | TextureCount () const |
| | Get the number of heightmap textures.
|
| |
| std::string | Uri () const |
| | Get the heightmap's URI.
|
| |
| bool | UseTerrainPaging () const |
| | Get whether the heightmap uses terrain paging.
|
| |
Heightmap represents a shape defined by a 2D field, and is usually accessed through a Geometry.
◆ Heightmap() [1/3]
| sdf::v9::Heightmap::Heightmap |
( |
| ) |
|
◆ Heightmap() [2/3]
| sdf::v9::Heightmap::Heightmap |
( |
const Heightmap & |
_heightmap | ) |
|
Copy constructor.
- Parameters
-
◆ Heightmap() [3/3]
| sdf::v9::Heightmap::Heightmap |
( |
Heightmap && |
_heightmap | ) |
|
|
noexcept |
Move constructor.
- Parameters
-
◆ ~Heightmap()
| virtual sdf::v9::Heightmap::~Heightmap |
( |
| ) |
|
|
virtual |
◆ AddBlend()
Add a heightmap blend.
- Parameters
-
◆ AddTexture()
Add a heightmap texture.
- Parameters
-
| [in] | _texture | Texture to add. |
◆ BlendByIndex()
| const HeightmapBlend * sdf::v9::Heightmap::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 sdf::v9::Heightmap::BlendCount |
( |
| ) |
const |
Get the number of heightmap blends.
- Returns
- Number of heightmap blends contained in this Heightmap object.
◆ Element()
Get a pointer to the SDF element that was used during load.
- Returns
- SDF element pointer. The value will be nullptr if Load has not been called.
◆ FilePath()
| const std::string & sdf::v9::Heightmap::FilePath |
( |
| ) |
const |
The path to the file where this element was loaded from.
- Returns
- Full path to the file on disk.
◆ Load()
Load the heightmap geometry based on a element pointer.
This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.
- Parameters
-
- Returns
- Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.
◆ operator=() [1/2]
Copy Assignment operator.
- Parameters
-
| [in] | _heightmap | The heightmap to set values from. |
- Returns
- *this
◆ operator=() [2/2]
Move assignment operator.
- Parameters
-
- Returns
- Reference to this.
◆ Position()
| ignition::math::Vector3d sdf::v9::Heightmap::Position |
( |
| ) |
const |
Get the heightmap's position offset.
- Returns
- The heightmap's position offset.
◆ Sampling()
| unsigned int sdf::v9::Heightmap::Sampling |
( |
| ) |
const |
Get the heightmap's sampling per datum.
- Returns
- The heightmap's sampling.
◆ SetFilePath()
| void sdf::v9::Heightmap::SetFilePath |
( |
const std::string & |
_filePath | ) |
|
Set the path to the file where this element was loaded from.
\paramp[in] _filePath Full path to the file on disk.
◆ SetPosition()
| void sdf::v9::Heightmap::SetPosition |
( |
const ignition::math::Vector3d & |
_position | ) |
|
Set the heightmap's position offset.
- Returns
- The heightmap's position offset.
◆ SetSampling()
| void sdf::v9::Heightmap::SetSampling |
( |
unsigned int |
_sampling | ) |
|
Set the heightmap's sampling.
Defaults to 2.
- Parameters
-
| [in] | _sampling | The heightmap's sampling per datum. |
◆ SetSize()
| void sdf::v9::Heightmap::SetSize |
( |
const ignition::math::Vector3d & |
_size | ) |
|
Set the heightmap's scaling factor.
Defaults to 1x1x1.
- Returns
- The heightmap's size factor.
◆ SetUri()
| void sdf::v9::Heightmap::SetUri |
( |
const std::string & |
_uri | ) |
|
Set the URI to a grayscale image.
- Parameters
-
| [in] | _uri | The URI of the heightmap. |
◆ SetUseTerrainPaging()
| void sdf::v9::Heightmap::SetUseTerrainPaging |
( |
bool |
_use | ) |
|
Set whether the heightmap uses terrain paging.
Defaults to false.
- Parameters
-
◆ Size()
| ignition::math::Vector3d sdf::v9::Heightmap::Size |
( |
| ) |
const |
Get the heightmap's scaling factor.
- Returns
- The heightmap's size.
◆ TextureByIndex()
| const HeightmapTexture * sdf::v9::Heightmap::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 sdf::v9::Heightmap::TextureCount |
( |
| ) |
const |
Get the number of heightmap textures.
- Returns
- Number of heightmap textures contained in this Heightmap object.
◆ Uri()
| std::string sdf::v9::Heightmap::Uri |
( |
| ) |
const |
Get the heightmap's URI.
- Returns
- The URI of the heightmap data.
◆ UseTerrainPaging()
| bool sdf::v9::Heightmap::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: