History

remove 16-bit node IDs and replace with UUIDs

Stephen Birarda committed 13 years ago

Commit fa146e31 parent 6805b0e45 files · +1291 −606Browse files

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

Unified · Split

interface/src/VoxelSystem.cpp+8−9
@@ -82,7 +82,7 @@ VoxelSystem::VoxelSystem(float treeScale, int maxVoxels) · 81 unmodified lines
8282 VoxelNode::addUpdateHook(this);
8383 _abandonedVBOSlots = 0;
8484 _falseColorizeBySource = false;
85− _dataSourceID = UNKNOWN_NODE_ID;
85+ _dataSourceID = 0;
8686 _voxelServerCount = 0;
8787
8888 _viewFrustum = Application::getInstance()->getViewFrustum();
@@ -1442,7 +1442,7 @@ void VoxelSystem::falseColorizeBySource() { · 1353 unmodified lines
14421442 NodeList* nodeList = NodeList::getInstance();
14431443 for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); node++) {
14441444 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {
1445− uint16_t nodeID = node->getNodeID();
1445+ uint16_t nodeID = 0; // hardcoded since removal of 16 bit node IDs
14461446 int groupColor = voxelServerCount % NUMBER_OF_COLOR_GROUPS;
14471447 args.colors[nodeID] = groupColors[groupColor];
14481448
@@ -2299,8 +2299,7 @@ void VoxelSystem::falseColorizeOccludedV2() { · 850 unmodified lines
22992299
23002300 void VoxelSystem::nodeAdded(Node* node) {
23012301 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {
2302− uint16_t nodeID = node->getNodeID();
2303− qDebug("VoxelSystem... voxel server %u added...\n", nodeID);
2302+ qDebug("VoxelSystem... voxel server %s added...\n", node->getUUID().toString().toLocal8Bit().constData());
23042303 _voxelServerCount++;
23052304 }
23062305 }
@@ -2322,14 +2321,14 @@ bool VoxelSystem::killSourceVoxelsOperation(VoxelNode* node, void* extraData) { · 15 unmodified lines
23222321 void VoxelSystem::nodeKilled(Node* node) {
23232322 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {
23242323 _voxelServerCount--;
2325− uint16_t nodeID = node->getNodeID();
2326− qDebug("VoxelSystem... voxel server %u removed...\n", nodeID);
2324+ qDebug("VoxelSystem... voxel server %s removed...\n", node->getUUID().toString().toLocal8Bit().constData());
23272325
23282326 if (_voxelServerCount > 0) {
23292327 // Kill any voxels from the local tree that match this nodeID
2330− pthread_mutex_lock(&_treeLock);
2331− _tree->recurseTreeWithOperation(killSourceVoxelsOperation, &nodeID);
2332− pthread_mutex_unlock(&_treeLock);
2328+ // commenting out for removal of 16 bit node IDs
2329+// pthread_mutex_lock(&_treeLock);
2330+// _tree->recurseTreeWithOperation(killSourceVoxelsOperation, 0);
2331+// pthread_mutex_unlock(&_treeLock);
23332332 _tree->setDirtyBit();
23342333 setupNewVoxelsForDrawing();
23352334 } else {

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