Saga
Saga Game Engine
Loading...
Searching...
No Matches
Saga::Material Struct Reference

Wrapper around the GraphisEngine's material. More...

#include <material.h>

Public Member Functions

 operator std::shared_ptr< GraphicsEngine::Material > & ()
 
 operator const std::shared_ptr< GraphicsEngine::Material > & () const
 
 Material ()
 Construct a new Material object.
 
 Material (glm::vec3 color, float shininess=1.f)
 Constructor for setting SOLID_COLOR based material.
 
 Material (float shininess)
 Constructor for setting PER_VERTEX_COLOR based material.
 
 Material (std::shared_ptr< GraphicsEngine::Texture > texture, float shininess=1.f)
 Constructor for setting TEXTURE_COLOR based material.
 

Static Public Member Functions

static auto id_value () -> uint64_t &
 Used for assigning new material name in the graphics engine.
 

Public Attributes

std::shared_ptr< GraphicsEngine::Material > material
 

Detailed Description

Wrapper around the GraphisEngine's material.

Constructor & Destructor Documentation

◆ Material() [1/4]

Saga::Material::Material ( )

Construct a new Material object.

Warning
this will leave you with a pointer to a null material. Please assign it before use.

◆ Material() [2/4]

Saga::Material::Material ( glm::vec3  color,
float  shininess = 1.f 
)

Constructor for setting SOLID_COLOR based material.

Parameters
colorrgb color of the material. Each components are in the range [0,1].
shininessshininess of the material. Used for phong illumination.
Parameters
colorrgb color of the material. Each components are in the range [0,1].
shininessshininess of the material. Used for phong illumination.
Here is the call graph for this function:

◆ Material() [3/4]

Saga::Material::Material ( float  shininess)

Constructor for setting PER_VERTEX_COLOR based material.

Parameters
shininessshininess of the material. Used for phong illumination.
Parameters
shininessshininess of the material. Used for phong illumination.
Here is the call graph for this function:

◆ Material() [4/4]

Saga::Material::Material ( std::shared_ptr< GraphicsEngine::Texture >  texture,
float  shininess = 1.f 
)

Constructor for setting TEXTURE_COLOR based material.

Parameters
texturepointer to a texture object.
shininessshininess of the material. Used for phong illumination.
Parameters
texturepointer to a texture object.
shininessshininess of the material. Used for phong illumination.
Here is the call graph for this function:

Member Function Documentation

◆ id_value()

static auto Saga::Material::id_value ( ) -> uint64_t &
inlinestatic

Used for assigning new material name in the graphics engine.

Returns
uint64_t& a new, unique integer.

◆ operator const std::shared_ptr< GraphicsEngine::Material > &()

Saga::Material::operator const std::shared_ptr< GraphicsEngine::Material > & ( ) const
inline

◆ operator std::shared_ptr< GraphicsEngine::Material > &()

Saga::Material::operator std::shared_ptr< GraphicsEngine::Material > & ( )
inline

Member Data Documentation

◆ material

std::shared_ptr<GraphicsEngine::Material> Saga::Material::material

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