CG-Project2
Loading...
Searching...
No Matches
systems::texture Namespace Reference

All utilities to manage entities texture. More...

Functions

ogl::Texture getTexture (const unsigned int &id)
 Retrieves the texture of the given entity.
void setTexture (const unsigned int &id, const ogl::Texture &texture)
 Sets the texture for the given entity.
std::string getTexturePath (const unsigned int &id)
 Retrieves the entity texture path.
void updateTexturePath (const unsigned int &id, const std::string &path)
 Updates the entity texture path.
bool isMeshReflective (const unsigned int &id)
 This method sets the reflection of an entity. If the entity is reflective it will reflect the skybox texture.
void setMeshReflective (const unsigned int &id, const bool &val)
 Sets the reflectiveness of an entity.

Detailed Description

All utilities to manage entities texture.

See also
TextureComponent
ogl::Texture

Function Documentation

◆ getTexture()

ogl::Texture systems::texture::getTexture ( const unsigned int & id)

Retrieves the texture of the given entity.

Parameters
idthe entity id
Returns
an ogl::Texture object

◆ getTexturePath()

std::string systems::texture::getTexturePath ( const unsigned int & id)

Retrieves the entity texture path.

Parameters
idthe entity id
Returns
a path to the texture file

◆ isMeshReflective()

bool systems::texture::isMeshReflective ( const unsigned int & id)

This method sets the reflection of an entity. If the entity is reflective it will reflect the skybox texture.

Parameters
idthe entity id
Returns
true if the entity is reflective

◆ setMeshReflective()

void systems::texture::setMeshReflective ( const unsigned int & id,
const bool & val )

Sets the reflectiveness of an entity.

Parameters
idthe entity id
valif true the entity is reflective

◆ setTexture()

void systems::texture::setTexture ( const unsigned int & id,
const ogl::Texture & texture )

Sets the texture for the given entity.

Parameters
idthe entity id
texturethe entity texture

◆ updateTexturePath()

void systems::texture::updateTexturePath ( const unsigned int & id,
const std::string & path )

Updates the entity texture path.

Parameters
idthe entity id
paththe new texture path