#ifndef LCOLLAYER_H #define LCOLLAYER_H #include "Layer.h" #include "../advection/kernel/AdvectionKernel.h" #include "../commands/SpawnPointCallback.h" #include #include /** Implements the Layer class for the case of a Lagrangian visualization. * Specifically, this class models the Lagrangian particles in the simulation using the 'glyph' mark and 'transparency' channel to denote age. */ class LColLayer : public Layer { private: vtkSmartPointer points; vtkSmartPointer data; vtkSmartPointer particlesBeached; vtkSmartPointer particlesAge; std::unique_ptr advector; std::shared_ptr uvGrid; int dt = 3600; int beachedAtNumberOfTimes = 20; public: /** Constructor. */ LColLayer(std::shared_ptr uvGrid, std::unique_ptr advectionKernel); /** * This function spoofs a few points in the dataset. Mostly used for testing. */ void spoofPoints(); /** * updates the glyphs to reflect the given timestamp in the dataset. * @param t : the time at which to fetch the data. */ void updateData(int t) override; vtkSmartPointer createSpawnPointCallback(); void addObservers(vtkSmartPointer interactor) override; void removeObservers(vtkSmartPointer interactor) override; /** * Sets a custom DT value, needed for advect calls to the simulation logic. */ void setDt(int dt); }; #endif