From 4e0a3e3b58abe7bc1f947a601f3acfefb34152a4 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Mon, 22 Apr 2013 17:21:47 -0700 Subject: [PATCH] switch to boxInFrustum() instead of pointInFrustum() for more accuracy --- interface/src/VoxelSystem.cpp | 2 +- libraries/voxels/src/VoxelTree.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/VoxelSystem.cpp b/interface/src/VoxelSystem.cpp index b2bcc701e0..fb7a11aef2 100644 --- a/interface/src/VoxelSystem.cpp +++ b/interface/src/VoxelSystem.cpp @@ -465,7 +465,7 @@ bool VoxelSystem::falseColorizeInViewOperation(VoxelNode* node, bool down, void* voxelBox.getSize().x); // If the voxel is outside of the view frustum, then false color it red - if (ViewFrustum::OUTSIDE == viewFrustum->pointInFrustum(voxelBox.getCorner())) { + if (ViewFrustum::OUTSIDE == viewFrustum->boxInFrustum(voxelBox)) { // Out of view voxels are colored RED unsigned char newR = 255; unsigned char newG = 0; diff --git a/libraries/voxels/src/VoxelTree.cpp b/libraries/voxels/src/VoxelTree.cpp index 3e75f76184..db69535e14 100644 --- a/libraries/voxels/src/VoxelTree.cpp +++ b/libraries/voxels/src/VoxelTree.cpp @@ -392,7 +392,7 @@ unsigned char * VoxelTree::loadBitstreamBuffer(unsigned char *& bitstreamBuffer, bool childIsClose = true; // for now, assume we're close enough bool childInView = !viewFrustumCulling || - (ViewFrustum::OUTSIDE != viewFrustum.pointInFrustum(childBox.getCorner())); + (ViewFrustum::OUTSIDE != viewFrustum.boxInFrustum(childBox)); /// XXXBHG - debug code, switch this to true, and we'll send everything but include false coloring // on voxels based on whether or not they match these rules.