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 | rootDetails.y * TREE_SCALE, | 3423 | rootDetails.y * TREE_SCALE, |
| 3424 | rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE), | 3424 | rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE), |
| 3425 | rootDetails.s * TREE_SCALE); | 3425 | rootDetails.s * TREE_SCALE); |
| 3426 | ViewFrustum::location serverFrustumLocation = _viewFrustum.computeCubeViewLocation(serverBounds); | 3426 | if ((bool)(_viewFrustum.cubeInFrustum(serverBounds))) { |
| 3427 | |||
| 3428 | if (serverFrustumLocation != ViewFrustum::OUTSIDE) { | ||
| 3429 | inViewServers++; | 3427 | inViewServers++; |
| 3430 | } | 3428 | } |
| 3431 | } | 3429 | } |
| @@ -3491,12 +3489,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 59 unmodified lines | |||
| 3491 | rootDetails.s * TREE_SCALE); | 3489 | rootDetails.s * TREE_SCALE); |
| 3492 | 3490 | ||
| 3493 | 3491 | ||
| 3494 | ViewFrustum::location serverFrustumLocation = _viewFrustum.computeCubeViewLocation(serverBounds); | 3492 | inView = (bool)(_viewFrustum.cubeInFrustum(serverBounds)); |
| 3495 | if (serverFrustumLocation != ViewFrustum::OUTSIDE) { | ||
| 3496 | inView = true; | ||
| 3497 | } else { | ||
| 3498 | inView = false; | ||
| 3499 | } | ||
| 3500 | } else { | 3493 | } else { |
| 3501 | if (wantExtraDebugging) { | 3494 | if (wantExtraDebugging) { |
| 3502 | qCDebug(interfaceapp) << "Jurisdiction without RootCode for node " << *node << ". That's unusual!"; | 3495 | qCDebug(interfaceapp) << "Jurisdiction without RootCode for node " << *node << ". That's unusual!"; |