Light.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <etk/types.hpp>
9 #include <etk/math/Vector3D.hpp>
10 #include <etk/math/Vector4D.hpp>
11 #include <gale/resource/Program.hpp>
12 
13 namespace ege {
14  class Light {
15  private:
16  // values
17  vec3 m_direction;
18  vec3 m_halfplane;
19  vec4 m_ambientColor;
20  vec4 m_diffuseColor;
21  vec4 m_specularColor;
22  private:
23  // GL index
24  int32_t m_GL_direction;
25  int32_t m_GL_halfplane;
26  int32_t m_GL_ambientColor;
27  int32_t m_GL_diffuseColor;
28  int32_t m_GL_specularColor;
29  public:
30  Light();
31  ~Light();
32  void link(ememory::SharedPtr<gale::resource::Program> _prog, const std::string& _baseName);
34  void setDirection(const vec3& val) {
35  m_direction = val;
36  }
37  void setHalfPlane(const vec3& val) {
38  m_halfplane = val;
39  }
40  void setAmbientColor(const vec4& val) {
41  m_ambientColor = val;
42  }
43  void setDiffuseColor(const vec4& val) {
44  m_diffuseColor = val;
45  }
46  void setSpecularColor(const vec4& val) {
47  m_specularColor = val;
48  }
49 
50  friend std::ostream& operator <<(std::ostream& _os, const ege::Light& _obj);
51  };
52  std::ostream& operator <<(std::ostream& _os, const ege::Light& _obj);
53 }
54 
Definition: Light.hpp:14
Definition: AudioElement.hpp:8