From 582ac127f763f512c45f35e17b768487e3b51796 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 4 Nov 2023 17:07:58 +0000 Subject: Rename TerrainMesh to GeoData to drop inplace --- application/main.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'application/main.cpp') diff --git a/application/main.cpp b/application/main.cpp index 532c23d..9e4ca33 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -34,11 +34,11 @@ static const int DISPLAY_HEIGHT = 1024; class MainApplication : public GameState, public ApplicationBase { public: using Windows = Collection; + int run() { - geoData = std::make_shared(GeoData::Limits {{-120, -120}, {120, 120}}, 10.F); - geoData->generateRandom(); + geoData = std::make_shared(GeoData::loadFromAsciiGrid("test/fixtures/height/SD19.asc")); Windows windows; windows.create(DISPLAY_WIDTH, DISPLAY_HEIGHT); @@ -78,12 +78,12 @@ public: train->orders.create(&train->orders, l3->ends[1], l3->length, rl->findNodeAt({-1100, -450, 15})); train->currentActivity = train->orders.current()->createActivity(); - auto foliage = std::dynamic_pointer_cast(assets.at("Tree-01-1")); - for (float x = 900; x < 1100; x += 3) { - for (float y = 900; y < 1100; y += 3) { - world.create(foliage, Location {geoData->positionAt({-x, -y})}); - } - } + // auto foliage = std::dynamic_pointer_cast(assets.at("Tree-01-1")); + // for (float x = 900; x < 1100; x += 3) { + // for (float y = 900; y < 1100; y += 3) { + // world.create(foliage, Location {terrainMesh->positionAt(glm::vec2 {-x, -y})}); + //} + //} } auto t_start = std::chrono::high_resolution_clock::now(); -- cgit v1.2.3