Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Graphics::TextureManager Class Reference

Class for texture manager. More...

#include <texture_manager.h>

Public Member Functions

 TextureManager ()
 TextureManager constructor. More...
 
 ~TextureManager ()
 Destroys the object. More...
 
bool loadTexture (const std::string &path)
 Loads a texture. More...
 
std::shared_ptr< BaseTextureoperator[] (const std::string &name) const
 Get's texture with name. More...
 
std::shared_ptr< BaseTexturegetTexture (const std::string &name) const
 Gets the texture. More...
 
bool textureExists (const std::string &name) const noexcept
 Function to see if texture with name exists. More...
 

Static Public Member Functions

static std::string getNameFromPath (const std::string &path) noexcept
 Gets the name from path. More...
 

Detailed Description

Class for texture manager.

Constructor & Destructor Documentation

Graphics::TextureManager::TextureManager ( )

TextureManager constructor.

Graphics::TextureManager::~TextureManager ( )

Destroys the object.

Member Function Documentation

std::string Graphics::TextureManager::getNameFromPath ( const std::string &  path)
staticnoexcept

Gets the name from path.

Parameters
[in]pathThe path
Returns
The name from path.

Referenced by loadTexture().

std::shared_ptr< BaseTexture > Graphics::TextureManager::getTexture ( const std::string &  name) const

Gets the texture.

Parameters
[in]nameThe name
Returns
The texture.

Referenced by generated::getTextureManagerModule(), and operator[]().

bool Graphics::TextureManager::loadTexture ( const std::string &  path)

Loads a texture.

Parameters
[in]pathThe path
Returns
True if successful

References getNameFromPath().

Referenced by generated::getTextureManagerModule().

std::shared_ptr< BaseTexture > Graphics::TextureManager::operator[] ( const std::string &  name) const

Get's texture with name.

Parameters
[in]nameThe name
Returns
A texture

References getTexture().

bool Graphics::TextureManager::textureExists ( const std::string &  name) const
noexcept

Function to see if texture with name exists.

Parameters
[in]nameThe name
Returns
True if it exists

Referenced by generated::getTextureManagerModule().


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