History

merge upstream master into "radians" project

Andrew Meadows committed 12 years ago

Commit 793a7602 parents aa8c2fc 19c60ce63 files · +4447 −444Browse files

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

Unified · Split

interface/src/Application.cpp+18−22
@@ -60,7 +60,7 @@ · 59 unmodified lines
6060 #include <PerfStat.h>
6161 #include <ResourceCache.h>
6262 #include <UUID.h>
63−#include <VoxelSceneStats.h>
63+#include <OctreeSceneStats.h>
6464 #include <LocalVoxelsList.h>
6565
6666 #include "Application.h"
@@ -1138,7 +1138,6 @@ void Application::touchEndEvent(QTouchEvent* event) { · 1071 unmodified lines
11381138
11391139 }
11401140
1141−const bool USE_MOUSEWHEEL = false;
11421141 void Application::wheelEvent(QWheelEvent* event) {
11431142
11441143 _controllerScriptingInterface.emitWheelEvent(event); // send events to any registered scripts
@@ -1327,7 +1326,6 @@ glm::vec3 Application::getMouseVoxelWorldCoordinates(const VoxelDetail& mouseVox · 182 unmodified lines
13271326 (mouseVoxel.z + mouseVoxel.s / 2.f) * TREE_SCALE);
13281327 }
13291328
1330−const int MAXIMUM_EDIT_VOXEL_MESSAGE_SIZE = 1500;
13311329 struct SendVoxelsOperationArgs {
13321330 const unsigned char* newBaseOctCode;
13331331 };
@@ -1607,8 +1605,6 @@ void Application::shrinkMirrorView() { · 273 unmodified lines
16071605 }
16081606 }
16091607
1610−const float MAX_AVATAR_EDIT_VELOCITY = 1.0f;
1611−const float MAX_VOXEL_EDIT_DISTANCE = 50.0f;
16121608 const float HEAD_SPHERE_RADIUS = 0.07f;
16131609
16141610 bool Application::isLookingAtMyAvatar(Avatar* avatar) {
@@ -1825,9 +1821,9 @@ void Application::updateDialogs(float deltaTime) { · 210 unmodified lines
18251821 bandwidthDialog->update();
18261822 }
18271823
1828− VoxelStatsDialog* voxelStatsDialog = Menu::getInstance()->getVoxelStatsDialog();
1829− if (voxelStatsDialog) {
1830− voxelStatsDialog->update();
1824+ OctreeStatsDialog* octreeStatsDialog = Menu::getInstance()->getOctreeStatsDialog();
1825+ if (octreeStatsDialog) {
1826+ octreeStatsDialog->update();
18311827 }
18321828 }
18331829
@@ -2733,9 +2729,9 @@ void Application::displayStats() { · 899 unmodified lines
27332729 unsigned long totalNodes = 0;
27342730 unsigned long totalInternal = 0;
27352731 unsigned long totalLeaves = 0;
2736− for(NodeToVoxelSceneStatsIterator i = _octreeServerSceneStats.begin(); i != _octreeServerSceneStats.end(); i++) {
2732+ for(NodeToOctreeSceneStatsIterator i = _octreeServerSceneStats.begin(); i != _octreeServerSceneStats.end(); i++) {
27372733 //const QUuid& uuid = i->first;
2738− VoxelSceneStats& stats = i->second;
2734+ OctreeSceneStats& stats = i->second;
27392735 serverCount++;
27402736 if (_statsExpanded) {
27412737 if (serverCount > 1) {
@@ -3288,11 +3284,11 @@ void Application::nodeKilled(SharedNodePointer node) { · 546 unmodified lines
32883284 }
32893285
32903286 // also clean up scene stats for that server
3291− _voxelSceneStatsLock.lockForWrite();
3287+ _octreeSceneStatsLock.lockForWrite();
32923288 if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
32933289 _octreeServerSceneStats.erase(nodeUUID);
32943290 }
3295− _voxelSceneStatsLock.unlock();
3291+ _octreeSceneStatsLock.unlock();
32963292
32973293 } else if (node->getType() == NodeType::ParticleServer) {
32983294 QUuid nodeUUID = node->getUUID();
@@ -3319,11 +3315,11 @@ void Application::nodeKilled(SharedNodePointer node) { · 20 unmodified lines
33193315 }
33203316
33213317 // also clean up scene stats for that server
3322− _voxelSceneStatsLock.lockForWrite();
3318+ _octreeSceneStatsLock.lockForWrite();
33233319 if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
33243320 _octreeServerSceneStats.erase(nodeUUID);
33253321 }
3326− _voxelSceneStatsLock.unlock();
3322+ _octreeSceneStatsLock.unlock();
33273323
33283324 } else if (node->getType() == NodeType::AvatarMixer) {
33293325 // our avatar mixer has gone away - clear the hash of avatars
@@ -3338,12 +3334,12 @@ void Application::trackIncomingVoxelPacket(const QByteArray& packet, const Share · 8 unmodified lines
33383334 QUuid nodeUUID = sendingNode->getUUID();
33393335
33403336 // now that we know the node ID, let's add these stats to the stats for that node...
3341− _voxelSceneStatsLock.lockForWrite();
3337+ _octreeSceneStatsLock.lockForWrite();
33423338 if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
3343− VoxelSceneStats& stats = _octreeServerSceneStats[nodeUUID];
3339+ OctreeSceneStats& stats = _octreeServerSceneStats[nodeUUID];
33443340 stats.trackIncomingOctreePacket(packet, wasStatsPacket, sendingNode->getClockSkewUsec());
33453341 }
3346− _voxelSceneStatsLock.unlock();
3342+ _octreeSceneStatsLock.unlock();
33473343 }
33483344 }
33493345
@@ -3353,7 +3349,7 @@ int Application::parseOctreeStats(const QByteArray& packet, const SharedNodePoin · 3 unmodified lines
33533349
33543350 // parse the incoming stats datas stick it in a temporary object for now, while we
33553351 // determine which server it belongs to
3356− VoxelSceneStats temp;
3352+ OctreeSceneStats temp;
33573353 int statsMessageLength = temp.unpackFromMessage(reinterpret_cast<const unsigned char*>(packet.data()), packet.size());
33583354
33593355 // quick fix for crash... why would voxelServer be NULL?
@@ -3361,14 +3357,14 @@ int Application::parseOctreeStats(const QByteArray& packet, const SharedNodePoin · 1 unmodified line
33613357 QUuid nodeUUID = sendingNode->getUUID();
33623358
33633359 // now that we know the node ID, let's add these stats to the stats for that node...
3364− _voxelSceneStatsLock.lockForWrite();
3360+ _octreeSceneStatsLock.lockForWrite();
33653361 if (_octreeServerSceneStats.find(nodeUUID) != _octreeServerSceneStats.end()) {
33663362 _octreeServerSceneStats[nodeUUID].unpackFromMessage(reinterpret_cast<const unsigned char*>(packet.data()),
33673363 packet.size());
33683364 } else {
33693365 _octreeServerSceneStats[nodeUUID] = temp;
33703366 }
3371− _voxelSceneStatsLock.unlock();
3367+ _octreeSceneStatsLock.unlock();
33723368
33733369 VoxelPositionSize rootDetails;
33743370 voxelDetailsForCode(temp.getJurisdictionRoot(), rootDetails);
@@ -3397,8 +3393,8 @@ int Application::parseOctreeStats(const QByteArray& packet, const SharedNodePoin · 22 unmodified lines
33973393 }
33983394 // store jurisdiction details for later use
33993395 // This is bit of fiddling is because JurisdictionMap assumes it is the owner of the values used to construct it
3400− // but VoxelSceneStats thinks it's just returning a reference to it's contents. So we need to make a copy of the
3401− // details from the VoxelSceneStats to construct the JurisdictionMap
3396+ // but OctreeSceneStats thinks it's just returning a reference to it's contents. So we need to make a copy of the
3397+ // details from the OctreeSceneStats to construct the JurisdictionMap
34023398 JurisdictionMap jurisdictionMap;
34033399 jurisdictionMap.copyContents(temp.getJurisdictionRoot(), temp.getJurisdictionEndNodes());
34043400 (*jurisdiction)[nodeUUID] = jurisdictionMap;

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