switch to boxInFrustum() instead of pointInFrustum() for more accuracy

This commit is contained in:
ZappoMan 2013-04-22 17:21:47 -07:00
parent a79659a5d4
commit 4e0a3e3b58
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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.