mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 05:17:24 +02:00
update MetavoxelSystem.cpp to new tbb node iteration
This commit is contained in:
parent
455cbac8a5
commit
aa7e995672
1 changed files with 4 additions and 13 deletions
|
@ -163,12 +163,7 @@ void MetavoxelSystem::render() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetavoxelSystem::refreshVoxelData() {
|
void MetavoxelSystem::refreshVoxelData() {
|
||||||
NodeHashSnapshot snapshotHash = NodeList::getInstance()->getNodeHash().snapshot_table();
|
NodeList::getInstance()->eachNode([](const SharedNodePointer& node){
|
||||||
|
|
||||||
for (auto it = snapshotHash.begin(); it != snapshotHash.end(); it++) {
|
|
||||||
|
|
||||||
SharedNodePointer node = it->second;
|
|
||||||
|
|
||||||
if (node->getType() == NodeType::MetavoxelServer) {
|
if (node->getType() == NodeType::MetavoxelServer) {
|
||||||
QMutexLocker locker(&node->getMutex());
|
QMutexLocker locker(&node->getMutex());
|
||||||
MetavoxelSystemClient* client = static_cast<MetavoxelSystemClient*>(node->getLinkedData());
|
MetavoxelSystemClient* client = static_cast<MetavoxelSystemClient*>(node->getLinkedData());
|
||||||
|
@ -176,7 +171,7 @@ void MetavoxelSystem::refreshVoxelData() {
|
||||||
QMetaObject::invokeMethod(client, "refreshVoxelData");
|
QMetaObject::invokeMethod(client, "refreshVoxelData");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
class RayHeightfieldIntersectionVisitor : public RayIntersectionVisitor {
|
class RayHeightfieldIntersectionVisitor : public RayIntersectionVisitor {
|
||||||
|
@ -690,11 +685,7 @@ MetavoxelClient* MetavoxelSystem::createClient(const SharedNodePointer& node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetavoxelSystem::guideToAugmented(MetavoxelVisitor& visitor, bool render) {
|
void MetavoxelSystem::guideToAugmented(MetavoxelVisitor& visitor, bool render) {
|
||||||
NodeHashSnapshot snapshotHash = NodeList::getInstance()->getNodeHash().snapshot_table();
|
NodeList::getInstance()->eachNode([&visitor, &render](const SharedNodePointer& node) {
|
||||||
|
|
||||||
for (auto it = snapshotHash.begin(); it != snapshotHash.end(); it++) {
|
|
||||||
SharedNodePointer node = it->second;
|
|
||||||
|
|
||||||
if (node->getType() == NodeType::MetavoxelServer) {
|
if (node->getType() == NodeType::MetavoxelServer) {
|
||||||
QMutexLocker locker(&node->getMutex());
|
QMutexLocker locker(&node->getMutex());
|
||||||
MetavoxelSystemClient* client = static_cast<MetavoxelSystemClient*>(node->getLinkedData());
|
MetavoxelSystemClient* client = static_cast<MetavoxelSystemClient*>(node->getLinkedData());
|
||||||
|
@ -708,7 +699,7 @@ void MetavoxelSystem::guideToAugmented(MetavoxelVisitor& visitor, bool render) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Throttle::Throttle() :
|
Throttle::Throttle() :
|
||||||
|
|
Loading…
Reference in a new issue