History

naming cleanup and some optimizations

ZappoMan committed 13 years ago

Commit 1284f9d1 parent 6755dfd6 files · +74 −65Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+10−10
@@ -1202,19 +1202,19 @@ bool VoxelSystem::falseColorizeOccludedOperation(VoxelNode* node, void* extraDat · 1201 unmodified lines
1202 1202
1203 AABox voxelBox = node->getAABox();1203 AABox voxelBox = node->getAABox();
1204 voxelBox.scale(TREE_SCALE);1204 voxelBox.scale(TREE_SCALE);
1205 VoxelProjectedPolygon* voxelShadow = new VoxelProjectedPolygon(args->viewFrustum->getProjectedShadow(voxelBox));1205 VoxelProjectedPolygon* voxelPolygon = new VoxelProjectedPolygon(args->viewFrustum->getProjectedPolygon(voxelBox));
1206 1206
1207 // If we're not all in view, then ignore it, and just return. But keep searching...1207 // If we're not all in view, then ignore it, and just return. But keep searching...
1208 if (!voxelShadow->getAllInView()) {1208 if (!voxelPolygon->getAllInView()) {
1209 args->nonLeavesOutOfView++;1209 args->nonLeavesOutOfView++;
1210 delete voxelShadow;1210 delete voxelPolygon;
1211 return true;1211 return true;
1212 }1212 }
1213 1213
1214 CoverageMap::StorageResult result = args->map->checkMap(voxelShadow, false);1214 CoverageMap::StorageResult result = args->map->checkMap(voxelPolygon, false);
1215 if (result == CoverageMap::OCCLUDED) {1215 if (result == CoverageMap::OCCLUDED) {
1216 args->nonLeavesOccluded++;1216 args->nonLeavesOccluded++;
1217 delete voxelShadow;1217 delete voxelPolygon;
1218 1218
1219 FalseColorizeSubTreeOperationArgs subArgs;1219 FalseColorizeSubTreeOperationArgs subArgs;
1220 subArgs.color[0] = 0;1220 subArgs.color[0] = 0;
@@ -1230,7 +1230,7 @@ bool VoxelSystem::falseColorizeOccludedOperation(VoxelNode* node, void* extraDat · 9 unmodified lines
1230 return false;1230 return false;
1231 }1231 }
1232 1232
1233 delete voxelShadow;1233 delete voxelPolygon;
1234 return true; // keep looking...1234 return true; // keep looking...
1235 }1235 }
1236 1236
@@ -1239,16 +1239,16 @@ bool VoxelSystem::falseColorizeOccludedOperation(VoxelNode* node, void* extraDat · 2 unmodified lines
1239 1239
1240 AABox voxelBox = node->getAABox();1240 AABox voxelBox = node->getAABox();
1241 voxelBox.scale(TREE_SCALE);1241 voxelBox.scale(TREE_SCALE);
1242 VoxelProjectedPolygon* voxelShadow = new VoxelProjectedPolygon(args->viewFrustum->getProjectedShadow(voxelBox));1242 VoxelProjectedPolygon* voxelPolygon = new VoxelProjectedPolygon(args->viewFrustum->getProjectedPolygon(voxelBox));
1243 1243
1244 // If we're not all in view, then ignore it, and just return. But keep searching...1244 // If we're not all in view, then ignore it, and just return. But keep searching...
1245 if (!voxelShadow->getAllInView()) {1245 if (!voxelPolygon->getAllInView()) {
1246 args->outOfView++;1246 args->outOfView++;
1247 delete voxelShadow;1247 delete voxelPolygon;
1248 return true;1248 return true;
1249 }1249 }
1250 1250
1251 CoverageMap::StorageResult result = args->map->checkMap(voxelShadow, true);1251 CoverageMap::StorageResult result = args->map->checkMap(voxelPolygon, true);
1252 if (result == CoverageMap::OCCLUDED) {1252 if (result == CoverageMap::OCCLUDED) {
1253 node->setFalseColor(255, 0, 0);1253 node->setFalseColor(255, 0, 0);
1254 args->occludedVoxels++;1254 args->occludedVoxels++;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t