Showing the changes to interface/src/VoxelSystem.cpp (1 of 13 files). Show all
Unified · Split
| @@ -17,6 +17,8 @@ · 16 unmodified lines | ||
| 17 | 17 | #include <PacketHeaders.h> |
| 18 | 18 | #include <OctalCode.h> |
| 19 | 19 | #include <pthread.h> |
| 20 | +#include "Log.h" | |
| 21 | + | |
| 20 | 22 | #include "VoxelSystem.h" |
| 21 | 23 | |
| 22 | 24 | const int MAX_VOXELS_PER_SYSTEM = 250000; |
| @@ -136,15 +138,15 @@ void VoxelSystem::parseData(unsigned char* sourceBuffer, int numBytes) { · 113 unmodified lines | ||
| 136 | 138 | int commandLength = strlen(command); // commands are null terminated strings |
| 137 | 139 | int totalLength = 1+commandLength+1; |
| 138 | 140 | |
| 139 | − printf("got Z message len(%d)= %s\n", numBytes, command); | |
| 141 | + printLog("got Z message len(%d)= %s\n", numBytes, command); | |
| 140 | 142 | |
| 141 | 143 | while (totalLength <= numBytes) { |
| 142 | 144 | if (0==strcmp(command,(char*)"erase all")) { |
| 143 | − printf("got Z message == erase all\n"); | |
| 145 | + printLog("got Z message == erase all\n"); | |
| 144 | 146 | tree->eraseAllVoxels(); |
| 145 | 147 | } |
| 146 | 148 | if (0==strcmp(command,(char*)"add scene")) { |
| 147 | − printf("got Z message == add scene - NOT SUPPORTED ON INTERFACE\n"); | |
| 149 | + printLog("got Z message == add scene - NOT SUPPORTED ON INTERFACE\n"); | |
| 148 | 150 | } |
| 149 | 151 | totalLength += commandLength+1; |
| 150 | 152 | } |
| @@ -194,14 +196,14 @@ int VoxelSystem::treeToArrays(VoxelNode *currentNode, float nodePosition[3]) { · 43 unmodified lines | ||
| 194 | 196 | float viewerZ = swapXandZ ? viewerPosition[0] : viewerPosition[2]; |
| 195 | 197 | |
| 196 | 198 | // debugging code. |
| 197 | − //printf("treeToArrays() halfUnitForVoxel=%f\n",halfUnitForVoxel); | |
| 198 | − //printf("treeToArrays() viewerPosition {x,y,z or [0],[1],[2]} ={%f,%f,%f}\n", | |
| 199 | − // viewerPosition[0],viewerPosition[1],viewerPosition[2]); | |
| 200 | − //printf("treeToArrays() nodePosition {x,y,z or [0],[1],[2]} = {%f,%f,%f}\n", | |
| 201 | − // nodePosition[0],nodePosition[1],nodePosition[2]); | |
| 199 | + //printLog("treeToArrays() halfUnitForVoxel=%f\n",halfUnitForVoxel); | |
| 200 | + //printLog("treeToArrays() viewerPosition {x,y,z or [0],[1],[2]} ={%f,%f,%f}\n", | |
| 201 | + // viewerPosition[0],viewerPosition[1],viewerPosition[2]); | |
| 202 | + //printLog("treeToArrays() nodePosition {x,y,z or [0],[1],[2]} = {%f,%f,%f}\n", | |
| 203 | + // nodePosition[0],nodePosition[1],nodePosition[2]); | |
| 202 | 204 | //float* vertices = firstVertexForCode(currentNode->octalCode); |
| 203 | − //printf("treeToArrays() firstVerticesForCode(currentNode->octalCode)={x,y,z or [0],[1],[2]} = {%f,%f,%f}\n", | |
| 204 | − // vertices[0],vertices[1],vertices[2]); | |
| 205 | + //printLog("treeToArrays() firstVerticesForCode(currentNode->octalCode)={x,y,z or [0],[1],[2]} = {%f,%f,%f}\n", | |
| 206 | + // vertices[0],vertices[1],vertices[2]); | |
| 205 | 207 | //delete []vertices; |
| 206 | 208 | |
| 207 | 209 | float distanceToVoxelCenter = sqrtf(powf(viewerX - nodePosition[0] - halfUnitForVoxel, 2) + |
| @@ -209,7 +211,7 @@ int VoxelSystem::treeToArrays(VoxelNode *currentNode, float nodePosition[3]) { · 1 unmodified line | ||
| 209 | 211 | powf(viewerZ - nodePosition[2] - halfUnitForVoxel, 2)); |
| 210 | 212 | |
| 211 | 213 | int boundaryPosition = boundaryDistanceForRenderLevel(*currentNode->octalCode + 1); |
| 212 | − //printf("treeToArrays() distanceToVoxelCenter=%f boundaryPosition=%d\n",distanceToVoxelCenter,boundaryPosition); | |
| 214 | + //printLog("treeToArrays() distanceToVoxelCenter=%f boundaryPosition=%d\n",distanceToVoxelCenter,boundaryPosition); | |
| 213 | 215 | |
| 214 | 216 | bool alwaysDraw = false; // XXXBHG - temporary debug code. Flip this to true to disable LOD blurring |
| 215 | 217 | |