diff options
author | jjesswan <jessica_wan@brown.edu> | 2024-04-22 21:56:26 -0400 |
---|---|---|
committer | jjesswan <jessica_wan@brown.edu> | 2024-04-22 21:56:26 -0400 |
commit | a556b45abf18f1bd509daaf63b66b7d55e9fd291 (patch) | |
tree | bc9b8a2d184c12aee236e7f9f276a34b84ca552d /engine-ocean/Graphics/light.h | |
parent | cd7c76017a12bb548036571c1ff13e551369d06d (diff) |
add engine version
Diffstat (limited to 'engine-ocean/Graphics/light.h')
-rw-r--r-- | engine-ocean/Graphics/light.h | 42 |
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 |