feat: particle aging

This commit is contained in:
djaidjai committed 2024-05-20 00:07:14 +02:00
1 parent 25d347cf35
commit 650a245f0a
5 files changed
+52 -20

No files matched your search

@@ -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;
}
@@ -25,6 +25,8 @@ public:
void setBeached(const vtkSmartPointer<vtkIntArray> &parts);
void setAge(const vtkSmartPointer<vtkIntArray> &parts);
void setUVGrid(const std::shared_ptr<UVGrid> &uvGrid);
private:
@@ -32,6 +34,7 @@ private:
vtkSmartPointer<vtkPoints> points;
vtkSmartPointer<vtkRenderer> ren;
vtkSmartPointer<vtkIntArray> particlesBeached;
vtkSmartPointer<vtkIntArray> particlesAge;
std::shared_ptr<UVGrid> uvGrid;
vtkSmartPointer<vtkAbstractTransform> inverseCartographicProjection;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.