Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Private Attributes | List of all members
Scene::Material Class Reference

Classes

struct  data
 

Public Member Functions

 Material (vec4 const &ambient, vec4 const &diffuse, vec4 const &specular, float const shininess, Texture *texture)
 
 ~Material ()
 
void bindTo (Shader *shader, string const uniform)
 

Private Attributes

GLuint m_ubuffer
 
Texturem_texture
 

Detailed Description

Scene::Material stores information about the material of a mesh

Definition at line 91 of file Scene.hpp.

Constructor & Destructor Documentation

Material ( vec4 const &  ambient,
vec4 const &  diffuse,
vec4 const &  specular,
float const  shininess,
Texture texture 
)

Constructs a Scene::Material.

Parameters
ambientThe ambient reflectance of the BRDF
diffuseThe diffuse reflectance of the BRDF
specularThe specular reflectance of the BRDF
shininessThe specular exponent of the BRDF
textureThe texture of the material. Used for diffuse and ambient. If this is nullptr, no texture is used.

Definition at line 689 of file Scene.cpp.

~Material ( )

Destructs a Scene::Material.

Definition at line 706 of file Scene.cpp.

Member Function Documentation

void bindTo ( Shader shader,
string const  uniform 
)

Binds this material to a uniform-block.

Parameters
shaderThe shader that hosts the uniform-block. It must be "used" first.
uniformThe name of the uniform-block.

Definition at line 710 of file Scene.cpp.

Member Data Documentation

Texture* m_texture
private

The texture of the material. Used for diffuse and ambient. If this is nullptr, no texture is used.

Definition at line 105 of file Scene.hpp.

GLuint m_ubuffer
private

The uniform buffer object that holds the material-data on the graphics-card

Definition at line 104 of file Scene.hpp.


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