History

some cleanup

ZappoMan committed 13 years ago

Commit 2c481391 parent 0bec7151 file · +2 −16Browse files

Showing the changes to interface/src/VoxelSystem.cpp (1 of 1 file). Show all

Unified · Split

interface/src/VoxelSystem.cpp+2−16
@@ -547,24 +547,14 @@ bool VoxelSystem::falseColorizeInViewOperation(VoxelNode* node, bool down, void* · 546 unmodified lines
547547 return true;
548548 }
549549
550− ViewFrustum* viewFrustum = (ViewFrustum*) extraData;
550+ const ViewFrustum* viewFrustum = (const ViewFrustum*) extraData;
551551
552552 _nodeCount++;
553553
554554 // only do this for truely colored voxels...
555555 if (node->isColored()) {
556− // first calculate the AAbox for the voxel
557− AABox voxelBox;
558− node->getAABox(voxelBox);
559−
560− voxelBox.scale(TREE_SCALE);
561−
562− printf("voxelBox corner=(%f,%f,%f) x=%f\n",
563− voxelBox.getCorner().x, voxelBox.getCorner().y, voxelBox.getCorner().z,
564− voxelBox.getSize().x);
565−
566556 // If the voxel is outside of the view frustum, then false color it red
567− if (ViewFrustum::OUTSIDE == viewFrustum->boxInFrustum(voxelBox)) {
557+ if (!node->isInView(*viewFrustum)) {
568558 // Out of view voxels are colored RED
569559 unsigned char newR = 255;
570560 unsigned char newG = 0;
@@ -573,11 +563,7 @@ bool VoxelSystem::falseColorizeInViewOperation(VoxelNode* node, bool down, void* · 2 unmodified lines
573563 //printf("voxel OUTSIDE view - FALSE colorizing node %d TRUE color is %x,%x,%x \n",
574564 // _nodeCount,node->getTrueColor()[0],node->getTrueColor()[1],node->getTrueColor()[2]);
575565 node->setFalseColor(newR,newG,newB);
576− } else {
577− printf("voxel NOT OUTSIDE view\n");
578566 }
579− } else {
580− printf("voxel not colored, don't consider it\n");
581567 }
582568
583569 return true; // keep going!