feat: wrapping of simulation time

This commit is contained in:
Djairo Hougee 2024-05-14 16:13:46 +02:00
parent 2405154397
commit 5bd88b7147
2 changed files with 1 additions and 3 deletions

View File

@ -38,7 +38,6 @@ void SpawnPointCallback::Execute(vtkObject *caller, unsigned long evId, void *ca
ren->SetDisplayPoint(displayPos);
ren->DisplayToWorld();
ren->GetWorldPoint(worldPos);
cout << "clicked on " << worldPos[1] << ", " << worldPos[0] << endl;
inverseCartographicProjection->TransformPoint(worldPos, worldPos);
points->InsertNextPoint(worldPos[0], worldPos[1], 0);

View File

@ -21,8 +21,7 @@ void TimerCallbackCommand::Execute(vtkObject* caller, unsigned long eventId, voi
this->time += this->dt;
if (this->time >= this->maxTime) {
return;
// TODO: how do we deal with reaching the end of the simulated dataset? Do we just stop simulating, loop back around? What about the location of the particles in this case? Just some ideas to consider, but we should iron this out pretty soon.
this->time = 0;
}
this->program->updateData(this->time);