summaryrefslogtreecommitdiff
path: root/engine-ocean/Graphics/light.h
diff options
context:
space:
mode:
Diffstat (limited to 'engine-ocean/Graphics/light.h')
-rw-r--r--engine-ocean/Graphics/light.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/engine-ocean/Graphics/light.h b/engine-ocean/Graphics/light.h
new file mode 100644
index 0000000..0c42b7f
--- /dev/null
+++ b/engine-ocean/Graphics/light.h
@@ -0,0 +1,42 @@
+#pragma once
+
+#include "glm/glm.hpp"
+#include "glm/ext.hpp"
+
+enum LightType{
+ POINT,
+ DIRECTIONAL
+};
+
+class Light{
+public:
+ Light(LightType type, glm::vec3 lightData, glm::vec3 lightColor = glm::vec3(1));
+ ~Light();
+
+ // Functions for point lights
+ void setPos(glm::vec3 newPos);
+ glm::vec3 getPos();
+ void translate(glm::vec3 delta);
+ void setAttenuation(glm::vec3 attenuation);
+ glm::vec3 getAttenuation();
+
+ // Functions for directional lights
+ void setDir(glm::vec3 newDir);
+ glm::vec3 getDir();
+ void rotate(float angle, glm::vec3 axis);
+
+ // Utility functions for light color
+ void setColor(glm::vec3 newColor);
+ glm::vec3 getColor();
+
+ // Utility functions for the light type
+ void setType(LightType newType);
+ LightType getType();
+
+private:
+ LightType m_lightType;
+ glm::vec3 m_lightPos;
+ glm::vec3 m_lightDir;
+ glm::vec3 m_lightColor;
+ glm::vec3 m_lightFunction;
+}; \ No newline at end of file