use cubeInKeyhole() where appropriate

This commit is contained in:
Andrew Meadows 2016-02-23 09:16:17 -08:00
parent 9409339230
commit 9558258f64
2 changed files with 3 additions and 3 deletions

View file

@ -3423,7 +3423,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node
rootDetails.y * TREE_SCALE, rootDetails.y * TREE_SCALE,
rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE), rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE),
rootDetails.s * TREE_SCALE); rootDetails.s * TREE_SCALE);
if ((bool)(_viewFrustum.cubeInFrustum(serverBounds))) { if (_viewFrustum.cubeTouchesKeyhole(serverBounds)) {
inViewServers++; inViewServers++;
} }
} }
@ -3489,7 +3489,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node
rootDetails.s * TREE_SCALE); rootDetails.s * TREE_SCALE);
inView = (bool)(_viewFrustum.cubeInFrustum(serverBounds)); inView = _viewFrustum.cubeTouchesKeyhole(serverBounds);
} else { } else {
if (wantExtraDebugging) { if (wantExtraDebugging) {
qCDebug(interfaceapp) << "Jurisdiction without RootCode for node " << *node << ". That's unusual!"; qCDebug(interfaceapp) << "Jurisdiction without RootCode for node " << *node << ". That's unusual!";

View file

@ -459,7 +459,7 @@ float OctreeElement::getEnclosingRadius() const {
} }
ViewFrustum::location OctreeElement::computeViewLocation(const ViewFrustum& viewFrustum) 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" // There are two types of nodes for which we want to "render"