Early version of webfieldlinesworker now working, will only upload field lines once during runtime at this point, in need of some sort of alert mechanism

This commit is contained in:
Kollberg
2019-08-09 10:36:04 -04:00
parent 4839e738e2
commit 1a71342007
8 changed files with 1201 additions and 1082 deletions
@@ -103,26 +103,28 @@ namespace openspace{
// Hold your horses, we don't want to do anything while deltatime is too high
if (abs(deltaTime) < speedThreshhold){
// First it checks the time against the "bigger window" aka the long list of
// timesteps we know are available online. If it's outside that we're gonna need a new one
if (_webFieldlinesWindow.timeIsInTriggerTimesWebList(openspaceTime)) {
// Check if in window
if (_webFieldlinesWindow.timeIsInWindow(openspaceTime)) {
const double openspaceTimeDirection = global::timeManager.deltaTime();
// Check if in the edge of the window, so we can start downloading a new one
if (_webFieldlinesWindow.timeIsInWindowMargin(openspaceTime, openspaceTimeDirection)) {
if (_webFieldlinesWindow.timeIsInWindowMargin(openspaceTime, deltaTime)) {
// get new window
_webFieldlinesWindow.newWindow(openspaceTime);
}
else {
// If it's in the middle of the window, we can just sit back and relax
// And let the worker work
_webFieldlinesWindow.executeDownloadWorker();
}
}
else {
// get new window
_webFieldlinesWindow.newWindow(openspaceTime);
}
@@ -132,6 +134,11 @@ namespace openspace{
}
}
}
bool WebFieldlinesManager::checkIfWindowIsReadyToLoad()
{
return _webFieldlinesWindow.workerWindowIsReady();
}
// --------------------------- PRIVATE FUNCTIONS --------------------------- //