Visual Computing Library
Loading...
Searching...
No Matches
vcl::Texture Class Reference

Public Member Functions

 Texture (const std::string &path)
 Load a texture from a file.
 
 Texture (const Image &img, const std::string &path)
 Creates a Texture object, with the given image and its path.
 
 Texture (Image &&img, const std::string &path)
 Creates a Texture object, with the given image and its path.
 
const std::string & path () const
 Get the path of the texture.
 
std::string & path ()
 Get the path of the texture.
 
const Imageimage () const
 Get the image of the texture.
 
Imageimage ()
 Get the image of the texture.
 
void serialize (std::ostream &os) const
 
void deserialize (std::istream &is)
 

Private Attributes

Image mImg
 
std::string mPath
 

Constructor & Destructor Documentation

◆ Texture() [1/3]

vcl::Texture::Texture ( const std::string &  path)
inline

Load a texture from a file.

Parameters
[in]paththe path of the texture file.

◆ Texture() [2/3]

vcl::Texture::Texture ( const Image img,
const std::string &  path 
)
inline

Creates a Texture object, with the given image and its path.

Parameters
[in]imgthe image.
[in]paththe path of the texture file.

◆ Texture() [3/3]

vcl::Texture::Texture ( Image &&  img,
const std::string &  path 
)
inline

Creates a Texture object, with the given image and its path.

Parameters
[in]imgthe image.
[in]paththe path of the texture file.

Member Function Documentation

◆ image() [1/2]

Image & vcl::Texture::image ( )
inline

Get the image of the texture.

Returns
the image of the texture.

◆ image() [2/2]

const Image & vcl::Texture::image ( ) const
inline

Get the image of the texture.

Returns
the image of the texture.

◆ path() [1/2]

std::string & vcl::Texture::path ( )
inline

Get the path of the texture.

Returns
the path of the texture.

◆ path() [2/2]

const std::string & vcl::Texture::path ( ) const
inline

Get the path of the texture.

Returns
the path of the texture.

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