From 9558258f64c5277f2b353a92f13e7c01a7491f48 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Tue, 23 Feb 2016 09:16:17 -0800 Subject: [PATCH] use cubeInKeyhole() where appropriate --- interface/src/Application.cpp | 4 ++-- libraries/octree/src/OctreeElement.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 7973e4f645..0f7b84d8ab 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3423,7 +3423,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node rootDetails.y * TREE_SCALE, rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE), rootDetails.s * TREE_SCALE); - if ((bool)(_viewFrustum.cubeInFrustum(serverBounds))) { + if (_viewFrustum.cubeTouchesKeyhole(serverBounds)) { inViewServers++; } } @@ -3489,7 +3489,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node rootDetails.s * TREE_SCALE); - inView = (bool)(_viewFrustum.cubeInFrustum(serverBounds)); + inView = _viewFrustum.cubeTouchesKeyhole(serverBounds); } else { if (wantExtraDebugging) { qCDebug(interfaceapp) << "Jurisdiction without RootCode for node " << *node << ". That's unusual!"; diff --git a/libraries/octree/src/OctreeElement.cpp b/libraries/octree/src/OctreeElement.cpp index e473d3d28a..d13837b256 100644 --- a/libraries/octree/src/OctreeElement.cpp +++ b/libraries/octree/src/OctreeElement.cpp @@ -459,7 +459,7 @@ float OctreeElement::getEnclosingRadius() const { } ViewFrustum::location OctreeElement::computeViewLocation(const ViewFrustum& viewFrustum) const { - return viewFrustum.cubeInFrustum(_cube); + return viewFrustum.cubeInKeyhole(_cube); } // There are two types of nodes for which we want to "render"