From 0b9bb84a6e2e885dab2842fb6ecb4cae4a32c027 Mon Sep 17 00:00:00 2001 From: Ricardo Antunes Date: Sat, 16 Sep 2023 22:33:45 +0100 Subject: [PATCH] refactor(core): remove unused lights --- core/CMakeLists.txt | 2 -- core/include/cubos/core/gl/light.hpp | 50 ---------------------------- core/src/cubos/core/gl/light.cpp | 29 ---------------- 3 files changed, 81 deletions(-) delete mode 100644 core/include/cubos/core/gl/light.hpp delete mode 100644 core/src/cubos/core/gl/light.cpp diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index d9858e3f6c..5b3eb28563 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -64,7 +64,6 @@ set(CUBOS_CORE_SOURCE "src/cubos/core/gl/material.cpp" "src/cubos/core/gl/palette.cpp" "src/cubos/core/gl/grid.cpp" - "src/cubos/core/gl/light.cpp" "src/cubos/core/gl/util.cpp" "src/cubos/core/gl/vertex.cpp" @@ -138,7 +137,6 @@ set(CUBOS_CORE_INCLUDE "include/cubos/core/gl/grid.hpp" "include/cubos/core/gl/vertex.hpp" "include/cubos/core/gl/camera.hpp" - "include/cubos/core/gl/light.hpp" "include/cubos/core/gl/util.hpp" "include/cubos/core/al/audio_device.hpp" diff --git a/core/include/cubos/core/gl/light.hpp b/core/include/cubos/core/gl/light.hpp deleted file mode 100644 index 9816c6c029..0000000000 --- a/core/include/cubos/core/gl/light.hpp +++ /dev/null @@ -1,50 +0,0 @@ -/// @file -/// @brief Classes @ref cubos::core::gl::SpotLight, @ref cubos::core::gl::DirectionalLight and @ref -/// cubos::core::gl::PointLight. -/// @ingroup core-gl - -#pragma once - -#include -#include - -namespace cubos::core::gl -{ - /// @brief Describes a spot light. - /// @ingroup core-gl - struct SpotLight - { - glm::vec3 position; - glm::quat rotation; - glm::vec3 color; - float intensity; - float range; - float spotAngle; - - SpotLight(const glm::vec3& position, const glm::quat& rotation, const glm::vec3& color, float intensity, - float range, float spotAngle); - }; - - /// @brief Describes a directional light. - /// @ingroup core-gl - struct DirectionalLight - { - glm::quat rotation; - glm::vec3 color; - float intensity; - - DirectionalLight(const glm::quat& rotation, const glm::vec3& color, float intensity); - }; - - /// @brief Describes a point light. - /// @ingroup core-gl - struct PointLight - { - glm::vec3 position; - glm::vec3 color; - float intensity; - float range; - - PointLight(const glm::vec3& position, const glm::vec3& color, float intensity, float range); - }; -} // namespace cubos::core::gl diff --git a/core/src/cubos/core/gl/light.cpp b/core/src/cubos/core/gl/light.cpp deleted file mode 100644 index 99e06427b4..0000000000 --- a/core/src/cubos/core/gl/light.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include - -using namespace cubos::core::gl; - -SpotLight::SpotLight(const glm::vec3& position, const glm::quat& rotation, const glm::vec3& color, float intensity, - float range, float spotAngle) - : position(position) - , rotation(rotation) - , color(color) - , intensity(intensity) - , range(range) - , spotAngle(spotAngle) -{ -} - -DirectionalLight::DirectionalLight(const glm::quat& rotation, const glm::vec3& color, float intensity) - : rotation(rotation) - , color(color) - , intensity(intensity) -{ -} - -PointLight::PointLight(const glm::vec3& position, const glm::vec3& color, float intensity, float range) - : position(position) - , color(color) - , intensity(intensity) - , range(range) -{ -}