History

some hacking on full scene debuggin

ZappoMan committed 12 years ago

Commit 4d0b7621 parent 21486644 files · +37 −4Browse files

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

Unified · Split

interface/src/Application.cpp+16−2
@@ -141,6 +141,9 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 140 unmodified lines
141 _justStarted(true),141 _justStarted(true),
142 _voxelImporter(NULL),142 _voxelImporter(NULL),
143 _wantToKillLocalVoxels(false),143 _wantToKillLocalVoxels(false),
144 _viewFrustum(),
145 _lastQueriedViewFrustum(),
146 _lastQueriedTime(usecTimestampNow()),
144 _audioScope(256, 200, true),147 _audioScope(256, 200, true),
145 _myAvatar(),148 _myAvatar(),
146 _mirrorViewRect(QRect(MIRROR_VIEW_LEFT_PADDING, MIRROR_VIEW_TOP_PADDING, MIRROR_VIEW_WIDTH, MIRROR_VIEW_HEIGHT)),149 _mirrorViewRect(QRect(MIRROR_VIEW_LEFT_PADDING, MIRROR_VIEW_TOP_PADDING, MIRROR_VIEW_WIDTH, MIRROR_VIEW_HEIGHT)),
@@ -1917,8 +1920,19 @@ void Application::updateMyAvatar(float deltaTime) { · 1770 unmodified lines
1917 loadViewFrustum(_myCamera, _viewFrustum);1920 loadViewFrustum(_myCamera, _viewFrustum);
1918 1921
1919 // Update my voxel servers with my current voxel query...1922 // Update my voxel servers with my current voxel query...
1920 queryOctree(NodeType::VoxelServer, PacketTypeVoxelQuery, _voxelServerJurisdictions);1923 quint64 now = usecTimestampNow();
1921 queryOctree(NodeType::ParticleServer, PacketTypeParticleQuery, _particleServerJurisdictions);1924 const quint64 TOO_LONG_SINCE_LAST_QUERY = 1 * USECS_PER_SECOND;
1925
1926 // if we haven't waited long enough and the frustum is similar enough, then surpress this query...
1927 if ((now - _lastQueriedTime) > TOO_LONG_SINCE_LAST_QUERY || !_lastQueriedViewFrustum.isVerySimilar(_viewFrustum)) {
1928 _lastQueriedTime = now;
1929 queryOctree(NodeType::VoxelServer, PacketTypeVoxelQuery, _voxelServerJurisdictions);
1930 queryOctree(NodeType::ParticleServer, PacketTypeParticleQuery, _particleServerJurisdictions);
1931 _lastQueriedViewFrustum = _viewFrustum;
1932 //qDebug() << ">>>>>>>>>> SENDING query...";
1933 } else {
1934 //qDebug() << "suppress query...";
1935 }
1922}1936}
1923 1937
1924void Application::queryOctree(NodeType_t serverType, PacketType packetType, NodeToJurisdictionMap& jurisdictions) {1938void Application::queryOctree(NodeType_t serverType, PacketType packetType, NodeToJurisdictionMap& jurisdictions) {

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