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
474474 #ifdef DEBUG_BOUNDING_PARTS
475475 {
476476 AABox partBounds = getPartBounds(_meshIndex, partIndex);
477− bool inView = args->_viewFrustum->computeBoxViewLocation(partBounds) != ViewFrustum::OUTSIDE;
478477
479− glm::vec4 cubeColor;
478+ glm::vec4 cubeColor(1.0f, 1.0f, 0.0f, 1.0f);
480479 if (isSkinned) {
481480 cubeColor = glm::vec4(0.0f, 1.0f, 1.0f, 1.0f);
482− } else if (inView) {
481+ } else if ((bool)(args->_viewFrustum->boxInFrustum(partBounds))) {
483482 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);
486483 }
487484
488485 Transform transform;