17 #ifndef SDF_HEIGHTMAP_HH_
18 #define SDF_HEIGHTMAP_HH_
21 #include <ignition/math/Vector3.hh>
24 #include <sdf/sdf_config.h>
29 inline namespace SDF_VERSION_NAMESPACE {
33 class HeightmapPrivate;
34 class HeightmapTexturePrivate;
35 class HeightmapBlendPrivate;
74 public:
double Size()
const;
102 private: HeightmapTexturePrivate *dataPtr;
162 private: HeightmapBlendPrivate *dataPtr;
203 public: std::string
Uri()
const;
207 public:
void SetUri(
const std::string &_uri);
219 public: ignition::math::Vector3d
Size()
const;
223 public:
void SetSize(
const ignition::math::Vector3d &_size);
231 public:
void SetPosition(
const ignition::math::Vector3d &_position);
287 private: HeightmapPrivate *dataPtr;
Blend information to be used between textures on heightmaps.
Definition: Heightmap.hh:107
virtual ~HeightmapBlend()
Destructor.
double FadeDistance() const
Get the heightmap blend's fade distance.
HeightmapBlend(const HeightmapBlend &_blend)
Copy constructor.
HeightmapBlend()
Constructor.
HeightmapBlend(HeightmapBlend &&_blend) noexcept
Move constructor.
void SetMinHeight(double _minHeight)
Set the minimum height of the blend in meters.
Errors Load(ElementPtr _sdf)
Load the heightmap blend geometry based on a element pointer.
HeightmapBlend & operator=(HeightmapBlend &&_blend)
Move assignment operator.
void SetFadeDistance(double _fadeDistance)
Set the distance over which the blend occurs.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
double MinHeight() const
Get the heightmap blend's minimum height.
HeightmapBlend & operator=(const HeightmapBlend &_blend)
Copy Assignment operator.
Texture to be used on heightmaps.
Definition: Heightmap.hh:39
HeightmapTexture & operator=(HeightmapTexture &&_texture)
Move assignment operator.
HeightmapTexture()
Constructor.
std::string Normal() const
Get the heightmap texture's normal map.
double Size() const
Get the heightmap texture's size.
HeightmapTexture(HeightmapTexture &&_texture) noexcept
Move constructor.
HeightmapTexture & operator=(const HeightmapTexture &_texture)
Copy Assignment operator.
Errors Load(ElementPtr _sdf)
Load the heightmap texture geometry based on a element pointer.
void SetNormal(const std::string &_normal)
Set the filename of the normal map.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
std::string Diffuse() const
Get the heightmap texture's diffuse map.
void SetSize(double _uri)
Set the size of the texture in meters.
virtual ~HeightmapTexture()
Destructor.
void SetDiffuse(const std::string &_diffuse)
Set the filename of the diffuse map.
HeightmapTexture(const HeightmapTexture &_texture)
Copy constructor.
Heightmap represents a shape defined by a 2D field, and is usually accessed through a Geometry.
Definition: Heightmap.hh:168
uint64_t BlendCount() const
Get the number of heightmap blends.
void SetUri(const std::string &_uri)
Set the URI to a grayscale image.
void SetUseTerrainPaging(bool _use)
Set whether the heightmap uses terrain paging.
Heightmap(Heightmap &&_heightmap) noexcept
Move constructor.
Heightmap(const Heightmap &_heightmap)
Copy constructor.
void SetSampling(unsigned int _sampling)
Set the heightmap's sampling.
ignition::math::Vector3d Size() const
Get the heightmap's scaling factor.
void AddTexture(const HeightmapTexture &_texture)
Add a heightmap texture.
const HeightmapTexture * TextureByIndex(uint64_t _index) const
Get a heightmap texture based on an index.
void AddBlend(const HeightmapBlend &_blend)
Add a heightmap blend.
void SetSize(const ignition::math::Vector3d &_size)
Set the heightmap's scaling factor.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
Errors Load(ElementPtr _sdf)
Load the heightmap geometry based on a element pointer.
Heightmap & operator=(const Heightmap &_heightmap)
Copy Assignment operator.
void SetPosition(const ignition::math::Vector3d &_position)
Set the heightmap's position offset.
Heightmap & operator=(Heightmap &&_heightmap)
Move assignment operator.
std::string Uri() const
Get the heightmap's URI.
bool UseTerrainPaging() const
Get whether the heightmap uses terrain paging.
virtual ~Heightmap()
Destructor.
unsigned int Sampling() const
Get the heightmap's sampling per datum.
const std::string & FilePath() const
The path to the file where this element was loaded from.
const HeightmapBlend * BlendByIndex(uint64_t _index) const
Get a heightmap blend based on an index.
void SetFilePath(const std::string &_filePath)
Set the path to the file where this element was loaded from.
ignition::math::Vector3d Position() const
Get the heightmap's position offset.
uint64_t TextureCount() const
Get the number of heightmap textures.
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:89
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:53
namespace for Simulation Description Format parser
Definition: Actor.hh:33
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:48