Public Member Functions | List of all members
sdf::v9::HeightmapTexture Class Reference

Texture to be used on heightmaps. More...

#include <Heightmap.hh>

Public Member Functions

 HeightmapTexture ()
 Constructor. More...
 
 HeightmapTexture (const HeightmapTexture &_texture)
 Copy constructor. More...
 
 HeightmapTexture (HeightmapTexture &&_texture) noexcept
 Move constructor. More...
 
virtual ~HeightmapTexture ()
 Destructor. More...
 
std::string Diffuse () const
 Get the heightmap texture's diffuse map. More...
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load. More...
 
Errors Load (ElementPtr _sdf)
 Load the heightmap texture geometry based on a element pointer. More...
 
std::string Normal () const
 Get the heightmap texture's normal map. More...
 
HeightmapTextureoperator= (const HeightmapTexture &_texture)
 Copy Assignment operator. More...
 
HeightmapTextureoperator= (HeightmapTexture &&_texture)
 Move assignment operator. More...
 
void SetDiffuse (const std::string &_diffuse)
 Set the filename of the diffuse map. More...
 
void SetNormal (const std::string &_normal)
 Set the filename of the normal map. More...
 
void SetSize (double _uri)
 Set the size of the texture in meters. More...
 
double Size () const
 Get the heightmap texture's size. More...
 

Detailed Description

Texture to be used on heightmaps.

Constructor & Destructor Documentation

◆ HeightmapTexture() [1/3]

sdf::v9::HeightmapTexture::HeightmapTexture ( )

Constructor.

◆ HeightmapTexture() [2/3]

sdf::v9::HeightmapTexture::HeightmapTexture ( const HeightmapTexture _texture)

Copy constructor.

Parameters
[in]_textureHeightmapTexture to copy.

◆ HeightmapTexture() [3/3]

sdf::v9::HeightmapTexture::HeightmapTexture ( HeightmapTexture &&  _texture)
noexcept

Move constructor.

Parameters
[in]_textureHeightmapTexture to move.

◆ ~HeightmapTexture()

virtual sdf::v9::HeightmapTexture::~HeightmapTexture ( )
virtual

Destructor.

Member Function Documentation

◆ Diffuse()

std::string sdf::v9::HeightmapTexture::Diffuse ( ) const

Get the heightmap texture's diffuse map.

Returns
The diffuse map of the heightmap texture.

◆ Element()

sdf::ElementPtr sdf::v9::HeightmapTexture::Element ( ) const

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.

◆ Load()

Errors sdf::v9::HeightmapTexture::Load ( ElementPtr  _sdf)

Load the heightmap texture 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
[in]_sdfThe SDF Element pointer
Returns
Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.

◆ Normal()

std::string sdf::v9::HeightmapTexture::Normal ( ) const

Get the heightmap texture's normal map.

Returns
The normal map of the heightmap texture.

◆ operator=() [1/2]

HeightmapTexture& sdf::v9::HeightmapTexture::operator= ( const HeightmapTexture _texture)

Copy Assignment operator.

Parameters
[in]_textureThe heightmap texture to set values from.
Returns
*this

◆ operator=() [2/2]

HeightmapTexture& sdf::v9::HeightmapTexture::operator= ( HeightmapTexture &&  _texture)

Move assignment operator.

Parameters
[in]_textureHeightmap texture to move.
Returns
Reference to this.

◆ SetDiffuse()

void sdf::v9::HeightmapTexture::SetDiffuse ( const std::string &  _diffuse)

Set the filename of the diffuse map.

Parameters
[in]_diffuseThe diffuse map of the heightmap texture.

◆ SetNormal()

void sdf::v9::HeightmapTexture::SetNormal ( const std::string &  _normal)

Set the filename of the normal map.

Parameters
[in]_normalThe normal map of the heightmap texture.

◆ SetSize()

void sdf::v9::HeightmapTexture::SetSize ( double  _uri)

Set the size of the texture in meters.

Parameters
[in]_uriThe size of the texture in meters.

◆ Size()

double sdf::v9::HeightmapTexture::Size ( ) const

Get the heightmap texture's size.

Returns
The size of the heightmap texture in meters.

The documentation for this class was generated from the following file: