but at the same time make the code more redable also: add some more efficient shape-touches-view methods and cleanup some whitespace
Showing the changes to interface/src/Application.cpp (1 of 15 files). Show all
Unified · Split
| @@ -3423,9 +3423,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 3422 unmodified lines | ||
| 3423 | 3423 | rootDetails.y * TREE_SCALE, |
| 3424 | 3424 | rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE), |
| 3425 | 3425 | rootDetails.s * TREE_SCALE); |
| 3426 | − ViewFrustum::location serverFrustumLocation = _viewFrustum.computeCubeViewLocation(serverBounds); | |
| 3427 | − | |
| 3428 | − if (serverFrustumLocation != ViewFrustum::OUTSIDE) { | |
| 3426 | + if ((bool)(_viewFrustum.cubeInFrustum(serverBounds))) { | |
| 3429 | 3427 | inViewServers++; |
| 3430 | 3428 | } |
| 3431 | 3429 | } |
| @@ -3491,12 +3489,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 59 unmodified lines | ||
| 3491 | 3489 | rootDetails.s * TREE_SCALE); |
| 3492 | 3490 | |
| 3493 | 3491 | |
| 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)); | |
| 3500 | 3493 | } else { |
| 3501 | 3494 | if (wantExtraDebugging) { |
| 3502 | 3495 | qCDebug(interfaceapp) << "Jurisdiction without RootCode for node " << *node << ". That's unusual!"; |