prepared new files

This commit is contained in:
2024-05-23 10:20:49 +02:00
parent 7eae1a76f9
commit fda34360ba
2 changed files with 230 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
#ifndef LCOLLAYER_H
#define LCOLLAYER_H
#include "Layer.h"
#include "../advection/kernel/AdvectionKernel.h"
#include "../commands/SpawnPointCallback.h"
#include <vtkPolyData.h>
#include <vtkInteractorStyle.h>
/** 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<vtkPoints> points;
vtkSmartPointer<vtkPolyData> data;
vtkSmartPointer<vtkIntArray> particlesBeached;
vtkSmartPointer<vtkIntArray> particlesAge;
std::unique_ptr<AdvectionKernel> advector;
std::shared_ptr<UVGrid> uvGrid;
int dt = 3600;
int beachedAtNumberOfTimes = 20;
public:
/** Constructor.
*/
LColLayer(std::shared_ptr<UVGrid> uvGrid, std::unique_ptr<AdvectionKernel> 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<SpawnPointCallback> createSpawnPointCallback();
void addObservers(vtkSmartPointer<vtkRenderWindowInteractor> interactor) override;
/**
* Sets a custom DT value, needed for advect calls to the simulation logic.
*/
void setDt(int dt);
};
#endif