From 54524a9d78f8d2e5e51b1de03a10631c62dbdca4 Mon Sep 17 00:00:00 2001 From: codereader Date: Fri, 19 Nov 2021 12:40:32 +0100 Subject: [PATCH] #5584: Remove unused RenderableAABB class --- radiant/CMakeLists.txt | 1 - radiant/ui/common/RenderableAABB.cpp | 55 -------------------------- radiant/ui/common/RenderableAABB.h | 35 ---------------- tools/msvc/DarkRadiant.vcxproj | 2 - tools/msvc/DarkRadiant.vcxproj.filters | 6 --- 5 files changed, 99 deletions(-) delete mode 100644 radiant/ui/common/RenderableAABB.cpp delete mode 100644 radiant/ui/common/RenderableAABB.h diff --git a/radiant/CMakeLists.txt b/radiant/CMakeLists.txt index 3519d432b8..9cbd494472 100644 --- a/radiant/CMakeLists.txt +++ b/radiant/CMakeLists.txt @@ -39,7 +39,6 @@ add_executable(darkradiant ui/common/ImageFilePopulator.cpp ui/common/ImageFileSelector.cpp ui/common/MapPreview.cpp - ui/common/RenderableAABB.cpp ui/common/ShaderChooser.cpp ui/common/ShaderSelector.cpp ui/common/SoundShaderDefinitionView.cpp diff --git a/radiant/ui/common/RenderableAABB.cpp b/radiant/ui/common/RenderableAABB.cpp deleted file mode 100644 index c614356723..0000000000 --- a/radiant/ui/common/RenderableAABB.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "RenderableAABB.h" - -#include - -namespace ui -{ - -// Virtual render function from OpenGLRenderable - -// OpenGL render function - -void RenderableAABB::render(const RenderInfo& info) const { - - // Wireframe cuboid - glBegin(GL_LINES); - glVertex3d(_aabb.extents.x(), _aabb.extents.y(), _aabb.extents.z()); - glVertex3d(_aabb.extents.x(), _aabb.extents.y(), -_aabb.extents.z()); - - glVertex3d(_aabb.extents.x(), _aabb.extents.y(), _aabb.extents.z()); - glVertex3d(-_aabb.extents.x(), _aabb.extents.y(), _aabb.extents.z()); - - glVertex3d(_aabb.extents.x(), _aabb.extents.y(), -_aabb.extents.z()); - glVertex3d(-_aabb.extents.x(), _aabb.extents.y(), -_aabb.extents.z()); - - glVertex3d(_aabb.extents.x(), _aabb.extents.y(), _aabb.extents.z()); - glVertex3d(_aabb.extents.x(), -_aabb.extents.y(), _aabb.extents.z()); - - glVertex3d(-_aabb.extents.x(), _aabb.extents.y(), _aabb.extents.z()); - glVertex3d(-_aabb.extents.x(), -_aabb.extents.y(), _aabb.extents.z()); - - glVertex3d(-_aabb.extents.x(), _aabb.extents.y(), -_aabb.extents.z()); - glVertex3d(-_aabb.extents.x(), -_aabb.extents.y(), -_aabb.extents.z()); - - glVertex3d(_aabb.extents.x(), _aabb.extents.y(), -_aabb.extents.z()); - glVertex3d(_aabb.extents.x(), -_aabb.extents.y(), -_aabb.extents.z()); - - glVertex3d(_aabb.extents.x(), -_aabb.extents.y(), _aabb.extents.z()); - glVertex3d(-_aabb.extents.x(), -_aabb.extents.y(), _aabb.extents.z()); - - glVertex3d(_aabb.extents.x(), -_aabb.extents.y(), _aabb.extents.z()); - glVertex3d(_aabb.extents.x(), -_aabb.extents.y(), -_aabb.extents.z()); - - glVertex3d(-_aabb.extents.x(), _aabb.extents.y(), _aabb.extents.z()); - glVertex3d(-_aabb.extents.x(), _aabb.extents.y(), -_aabb.extents.z()); - - glVertex3d(-_aabb.extents.x(), -_aabb.extents.y(), _aabb.extents.z()); - glVertex3d(-_aabb.extents.x(), -_aabb.extents.y(), -_aabb.extents.z()); - - glVertex3d(_aabb.extents.x(), -_aabb.extents.y(), -_aabb.extents.z()); - glVertex3d(-_aabb.extents.x(), -_aabb.extents.y(), -_aabb.extents.z()); - glEnd(); -} - - -} diff --git a/radiant/ui/common/RenderableAABB.h b/radiant/ui/common/RenderableAABB.h deleted file mode 100644 index 59d7488c9c..0000000000 --- a/radiant/ui/common/RenderableAABB.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef RENDERABLEAABB_H_ -#define RENDERABLEAABB_H_ - -#include "irender.h" -#include "math/AABB.h" - -namespace ui -{ - -/** Adapter class that allows the rendering of an AABB as a wireframe cuboid. The - * class implements the OpenGLRenderable interface and accepts an AABB as a - * construction parameter. - */ - -class RenderableAABB -: public OpenGLRenderable -{ - // The AABB to render - AABB _aabb; - -public: - - /** Construct a RenderableAABB to render the provided AABB. - */ - RenderableAABB(const AABB& aabb) - : _aabb(aabb) {} - - /** Render function from OpenGLRenderable interface. - */ - void render(const RenderInfo& info) const; -}; - -} - -#endif /*RENDERABLEAABB_H_*/ diff --git a/tools/msvc/DarkRadiant.vcxproj b/tools/msvc/DarkRadiant.vcxproj index a34a37a0f1..815e09233c 100644 --- a/tools/msvc/DarkRadiant.vcxproj +++ b/tools/msvc/DarkRadiant.vcxproj @@ -290,7 +290,6 @@ - @@ -500,7 +499,6 @@ - diff --git a/tools/msvc/DarkRadiant.vcxproj.filters b/tools/msvc/DarkRadiant.vcxproj.filters index 6be68b123e..ea25ccd115 100644 --- a/tools/msvc/DarkRadiant.vcxproj.filters +++ b/tools/msvc/DarkRadiant.vcxproj.filters @@ -223,9 +223,6 @@ src\ui\common - - src\ui\common - src\ui\common @@ -750,9 +747,6 @@ src\ui\common - - src\ui\common - src\ui\common