History

use shapeInFrustum() names again

but at the same time make the code more redable also: add some more efficient shape-touches-view methods and cleanup some whitespace

Andrew Meadows committed 10 years ago

Commit dfdf3751 parent 8200bab15 files · +140 −600Browse files

Showing the changes to interface/src/Application.cpp (1 of 15 files). Show all

Unified · Split

interface/src/Application.cpp+2−9
@@ -3423,9 +3423,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 3422 unmodified lines
34233423 rootDetails.y * TREE_SCALE,
34243424 rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE),
34253425 rootDetails.s * TREE_SCALE);
3426− ViewFrustum::location serverFrustumLocation = _viewFrustum.computeCubeViewLocation(serverBounds);
3427−
3428− if (serverFrustumLocation != ViewFrustum::OUTSIDE) {
3426+ if ((bool)(_viewFrustum.cubeInFrustum(serverBounds))) {
34293427 inViewServers++;
34303428 }
34313429 }
@@ -3491,12 +3489,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 59 unmodified lines
34913489 rootDetails.s * TREE_SCALE);
34923490
34933491
3494− ViewFrustum::location serverFrustumLocation = _viewFrustum.computeCubeViewLocation(serverBounds);
3495− if (serverFrustumLocation != ViewFrustum::OUTSIDE) {
3496− inView = true;
3497− } else {
3498− inView = false;
3499− }
3492+ inView = (bool)(_viewFrustum.cubeInFrustum(serverBounds));
35003493 } else {
35013494 if (wantExtraDebugging) {
35023495 qCDebug(interfaceapp) << "Jurisdiction without RootCode for node " << *node << ". That's unusual!";