History

Added agentTypes to AgentList::broadcastToAgents() Make voxel server rebroadcast "remove voxel" messages to all it's connected heads Cleaned up processing of Remove voxel messages to live in VoxelTree

ZappoMan committed 13 years ago

Commit 9220ba31 parent 407fa957 files · +56 −30Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+12−3
@@ -84,11 +84,20 @@ void VoxelSystem::createSphere(float r,float xc, float yc, float zc, float s, bo · 83 unmodified lines
84 84
85 85
86void VoxelSystem::parseData(void *data, int size) {86void VoxelSystem::parseData(void *data, int size) {
87 // output the bits received from the voxel server87
88 unsigned char command = *(unsigned char*)data;
88 unsigned char *voxelData = (unsigned char *) data + 1;89 unsigned char *voxelData = (unsigned char *) data + 1;
89 90
90 // ask the VoxelTree to read the bitstream into the tree91 switch(command) {
91 tree->readBitstreamToTree(voxelData, size - 1);92 case 'V':
93 // ask the VoxelTree to read the bitstream into the tree
94 tree->readBitstreamToTree(voxelData, size - 1);
95 break;
96 case 'R':
97 // ask the tree to read the "remove" bitstream
98 tree->processRemoveVoxelBitstream((unsigned char*)data,size);
99 break;
100 }
92 101
93 setupNewVoxelsForDrawing();102 setupNewVoxelsForDrawing();
94}103}