feat: particle aging

This commit is contained in:
2024-05-20 00:07:14 +02:00
parent 25d347cf35
commit 650a245f0a
5 changed files with 52 additions and 20 deletions

View File

@@ -42,10 +42,10 @@ void SpawnPointCallback::Execute(vtkObject *caller, unsigned long evId, void *ca
points->InsertNextPoint(worldPos[0], worldPos[1], 0);
this->particlesBeached->InsertNextValue(0);
this->particlesAge->InsertNextValue(0);
// FIXME: The below lines cause some weird interaction with our vtkTimer.
// see github issue https://github.com/MakeNEnjoy/interactive-track-and-trace/issues/28
this->particlesBeached->Modified();
this->points->Modified();
ren->GetRenderWindow()->Render();
}
@@ -80,3 +80,7 @@ void SpawnPointCallback::setUVGrid(const std::shared_ptr<UVGrid> &uvGrid) {
void SpawnPointCallback::setBeached(const vtkSmartPointer<vtkIntArray> &ints) {
this->particlesBeached = ints;
}
void SpawnPointCallback::setAge(const vtkSmartPointer<vtkIntArray> &ints) {
this->particlesAge = ints;
}