mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-29 15:29:26 -05:00
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:
@@ -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 --------------------------- //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user