feat: beaching of particles

This commit is contained in:
djaidjai committed 2024-05-07 15:46:54 +02:00
1 parent e674dde67b
commit 0bde78ee7d
4 files changed
+92 -22

No files matched your search

@@ -42,9 +42,11 @@ void SpawnPointCallback::Execute(vtkObject *caller, unsigned long evId, void *ca
inverseCartographicProjection->MultiplyPoint(worldPos, worldPos);
points->InsertNextPoint(worldPos[0], worldPos[1], 0);
this->particlesBeached->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();
}
@@ -76,3 +78,7 @@ void SpawnPointCallback::setUVGrid(const std::shared_ptr<UVGrid> &uvGrid) {
inverseCartographicProjection = getCartographicTransformMatrix(uvGrid);
inverseCartographicProjection->Invert();
}
void SpawnPointCallback::setBeached(const vtkSmartPointer<vtkIntArray> &ints) {
this->particlesBeached = ints;
}
@@ -23,12 +23,15 @@ public:
void setRen(const vtkSmartPointer<vtkRenderer> &ren);
void setBeached(const vtkSmartPointer<vtkIntArray> &parts);
void setUVGrid(const std::shared_ptr<UVGrid> &uvGrid);
private:
vtkSmartPointer<vtkPolyData> data;
vtkSmartPointer<vtkPoints> points;
vtkSmartPointer<vtkRenderer> ren;
vtkSmartPointer<vtkIntArray> particlesBeached;
std::shared_ptr<UVGrid> uvGrid;
vtkSmartPointer<vtkMatrix4x4> 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.