mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 06:18:52 +02:00
code cleanup
This commit is contained in:
parent
00438f9d99
commit
9a22db28a3
1 changed files with 0 additions and 14 deletions
|
@ -1237,7 +1237,6 @@ int VoxelTree::encodeTreeBitstreamRecursion(VoxelNode* node, unsigned char* outp
|
||||||
|
|
||||||
// If the user also asked for occlusion culling, check if this node is occluded
|
// If the user also asked for occlusion culling, check if this node is occluded
|
||||||
if (params.wantOcclusionCulling && childNode->isLeaf()) {
|
if (params.wantOcclusionCulling && childNode->isLeaf()) {
|
||||||
//printLog("params.wantOcclusionCulling... in childNode section...\n");
|
|
||||||
// Don't check occlusion here, just add them to our distance ordered array...
|
// Don't check occlusion here, just add them to our distance ordered array...
|
||||||
|
|
||||||
AABox voxelBox = childNode->getAABox();
|
AABox voxelBox = childNode->getAABox();
|
||||||
|
@ -1247,8 +1246,6 @@ int VoxelTree::encodeTreeBitstreamRecursion(VoxelNode* node, unsigned char* outp
|
||||||
// In order to check occlusion culling, the shadow has to be "all in view" otherwise, we will ignore occlusion
|
// In order to check occlusion culling, the shadow has to be "all in view" otherwise, we will ignore occlusion
|
||||||
// culling and proceed as normal
|
// culling and proceed as normal
|
||||||
if (voxelShadow->getAllInView()) {
|
if (voxelShadow->getAllInView()) {
|
||||||
//childNode->printDebugDetails("voxelShadow->getAllInView() childNode=");
|
|
||||||
|
|
||||||
CoverageMap::StorageResult result = params.map->checkMap(voxelShadow, true);
|
CoverageMap::StorageResult result = params.map->checkMap(voxelShadow, true);
|
||||||
|
|
||||||
// In all cases where the shadow wasn't stored, we need to free our own memory.
|
// In all cases where the shadow wasn't stored, we need to free our own memory.
|
||||||
|
@ -1257,23 +1254,12 @@ int VoxelTree::encodeTreeBitstreamRecursion(VoxelNode* node, unsigned char* outp
|
||||||
delete voxelShadow;
|
delete voxelShadow;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == CoverageMap::STORED) {
|
|
||||||
//childNode->printDebugDetails("Leaf is stored!! childNode=");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result == CoverageMap::DOESNT_FIT) {
|
|
||||||
//printLog(">>>> Leaf DOESNT_FIT!! That's not expected!!! \n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// If while attempting to add this voxel's shadow, we determined it was occluded, then
|
// If while attempting to add this voxel's shadow, we determined it was occluded, then
|
||||||
// we don't need to process it further and we can exit early.
|
// we don't need to process it further and we can exit early.
|
||||||
if (result == CoverageMap::OCCLUDED) {
|
if (result == CoverageMap::OCCLUDED) {
|
||||||
//childNode->printDebugDetails("Leaf is occluded!! childNode=");
|
|
||||||
childIsOccluded = true;
|
childIsOccluded = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//childNode->printDebugDetails("Not all in view, cleanup... childNode=");
|
|
||||||
delete voxelShadow;
|
delete voxelShadow;
|
||||||
}
|
}
|
||||||
} // wants occlusion culling & isLeaf()
|
} // wants occlusion culling & isLeaf()
|
||||||
|
|
Loading…
Reference in a new issue