feat: made uvgrid take a path as argument

This commit is contained in:
robin
2024-05-09 08:34:45 +02:00
parent 61b307ee49
commit c50a27948f
5 changed files with 41 additions and 36 deletions

View File

@@ -23,16 +23,17 @@ using namespace std;
int main() {
cout << "Reading data..." << endl;
shared_ptr<UVGrid> uvGrid = make_shared<UVGrid>();
string dataPath = "../../../../data";
shared_ptr<UVGrid> uvGrid = make_shared<UVGrid>(dataPath);
auto kernelRK4 = make_unique<RK4AdvectionKernel>(uvGrid);
auto kernelRK4BoundaryChecked = make_unique<SnapBoundaryConditionKernel>(std::move(kernelRK4), uvGrid);
cout << "Starting vtk..." << endl;
auto l = new LGlyphLayer(uvGrid, std::move(kernelRK4BoundaryChecked));
l->spoofPoints();
// l->spoofPoints();
unique_ptr<Program> program = make_unique<Program>(DT);
program->addLayer(new BackgroundImage("../../../../data/map_661-661.png"));
program->addLayer(new BackgroundImage(dataPath + "/map_661-661.png"));
program->addLayer(new EGlyphLayer(uvGrid));
program->addLayer(l);