diff --git a/sources.cmake b/sources.cmake index 0ed51e3ff..d4f28ae4d 100644 --- a/sources.cmake +++ b/sources.cmake @@ -1,6 +1,6 @@ # Modify this file to change the last-modified date when you add/remove a file. -# This will then trigger a new cmake run automatically. +# This will then trigger a new cmake run automatically. file(GLOB_RECURSE STK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.hpp") file(GLOB_RECURSE STK_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.cpp") file(GLOB_RECURSE STK_SHADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "data/shaders/*") -file(GLOB_RECURSE STK_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${PROJECT_BINARY_DIR}/tmp/*.rc") +file(GLOB_RECURSE STK_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${PROJECT_BINARY_DIR}/tmp/*.rc") diff --git a/src/graphics/stk_scene_manager.cpp b/src/graphics/stk_scene_manager.cpp deleted file mode 100644 index b26181ab8..000000000 --- a/src/graphics/stk_scene_manager.cpp +++ /dev/null @@ -1,67 +0,0 @@ -// SuperTuxKart - a fun racing game with go-kart -// Copyright (C) 2014-2015 SuperTuxKart-Team -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 3 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#ifndef SERVER_ONLY - -#include "graphics/stk_scene_manager.hpp" -#include -#include - -using namespace irr; - -// From irrlicht code -static -bool isBoxInFrontOfPlane(const core::plane3df &plane, const core::vector3df edges[8]) -{ - for (u32 j = 0; j<8; ++j) - if (plane.classifyPointRelation(edges[j]) != core::ISREL3D_FRONT) - return false; - return true; -} - -std::vector BoundingBoxes; - -void addEdge(const core::vector3df &P0, const core::vector3df &P1) -{ - BoundingBoxes.push_back(P0.X); - BoundingBoxes.push_back(P0.Y); - BoundingBoxes.push_back(P0.Z); - BoundingBoxes.push_back(P1.X); - BoundingBoxes.push_back(P1.Y); - BoundingBoxes.push_back(P1.Z); -} - -bool isCulledPrecise(const scene::ICameraSceneNode *cam, const scene::ISceneNode *node) -{ - if (!node->getAutomaticCulling()) - return false; - - const core::matrix4 &trans = node->getAbsoluteTransformation(); - const scene::SViewFrustum &frust = *cam->getViewFrustum(); - - core::vector3df edges[8]; - node->getBoundingBox().getEdges(edges); - for (unsigned i = 0; i < 8; i++) - trans.transformVect(edges[i]); - - for (s32 i = 0; i < scene::SViewFrustum::VF_PLANE_COUNT; ++i) - if (isBoxInFrontOfPlane(frust.planes[i], edges)) - return true; - return false; -} - -#endif // !SERVER_ONLY diff --git a/src/graphics/stk_scene_manager.hpp b/src/graphics/stk_scene_manager.hpp deleted file mode 100644 index 8fc984b6a..000000000 --- a/src/graphics/stk_scene_manager.hpp +++ /dev/null @@ -1,37 +0,0 @@ -// SuperTuxKart - a fun racing game with go-kart -// Copyright (C) 2014-2015 SuperTuxKart-Team -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 3 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - -// Not really a scene manager yet but hold algorithm that -// rework scene manager output - -#ifndef SERVER_ONLY - -#ifndef HEADER_STKSCENEMANAGER_HPP -#define HEADER_STKSCENEMANAGER_HPP - -#include -#include -#include - -void addEdge(const irr::core::vector3df &P0, const irr::core::vector3df &P1); - -bool isCulledPrecise(const irr::scene::ICameraSceneNode *cam, const irr::scene::ISceneNode *node); - -#endif - -#endif // supertuxkart