Kinetic Visualization
 All Classes Functions Variables Pages
Light.h
1 #pragma once
2 #include <glm/glm.hpp>
3 #include "Camera.h"
4 
5 
6 class Light
7 {
8 public:
12  Light(void);
20  Light(glm::vec3 pos, glm::vec4 ambient, glm::vec4 diffuse, glm::vec4 specular);
28  Light(glm::vec3 pos, glm::vec4 ambient, glm::vec4 diffuse, glm::vec4 specular, float shineness);
36  Light(glm::vec3 pos, glm::vec4 ambient, glm::vec4 diffuse, glm::vec4 specular, float shineness, float constant_attenuation, float linear_attenuation, float quadratic_attenuation);
40  ~Light(void);
41 
46  void SetPosition(glm::vec3 pos);
51  void SetAmbient(glm::vec4 ambient);
56  void SetDiffuse(glm::vec4 diffuse);
61  void SetSpecular(glm::vec4 specular);
66  void SetConstantAttenuation(float attenuation);
71  void SetLinearAttenuation(float attenuation);
76  void SetQuadraticAttenuation(float attenuation);
81  void SetShineness(float shineness);
82 
87  Camera* GetCamera();
92  void SetCamera(Camera* camera);
93 
98  glm::vec3 GetPosition();
103  glm::vec4 GetAmbient();
108  glm::vec4 GetDiffuse();
113  glm::vec4 GetSpecular();
118  float GetConstantAttenuation();
123  float GetLinearAttenuation();
128  float GetQuadraticAttenuation();
133  float GetShineness();
134 
135 private:
136  glm::vec3 m_position;
137  glm::vec4 m_ambient;
138  glm::vec4 m_diffuse;
139  glm::vec4 m_specular;
140  float m_constant_attenuation;
141  float m_linear_attenuation;
142  float m_quadratic_attenuation;
143  float m_shineness;
144  Camera* m_camera;
145 };
146