kick
|
00001 // 00002 // scene_lights.h 00003 // KickCPP 00004 // 00005 // Created by morten on 8/14/13. 00006 // Copyright (c) 2013 Morten Nobel-Joergensen. All rights reserved. 00007 // 00008 00009 #pragma once 00010 00011 #include <glm/glm.hpp> 00012 #include <vector> 00013 00014 #ifndef KICK_MAX_POINT_LIGHTS 00015 #define KICK_MAX_POINT_LIGHTS 3 00016 #endif 00017 00018 namespace kick { 00019 class Light; 00020 00021 struct SceneLights { 00022 std::shared_ptr<Light> ambientLight = nullptr; 00023 std::shared_ptr<Light> directionalLight = nullptr; 00024 std::vector<std::shared_ptr<Light>> pointLights; 00025 00026 glm::mat3 directionalLightData; // matrix with the columns lightDirection,colorIntensity,halfVector 00027 glm::mat3 pointLightData[KICK_MAX_POINT_LIGHTS]; 00028 glm::vec3 directionalLightWorld; 00029 void recomputeLight(glm::mat4 viewMatrix); 00030 00031 void clear(); 00032 }; 00033 }