SimpleGL  1.1.0
A framework for platform independent rendering
lighting.hpp
Go to the documentation of this file.
1 
8 #ifndef LIGHTING_HPP
9 #define LIGHTING_HPP
10 
11 #include <glm/glm.hpp>
12 
13 namespace sgl {
14 
20  struct Material {
21 
23  glm::vec4 ambient;
24 
26  glm::vec4 diffuse;
27 
29  glm::vec4 specular;
30 
32  float shininess;
33 
35  glm::vec4 emission;
36  };
37 
43  struct Light {
44 
46  glm::vec4 ambient;
47 
49  glm::vec4 diffuse;
50 
52  glm::vec4 specular;
53 
55  glm::vec4 position;
56 
58  glm::vec3 direction;
59 
61  float exponent;
62 
64  float cutOff;
65 
67  float constant;
68 
70  float linear;
71 
73  float quadratic;
74  };
75 }
76 
77 #endif /* LIGHTING_HPP */
This structure defines a material.
Definition: lighting.hpp:20
float quadratic
The quadratic attenuation.
Definition: lighting.hpp:73
glm::vec4 ambient
The ambient reflection factor.
Definition: lighting.hpp:46
glm::vec4 specular
The specular reflection factor.
Definition: lighting.hpp:52
glm::vec4 ambient
The ambient reflection factor.
Definition: lighting.hpp:23
float constant
The constant attenuation.
Definition: lighting.hpp:67
glm::vec4 position
The light position.
Definition: lighting.hpp:55
float exponent
The spot exponent.
Definition: lighting.hpp:61
glm::vec4 specular
The specular reflection factor.
Definition: lighting.hpp:29
Generic namespace for the SimpleGL framework.
Definition: application.hpp:18
This structure defines a light.
Definition: lighting.hpp:43
glm::vec4 diffuse
The diffuse reflection factor.
Definition: lighting.hpp:26
glm::vec3 direction
The spot direction.
Definition: lighting.hpp:58
float cutOff
The spot angle, in degrees.
Definition: lighting.hpp:64
float linear
The linear attenuation.
Definition: lighting.hpp:70
float shininess
The Phong-Exponent.
Definition: lighting.hpp:32
glm::vec4 emission
The Self-Illuminance.
Definition: lighting.hpp:35
glm::vec4 diffuse
The diffuse reflection factor.
Definition: lighting.hpp:49