feat: wrapping of simulation time
This commit is contained in:
parent
2405154397
commit
5bd88b7147
|
|
@ -38,7 +38,6 @@ void SpawnPointCallback::Execute(vtkObject *caller, unsigned long evId, void *ca
|
||||||
ren->SetDisplayPoint(displayPos);
|
ren->SetDisplayPoint(displayPos);
|
||||||
ren->DisplayToWorld();
|
ren->DisplayToWorld();
|
||||||
ren->GetWorldPoint(worldPos);
|
ren->GetWorldPoint(worldPos);
|
||||||
cout << "clicked on " << worldPos[1] << ", " << worldPos[0] << endl;
|
|
||||||
inverseCartographicProjection->TransformPoint(worldPos, worldPos);
|
inverseCartographicProjection->TransformPoint(worldPos, worldPos);
|
||||||
|
|
||||||
points->InsertNextPoint(worldPos[0], worldPos[1], 0);
|
points->InsertNextPoint(worldPos[0], worldPos[1], 0);
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@ void TimerCallbackCommand::Execute(vtkObject* caller, unsigned long eventId, voi
|
||||||
this->time += this->dt;
|
this->time += this->dt;
|
||||||
|
|
||||||
if (this->time >= this->maxTime) {
|
if (this->time >= this->maxTime) {
|
||||||
return;
|
this->time = 0;
|
||||||
// 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->program->updateData(this->time);
|
this->program->updateData(this->time);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue