History

remove now extraneous newlines after switch to QDebug

Stephen Birarda committed 13 years ago

Commit 89d3cfd1 parent afe49bc22 files · +199 −199Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+23−23
@@ -144,16 +144,16 @@ int VoxelSystem::parseData(unsigned char* sourceBuffer, int numBytes) { · 143 unmodified lines
144 int commandLength = strlen(command); // commands are null terminated strings144 int commandLength = strlen(command); // commands are null terminated strings
145 int totalLength = 1+commandLength+1;145 int totalLength = 1+commandLength+1;
146 146
147 qDebug("got Z message len(%d)= %s\n", numBytes, command);147 qDebug("got Z message len(%d)= %s", numBytes, command);
148 148
149 while (totalLength <= numBytes) {149 while (totalLength <= numBytes) {
150 if (0==strcmp(command,(char*)"erase all")) {150 if (0==strcmp(command,(char*)"erase all")) {
151 qDebug("got Z message == erase all\n");151 qDebug("got Z message == erase all");
152 _tree->eraseAllVoxels();152 _tree->eraseAllVoxels();
153 _voxelsInReadArrays = _voxelsInWriteArrays = 0; // better way to do this??153 _voxelsInReadArrays = _voxelsInWriteArrays = 0; // better way to do this??
154 }154 }
155 if (0==strcmp(command,(char*)"add scene")) {155 if (0==strcmp(command,(char*)"add scene")) {
156 qDebug("got Z message == add scene - NOT SUPPORTED ON INTERFACE\n");156 qDebug("got Z message == add scene - NOT SUPPORTED ON INTERFACE");
157 }157 }
158 totalLength += commandLength+1;158 totalLength += commandLength+1;
159 }159 }
@@ -708,7 +708,7 @@ bool VoxelSystem::randomColorOperation(VoxelNode* node, void* extraData) { · 548 unmodified lines
708void VoxelSystem::randomizeVoxelColors() {708void VoxelSystem::randomizeVoxelColors() {
709 _nodeCount = 0;709 _nodeCount = 0;
710 _tree->recurseTreeWithOperation(randomColorOperation);710 _tree->recurseTreeWithOperation(randomColorOperation);
711 qDebug("setting randomized true color for %d nodes\n", _nodeCount);711 qDebug("setting randomized true color for %d nodes", _nodeCount);
712 setupNewVoxelsForDrawing();712 setupNewVoxelsForDrawing();
713}713}
714 714
@@ -722,7 +722,7 @@ bool VoxelSystem::falseColorizeRandomOperation(VoxelNode* node, void* extraData) · 7 unmodified lines
722void VoxelSystem::falseColorizeRandom() {722void VoxelSystem::falseColorizeRandom() {
723 _nodeCount = 0;723 _nodeCount = 0;
724 _tree->recurseTreeWithOperation(falseColorizeRandomOperation);724 _tree->recurseTreeWithOperation(falseColorizeRandomOperation);
725 qDebug("setting randomized false color for %d nodes\n", _nodeCount);725 qDebug("setting randomized false color for %d nodes", _nodeCount);
726 setupNewVoxelsForDrawing();726 setupNewVoxelsForDrawing();
727}727}
728 728
@@ -736,7 +736,7 @@ void VoxelSystem::trueColorize() { · 7 unmodified lines
736 PerformanceWarning warn(true, "trueColorize()",true);736 PerformanceWarning warn(true, "trueColorize()",true);
737 _nodeCount = 0;737 _nodeCount = 0;
738 _tree->recurseTreeWithOperation(trueColorizeOperation);738 _tree->recurseTreeWithOperation(trueColorizeOperation);
739 qDebug("setting true color for %d nodes\n", _nodeCount);739 qDebug("setting true color for %d nodes", _nodeCount);
740 setupNewVoxelsForDrawing();740 setupNewVoxelsForDrawing();
741}741}
742 742
@@ -756,7 +756,7 @@ bool VoxelSystem::falseColorizeInViewOperation(VoxelNode* node, void* extraData) · 13 unmodified lines
756void VoxelSystem::falseColorizeInView(ViewFrustum* viewFrustum) {756void VoxelSystem::falseColorizeInView(ViewFrustum* viewFrustum) {
757 _nodeCount = 0;757 _nodeCount = 0;
758 _tree->recurseTreeWithOperation(falseColorizeInViewOperation,(void*)viewFrustum);758 _tree->recurseTreeWithOperation(falseColorizeInViewOperation,(void*)viewFrustum);
759 qDebug("setting in view false color for %d nodes\n", _nodeCount);759 qDebug("setting in view false color for %d nodes", _nodeCount);
760 setupNewVoxelsForDrawing();760 setupNewVoxelsForDrawing();
761}761}
762 762
@@ -806,10 +806,10 @@ void VoxelSystem::falseColorizeDistanceFromView(ViewFrustum* viewFrustum) { · 43 unmodified lines
806 _maxDistance = 0.0;806 _maxDistance = 0.0;
807 _minDistance = FLT_MAX;807 _minDistance = FLT_MAX;
808 _tree->recurseTreeWithOperation(getDistanceFromViewRangeOperation,(void*)viewFrustum);808 _tree->recurseTreeWithOperation(getDistanceFromViewRangeOperation,(void*)viewFrustum);
809 qDebug("determining distance range for %d nodes\n", _nodeCount);809 qDebug("determining distance range for %d nodes", _nodeCount);
810 _nodeCount = 0;810 _nodeCount = 0;
811 _tree->recurseTreeWithOperation(falseColorizeDistanceFromViewOperation,(void*)viewFrustum);811 _tree->recurseTreeWithOperation(falseColorizeDistanceFromViewOperation,(void*)viewFrustum);
812 qDebug("setting in distance false color for %d nodes\n", _nodeCount);812 qDebug("setting in distance false color for %d nodes", _nodeCount);
813 setupNewVoxelsForDrawing();813 setupNewVoxelsForDrawing();
814}814}
815 815
@@ -921,7 +921,7 @@ void VoxelSystem::removeOutOfView() { · 105 unmodified lines
921 }921 }
922 bool showRemoveDebugDetails = false;922 bool showRemoveDebugDetails = false;
923 if (showRemoveDebugDetails) {923 if (showRemoveDebugDetails) {
924 qDebug("removeOutOfView() scanned=%ld removed=%ld inside=%ld intersect=%ld outside=%ld _removedVoxels.count()=%d \n", 924 qDebug("removeOutOfView() scanned=%ld removed=%ld inside=%ld intersect=%ld outside=%ld _removedVoxels.count()=%d ",
925 args.nodesScanned, args.nodesRemoved, args.nodesInside, 925 args.nodesScanned, args.nodesRemoved, args.nodesInside,
926 args.nodesIntersect, args.nodesOutside, _removedVoxels.count()926 args.nodesIntersect, args.nodesOutside, _removedVoxels.count()
927 );927 );
@@ -987,7 +987,7 @@ bool VoxelSystem::falseColorizeRandomEveryOtherOperation(VoxelNode* node, void* · 59 unmodified lines
987void VoxelSystem::falseColorizeRandomEveryOther() {987void VoxelSystem::falseColorizeRandomEveryOther() {
988 falseColorizeRandomEveryOtherArgs args;988 falseColorizeRandomEveryOtherArgs args;
989 _tree->recurseTreeWithOperation(falseColorizeRandomEveryOtherOperation,&args);989 _tree->recurseTreeWithOperation(falseColorizeRandomEveryOtherOperation,&args);
990 qDebug("randomized false color for every other node: total %ld, colorable %ld, colored %ld\n", 990 qDebug("randomized false color for every other node: total %ld, colorable %ld, colored %ld",
991 args.totalNodes, args.colorableNodes, args.coloredNodes);991 args.totalNodes, args.colorableNodes, args.coloredNodes);
992 setupNewVoxelsForDrawing();992 setupNewVoxelsForDrawing();
993}993}
@@ -1048,7 +1048,7 @@ bool VoxelSystem::collectStatsForTreesAndVBOsOperation(VoxelNode* node, void* ex · 54 unmodified lines
1048 unsigned long nodeIndex = node->getBufferIndex();1048 unsigned long nodeIndex = node->getBufferIndex();
1049 if (args->hasIndexFound[nodeIndex]) {1049 if (args->hasIndexFound[nodeIndex]) {
1050 args->duplicateVBOIndex++;1050 args->duplicateVBOIndex++;
1051 qDebug("duplicateVBO found... index=%ld, isDirty=%s, shouldRender=%s \n", nodeIndex, 1051 qDebug("duplicateVBO found... index=%ld, isDirty=%s, shouldRender=%s ", nodeIndex,
1052 debug::valueOf(node->isDirty()), debug::valueOf(node->getShouldRender()));1052 debug::valueOf(node->isDirty()), debug::valueOf(node->getShouldRender()));
1053 } else {1053 } else {
1054 args->hasIndexFound[nodeIndex] = true;1054 args->hasIndexFound[nodeIndex] = true;
@@ -1083,13 +1083,13 @@ void VoxelSystem::collectStatsForTreesAndVBOs() { · 28 unmodified lines
1083 args.expectedMax = _voxelsInWriteArrays;1083 args.expectedMax = _voxelsInWriteArrays;
1084 _tree->recurseTreeWithOperation(collectStatsForTreesAndVBOsOperation,&args);1084 _tree->recurseTreeWithOperation(collectStatsForTreesAndVBOsOperation,&args);
1085 1085
1086 qDebug("Local Voxel Tree Statistics:\n total nodes %ld \n leaves %ld \n dirty %ld \n colored %ld \n shouldRender %ld \n",1086 qDebug("Local Voxel Tree Statistics:\n total nodes %ld \n leaves %ld \n dirty %ld \n colored %ld \n shouldRender %ld ",
1087 args.totalNodes, args.leafNodes, args.dirtyNodes, args.coloredNodes, args.shouldRenderNodes);1087 args.totalNodes, args.leafNodes, args.dirtyNodes, args.coloredNodes, args.shouldRenderNodes);
1088 1088
1089 qDebug(" _voxelsDirty=%s \n _voxelsInWriteArrays=%ld \n minDirty=%ld \n maxDirty=%ld \n", debug::valueOf(_voxelsDirty),1089 qDebug(" _voxelsDirty=%s \n _voxelsInWriteArrays=%ld \n minDirty=%ld \n maxDirty=%ld ", debug::valueOf(_voxelsDirty),
1090 _voxelsInWriteArrays, minDirty, maxDirty);1090 _voxelsInWriteArrays, minDirty, maxDirty);
1091 1091
1092 qDebug(" inVBO %ld \n nodesInVBOOverExpectedMax %ld \n duplicateVBOIndex %ld \n nodesInVBONotShouldRender %ld \n", 1092 qDebug(" inVBO %ld \n nodesInVBOOverExpectedMax %ld \n duplicateVBOIndex %ld \n nodesInVBONotShouldRender %ld ",
1093 args.nodesInVBO, args.nodesInVBOOverExpectedMax, args.duplicateVBOIndex, args.nodesInVBONotShouldRender);1093 args.nodesInVBO, args.nodesInVBOOverExpectedMax, args.duplicateVBOIndex, args.nodesInVBONotShouldRender);
1094 1094
1095 glBufferIndex minInVBO = GLBUFFER_INDEX_UNKNOWN;1095 glBufferIndex minInVBO = GLBUFFER_INDEX_UNKNOWN;
@@ -1102,7 +1102,7 @@ void VoxelSystem::collectStatsForTreesAndVBOs() { · 6 unmodified lines
1102 }1102 }
1103 }1103 }
1104 1104
1105 qDebug(" minInVBO=%ld \n maxInVBO=%ld \n _voxelsInWriteArrays=%ld \n _voxelsInReadArrays=%ld \n", 1105 qDebug(" minInVBO=%ld \n maxInVBO=%ld \n _voxelsInWriteArrays=%ld \n _voxelsInReadArrays=%ld ",
1106 minInVBO, maxInVBO, _voxelsInWriteArrays, _voxelsInReadArrays);1106 minInVBO, maxInVBO, _voxelsInWriteArrays, _voxelsInReadArrays);
1107 1107
1108}1108}
@@ -1127,7 +1127,7 @@ void VoxelSystem::createVoxel(float x, float y, float z, float s, · 18 unmodified lines
1127 unsigned char red, unsigned char green, unsigned char blue, bool destructive) {1127 unsigned char red, unsigned char green, unsigned char blue, bool destructive) {
1128 pthread_mutex_lock(&_treeLock);1128 pthread_mutex_lock(&_treeLock);
1129 1129
1130 //qDebug("VoxelSystem::createVoxel(%f,%f,%f,%f)\n",x,y,z,s);1130 //qDebug("VoxelSystem::createVoxel(%f,%f,%f,%f)",x,y,z,s);
1131 _tree->createVoxel(x, y, z, s, red, green, blue, destructive); 1131 _tree->createVoxel(x, y, z, s, red, green, blue, destructive);
1132 setupNewVoxelsForDrawing(); 1132 setupNewVoxelsForDrawing();
1133 1133
@@ -1253,9 +1253,9 @@ bool VoxelSystem::falseColorizeOccludedOperation(VoxelNode* node, void* extraDat · 119 unmodified lines
1253 args->occludedVoxels++;1253 args->occludedVoxels++;
1254 } else if (result == STORED) {1254 } else if (result == STORED) {
1255 args->notOccludedVoxels++;1255 args->notOccludedVoxels++;
1256 //qDebug("***** falseColorizeOccludedOperation() NODE is STORED *****\n");1256 //qDebug("***** falseColorizeOccludedOperation() NODE is STORED *****");
1257 } else if (result == DOESNT_FIT) {1257 } else if (result == DOESNT_FIT) {
1258 //qDebug("***** falseColorizeOccludedOperation() NODE DOESNT_FIT???? *****\n");1258 //qDebug("***** falseColorizeOccludedOperation() NODE DOESNT_FIT???? *****");
1259 }1259 }
1260 }1260 }
1261 return true; // keep going!1261 return true; // keep going!
@@ -1288,7 +1288,7 @@ void VoxelSystem::falseColorizeOccluded() { · 26 unmodified lines
1288 1288
1289 _tree->recurseTreeWithOperationDistanceSorted(falseColorizeOccludedOperation, position, (void*)&args);1289 _tree->recurseTreeWithOperationDistanceSorted(falseColorizeOccludedOperation, position, (void*)&args);
1290 1290
1291 qDebug("falseColorizeOccluded()\n position=(%f,%f)\n total=%ld\n colored=%ld\n occluded=%ld\n notOccluded=%ld\n outOfView=%ld\n subtreeVoxelsSkipped=%ld\n stagedForDeletion=%ld\n nonLeaves=%ld\n nonLeavesOutOfView=%ld\n nonLeavesOccluded=%ld\n pointInside_calls=%ld\n occludes_calls=%ld\n intersects_calls=%ld\n", 1291 qDebug("falseColorizeOccluded()\n position=(%f,%f)\n total=%ld\n colored=%ld\n occluded=%ld\n notOccluded=%ld\n outOfView=%ld\n subtreeVoxelsSkipped=%ld\n stagedForDeletion=%ld\n nonLeaves=%ld\n nonLeavesOutOfView=%ld\n nonLeavesOccluded=%ld\n pointInside_calls=%ld\n occludes_calls=%ld\n intersects_calls=%ld",
1292 position.x, position.y,1292 position.x, position.y,
1293 args.totalVoxels, args.coloredVoxels, args.occludedVoxels, 1293 args.totalVoxels, args.coloredVoxels, args.occludedVoxels,
1294 args.notOccludedVoxels, args.outOfView, args.subtreeVoxelsSkipped, 1294 args.notOccludedVoxels, args.outOfView, args.subtreeVoxelsSkipped,
@@ -1374,9 +1374,9 @@ bool VoxelSystem::falseColorizeOccludedV2Operation(VoxelNode* node, void* extraD · 79 unmodified lines
1374 args->occludedVoxels++;1374 args->occludedVoxels++;
1375 } else if (result == V2_STORED) {1375 } else if (result == V2_STORED) {
1376 args->notOccludedVoxels++;1376 args->notOccludedVoxels++;
1377 //qDebug("***** falseColorizeOccludedOperation() NODE is STORED *****\n");1377 //qDebug("***** falseColorizeOccludedOperation() NODE is STORED *****");
1378 } else if (result == V2_DOESNT_FIT) {1378 } else if (result == V2_DOESNT_FIT) {
1379 //qDebug("***** falseColorizeOccludedOperation() NODE DOESNT_FIT???? *****\n");1379 //qDebug("***** falseColorizeOccludedOperation() NODE DOESNT_FIT???? *****");
1380 }1380 }
1381 delete voxelPolygon; // V2 maps don't store polygons, so we're always in charge of freeing1381 delete voxelPolygon; // V2 maps don't store polygons, so we're always in charge of freeing
1382 }1382 }
@@ -1413,7 +1413,7 @@ void VoxelSystem::falseColorizeOccludedV2() { · 30 unmodified lines
1413 1413
1414 _tree->recurseTreeWithOperationDistanceSorted(falseColorizeOccludedV2Operation, position, (void*)&args);1414 _tree->recurseTreeWithOperationDistanceSorted(falseColorizeOccludedV2Operation, position, (void*)&args);
1415 1415
1416 qDebug("falseColorizeOccludedV2()\n position=(%f,%f)\n total=%ld\n colored=%ld\n occluded=%ld\n notOccluded=%ld\n outOfView=%ld\n subtreeVoxelsSkipped=%ld\n stagedForDeletion=%ld\n nonLeaves=%ld\n nonLeavesOutOfView=%ld\n nonLeavesOccluded=%ld\n pointInside_calls=%ld\n occludes_calls=%ld\n intersects_calls=%ld\n", 1416 qDebug("falseColorizeOccludedV2()\n position=(%f,%f)\n total=%ld\n colored=%ld\n occluded=%ld\n notOccluded=%ld\n outOfView=%ld\n subtreeVoxelsSkipped=%ld\n stagedForDeletion=%ld\n nonLeaves=%ld\n nonLeavesOutOfView=%ld\n nonLeavesOccluded=%ld\n pointInside_calls=%ld\n occludes_calls=%ld\n intersects_calls=%ld",
1417 position.x, position.y,1417 position.x, position.y,
1418 args.totalVoxels, args.coloredVoxels, args.occludedVoxels, 1418 args.totalVoxels, args.coloredVoxels, args.occludedVoxels,
1419 args.notOccludedVoxels, args.outOfView, args.subtreeVoxelsSkipped, 1419 args.notOccludedVoxels, args.outOfView, args.subtreeVoxelsSkipped,