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
82 VoxelNode::addUpdateHook(this);82 VoxelNode::addUpdateHook(this);
83 _abandonedVBOSlots = 0;83 _abandonedVBOSlots = 0;
84 _falseColorizeBySource = false;84 _falseColorizeBySource = false;
85 _dataSourceID = UNKNOWN_NODE_ID;85 _dataSourceID = 0;
86 _voxelServerCount = 0;86 _voxelServerCount = 0;
87 87
88 _viewFrustum = Application::getInstance()->getViewFrustum();88 _viewFrustum = Application::getInstance()->getViewFrustum();
@@ -1442,7 +1442,7 @@ void VoxelSystem::falseColorizeBySource() { · 1353 unmodified lines
1442 NodeList* nodeList = NodeList::getInstance();1442 NodeList* nodeList = NodeList::getInstance();
1443 for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); node++) {1443 for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); node++) {
1444 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {1444 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
1446 int groupColor = voxelServerCount % NUMBER_OF_COLOR_GROUPS;1446 int groupColor = voxelServerCount % NUMBER_OF_COLOR_GROUPS;
1447 args.colors[nodeID] = groupColors[groupColor];1447 args.colors[nodeID] = groupColors[groupColor];
1448 1448
@@ -2299,8 +2299,7 @@ void VoxelSystem::falseColorizeOccludedV2() { · 850 unmodified lines
2299 2299
2300void VoxelSystem::nodeAdded(Node* node) {2300void VoxelSystem::nodeAdded(Node* node) {
2301 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {2301 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {
2302 uint16_t nodeID = node->getNodeID();2302 qDebug("VoxelSystem... voxel server %s added...\n", node->getUUID().toString().toLocal8Bit().constData());
2303 qDebug("VoxelSystem... voxel server %u added...\n", nodeID);
2304 _voxelServerCount++;2303 _voxelServerCount++;
2305 }2304 }
2306}2305}
@@ -2322,14 +2321,14 @@ bool VoxelSystem::killSourceVoxelsOperation(VoxelNode* node, void* extraData) { · 15 unmodified lines
2322void VoxelSystem::nodeKilled(Node* node) {2321void VoxelSystem::nodeKilled(Node* node) {
2323 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {2322 if (node->getType() == NODE_TYPE_VOXEL_SERVER) {
2324 _voxelServerCount--;2323 _voxelServerCount--;
2325 uint16_t nodeID = node->getNodeID();2324 qDebug("VoxelSystem... voxel server %s removed...\n", node->getUUID().toString().toLocal8Bit().constData());
2326 qDebug("VoxelSystem... voxel server %u removed...\n", nodeID);
2327 2325
2328 if (_voxelServerCount > 0) {2326 if (_voxelServerCount > 0) {
2329 // Kill any voxels from the local tree that match this nodeID2327 // Kill any voxels from the local tree that match this nodeID
2330 pthread_mutex_lock(&_treeLock);2328 // commenting out for removal of 16 bit node IDs
2331 _tree->recurseTreeWithOperation(killSourceVoxelsOperation, &nodeID);2329// pthread_mutex_lock(&_treeLock);
2332 pthread_mutex_unlock(&_treeLock);2330// _tree->recurseTreeWithOperation(killSourceVoxelsOperation, 0);
2331// pthread_mutex_unlock(&_treeLock);
2333 _tree->setDirtyBit();2332 _tree->setDirtyBit();
2334 setupNewVoxelsForDrawing();2333 setupNewVoxelsForDrawing();
2335 } else {2334 } 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