diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 00a4440920..aa978f3464 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3572,23 +3572,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se if (!selfAvatarOnly) { _nodeBoundsDisplay.draw(); - // render octree fades if they exist - if (_octreeFades.size() > 0) { - PerformanceTimer perfTimer("octreeFades"); - PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), - "Application::displaySide() ... octree fades..."); - _octreeFadesLock.lockForWrite(); - for(std::vector::iterator fade = _octreeFades.begin(); fade != _octreeFades.end();) { - fade->render(renderArgs); - if(fade->isDone()) { - fade = _octreeFades.erase(fade); - } else { - ++fade; - } - } - _octreeFadesLock.unlock(); - } - // give external parties a change to hook in { PerformanceTimer perfTimer("inWorldInterface"); @@ -3880,17 +3863,6 @@ void Application::nodeKilled(SharedNodePointer node) { qCDebug(interfaceapp, "model server going away...... v[%f, %f, %f, %f]", (double)rootDetails.x, (double)rootDetails.y, (double)rootDetails.z, (double)rootDetails.s); - // Add the jurisditionDetails object to the list of "fade outs" - if (!Menu::getInstance()->isOptionChecked(MenuOption::DontFadeOnOctreeServerChanges)) { - OctreeFade fade(OctreeFade::FADE_OUT, NODE_KILLED_RED, NODE_KILLED_GREEN, NODE_KILLED_BLUE); - fade.voxelDetails = rootDetails; - const float slightly_smaller = 0.99f; - fade.voxelDetails.s = fade.voxelDetails.s * slightly_smaller; - _octreeFadesLock.lockForWrite(); - _octreeFades.push_back(fade); - _octreeFadesLock.unlock(); - } - // If the model server is going away, remove it from our jurisdiction map so we don't send voxels to a dead server _entityServerJurisdictions.lockForWrite(); _entityServerJurisdictions.erase(_entityServerJurisdictions.find(nodeUUID)); @@ -3967,16 +3939,6 @@ int Application::parseOctreeStats(const QByteArray& packet, const SharedNodePoin qPrintable(serverType), (double)rootDetails.x, (double)rootDetails.y, (double)rootDetails.z, (double)rootDetails.s); - // Add the jurisditionDetails object to the list of "fade outs" - if (!Menu::getInstance()->isOptionChecked(MenuOption::DontFadeOnOctreeServerChanges)) { - OctreeFade fade(OctreeFade::FADE_OUT, NODE_ADDED_RED, NODE_ADDED_GREEN, NODE_ADDED_BLUE); - fade.voxelDetails = rootDetails; - const float slightly_smaller = 0.99f; - fade.voxelDetails.s = fade.voxelDetails.s * slightly_smaller; - _octreeFadesLock.lockForWrite(); - _octreeFades.push_back(fade); - _octreeFadesLock.unlock(); - } } else { jurisdiction->unlock(); } diff --git a/interface/src/Application.h b/interface/src/Application.h index 8dd987fbcd..b621b3e1f2 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -72,7 +72,6 @@ #include "ui/ToolWindow.h" #include "ui/UserInputMapper.h" #include "devices/KeyboardMouseDevice.h" -#include "octree/OctreeFade.h" #include "octree/OctreePacketProcessor.h" #include "UndoStackScriptingInterface.h" @@ -91,13 +90,6 @@ class Node; class ProgramObject; class ScriptEngine; -static const float NODE_ADDED_RED = 0.0f; -static const float NODE_ADDED_GREEN = 1.0f; -static const float NODE_ADDED_BLUE = 0.0f; -static const float NODE_KILLED_RED = 1.0f; -static const float NODE_KILLED_GREEN = 0.0f; -static const float NODE_KILLED_BLUE = 0.0f; - static const QString SNAPSHOT_EXTENSION = ".jpg"; static const QString SVO_EXTENSION = ".svo"; static const QString SVO_JSON_EXTENSION = ".svo.json"; @@ -627,8 +619,6 @@ private: NodeBounds _nodeBoundsDisplay; - std::vector _octreeFades; - QReadWriteLock _octreeFadesLock; ControllerScriptingInterface _controllerScriptingInterface; QPointer _logDialog; QPointer _snapshotShareDialog; diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index d22b80975d..ff0fd70f3a 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -340,7 +340,6 @@ Menu::Menu() { 0, // QML Qt::SHIFT | Qt::Key_A, true); addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::AmbientOcclusion); - addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::DontFadeOnOctreeServerChanges); MenuWrapper* ambientLightMenu = renderOptionsMenu->addMenu(MenuOption::RenderAmbientLight); QActionGroup* ambientLightGroup = new QActionGroup(ambientLightMenu); diff --git a/interface/src/Menu.h b/interface/src/Menu.h index 3745f1e766..b309cab99e 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -179,7 +179,6 @@ namespace MenuOption { const QString DisplayModelElementProxy = "Display Model Element Bounds"; const QString DisplayDebugTimingDetails = "Display Timing Details"; const QString DontDoPrecisionPicking = "Don't Do Precision Picking"; - const QString DontFadeOnOctreeServerChanges = "Don't Fade In/Out on Octree Server Changes"; const QString DontRenderEntitiesAsScene = "Don't Render Entities as Scene"; const QString EchoLocalAudio = "Echo Local Audio"; const QString EchoServerAudio = "Echo Server Audio"; diff --git a/interface/src/octree/OctreeFade.cpp b/interface/src/octree/OctreeFade.cpp deleted file mode 100644 index 881f3c5938..0000000000 --- a/interface/src/octree/OctreeFade.cpp +++ /dev/null @@ -1,68 +0,0 @@ -// -// OctreeFade.cpp -// interface/src/octree -// -// Created by Brad Hefta-Gaub on 8/6/13. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "InterfaceConfig.h" - -#include -#include -#include - -#include "Application.h" -#include "OctreeFade.h" - -const float OctreeFade::FADE_OUT_START = 0.5f; -const float OctreeFade::FADE_OUT_END = 0.05f; -const float OctreeFade::FADE_OUT_STEP = 0.9f; -const float OctreeFade::FADE_IN_START = 0.05f; -const float OctreeFade::FADE_IN_END = 0.5f; -const float OctreeFade::FADE_IN_STEP = 1.1f; -const float OctreeFade::DEFAULT_RED = 0.5f; -const float OctreeFade::DEFAULT_GREEN = 0.5f; -const float OctreeFade::DEFAULT_BLUE = 0.5f; - -OctreeFade::OctreeFade(FadeDirection direction, float red, float green, float blue) : - direction(direction), - red(red), - green(green), - blue(blue) -{ - opacity = (direction == FADE_OUT) ? FADE_OUT_START : FADE_IN_START; -} - -void OctreeFade::render(RenderArgs* renderArgs) { - DependencyManager::get()->begin(renderArgs); - - glDisable(GL_LIGHTING); - glPushMatrix(); - glScalef(1.0f, 1.0f, 1.0f); - glTranslatef(voxelDetails.x + voxelDetails.s * 0.5f, - voxelDetails.y + voxelDetails.s * 0.5f, - voxelDetails.z + voxelDetails.s * 0.5f); - glLineWidth(1.0f); - DependencyManager::get()->renderSolidCube(voxelDetails.s, glm::vec4(red, green, blue, opacity)); - glLineWidth(1.0f); - glPopMatrix(); - glEnable(GL_LIGHTING); - - - DependencyManager::get()->end(renderArgs); - - opacity *= (direction == FADE_OUT) ? FADE_OUT_STEP : FADE_IN_STEP; -} - -bool OctreeFade::isDone() const { - if (direction == FADE_OUT) { - return opacity <= FADE_OUT_END; - } else { - return opacity >= FADE_IN_END; - } - return true; // unexpected case, assume we're done -} diff --git a/interface/src/octree/OctreeFade.h b/interface/src/octree/OctreeFade.h deleted file mode 100644 index 137a505537..0000000000 --- a/interface/src/octree/OctreeFade.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// OctreeFade.h -// interface/src/octree -// -// Created by Brad Hefta-Gaub on 8/6/13. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#ifndef hifi_OctreeFade_h -#define hifi_OctreeFade_h - -#include // for VoxelPositionSize - -class OctreeFade { -public: - - enum FadeDirection { FADE_OUT, FADE_IN}; - static const float FADE_OUT_START; - static const float FADE_OUT_END; - static const float FADE_OUT_STEP; - static const float FADE_IN_START; - static const float FADE_IN_END; - static const float FADE_IN_STEP; - static const float DEFAULT_RED; - static const float DEFAULT_GREEN; - static const float DEFAULT_BLUE; - - VoxelPositionSize voxelDetails; - FadeDirection direction; - float opacity; - - float red; - float green; - float blue; - - OctreeFade(FadeDirection direction = FADE_OUT, float red = DEFAULT_RED, - float green = DEFAULT_GREEN, float blue = DEFAULT_BLUE); - - void render(RenderArgs* renderArgs); - bool isDone() const; -}; - -#endif // hifi_OctreeFade_h diff --git a/tests/ui/src/main.cpp b/tests/ui/src/main.cpp index 19070e9699..1b0c7e0ab1 100644 --- a/tests/ui/src/main.cpp +++ b/tests/ui/src/main.cpp @@ -125,7 +125,6 @@ public: DisplayModelElementProxy, DisplayDebugTimingDetails, DontDoPrecisionPicking, - DontFadeOnOctreeServerChanges, DontRenderEntitiesAsScene, EchoLocalAudio, EchoServerAudio,