Public Member Functions | List of all members
sdf::v10::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= (HeightmapTexture &&_texture)
 Move assignment operator. More...
 
HeightmapTextureoperator= (const HeightmapTexture &_texture)
 Copy 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::v10::HeightmapTexture::HeightmapTexture ( )

Constructor.

◆ HeightmapTexture() [2/3]

sdf::v10::HeightmapTexture::HeightmapTexture ( const HeightmapTexture _texture)

Copy constructor.

Parameters
[in]_textureHeightmapTexture to copy.

◆ HeightmapTexture() [3/3]

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

Move constructor.

Parameters
[in]_textureHeightmapTexture to move.

◆ ~HeightmapTexture()

virtual sdf::v10::HeightmapTexture::~HeightmapTexture ( )
virtual

Destructor.

Member Function Documentation

◆ Diffuse()

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

Get the heightmap texture's diffuse map.

Returns
The diffuse map of the heightmap texture.

◆ Element()

sdf::ElementPtr sdf::v10::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::v10::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::v10::HeightmapTexture::Normal ( ) const

Get the heightmap texture's normal map.

Returns
The normal map of the heightmap texture.

◆ operator=() [1/2]

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

Move assignment operator.

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

◆ operator=() [2/2]

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

Copy Assignment operator.

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

◆ SetDiffuse()

void sdf::v10::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::v10::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::v10::HeightmapTexture::SetSize ( double  _uri)

Set the size of the texture in meters.

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

◆ Size()

double sdf::v10::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: