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 libraries/render-utils/src/MeshPartPayload.cpp (1 of 15 files). Show all

Unified · Split

libraries/render-utils/src/MeshPartPayload.cpp+2−5
@@ -474,15 +474,12 @@ void ModelMeshPartPayload::render(RenderArgs* args) const { · 473 unmodified lines
474#ifdef DEBUG_BOUNDING_PARTS474#ifdef DEBUG_BOUNDING_PARTS
475 {475 {
476 AABox partBounds = getPartBounds(_meshIndex, partIndex);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 if (isSkinned) {479 if (isSkinned) {
481 cubeColor = glm::vec4(0.0f, 1.0f, 1.0f, 1.0f);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 cubeColor = glm::vec4(1.0f, 0.0f, 1.0f, 1.0f);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 Transform transform;485 Transform transform;