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 libraries/render-utils/src/MeshPartPayload.cpp (1 of 15 files). Show all
Unified · Split
| @@ -474,15 +474,12 @@ void ModelMeshPartPayload::render(RenderArgs* args) const { · 473 unmodified lines | ||
| 474 | 474 | #ifdef DEBUG_BOUNDING_PARTS |
| 475 | 475 | { |
| 476 | 476 | AABox partBounds = getPartBounds(_meshIndex, partIndex); |
| 477 | − bool inView = args->_viewFrustum->computeBoxViewLocation(partBounds) != ViewFrustum::OUTSIDE; | |
| 478 | 477 | |
| 479 | − glm::vec4 cubeColor; | |
| 478 | + glm::vec4 cubeColor(1.0f, 1.0f, 0.0f, 1.0f); | |
| 480 | 479 | if (isSkinned) { |
| 481 | 480 | cubeColor = glm::vec4(0.0f, 1.0f, 1.0f, 1.0f); |
| 482 | − } else if (inView) { | |
| 481 | + } else if ((bool)(args->_viewFrustum->boxInFrustum(partBounds))) { | |
| 483 | 482 | cubeColor = glm::vec4(1.0f, 0.0f, 1.0f, 1.0f); |
| 484 | − } else { | |
| 485 | − cubeColor = glm::vec4(1.0f, 1.0f, 0.0f, 1.0f); | |
| 486 | 483 | } |
| 487 | 484 | |
| 488 | 485 | Transform transform; |