diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-15 01:29:24 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-15 01:29:24 +0000 |
commit | 685b33980cc7a346574b24732464f0cbe3115a1f (patch) | |
tree | 048db87ad645f54285f0880d20b8acf81f65fea9 /test/test-assetFactory.cpp | |
parent | Send position and rotation matrix to GPU separately (diff) | |
download | ilt-685b33980cc7a346574b24732464f0cbe3115a1f.tar.bz2 ilt-685b33980cc7a346574b24732464f0cbe3115a1f.tar.xz ilt-685b33980cc7a346574b24732464f0cbe3115a1f.zip |
Switch to millimeters for spatial units
Mostly a case of changing far too many magic numbers, something else to
fix I guess. I probably missed something. Also there's some hackery when
loading 3D models, which are still assumed to be in metres.
Diffstat (limited to 'test/test-assetFactory.cpp')
-rw-r--r-- | test/test-assetFactory.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/test-assetFactory.cpp b/test/test-assetFactory.cpp index 9af08cb..c8183df 100644 --- a/test/test-assetFactory.cpp +++ b/test/test-assetFactory.cpp @@ -64,7 +64,7 @@ public: } void - render(float dist = 10.f) + render(float dist) { sceneRenderer.camera.setView({-dist, dist * 1.2f, dist * 1.2f}, south + east + down); sceneRenderer.render(*this); @@ -104,7 +104,7 @@ BOOST_AUTO_TEST_CASE(brush47xml, *boost::unit_test::timeout(5)) auto railVehicle = std::make_shared<RailVehicle>(brush47rvc); objects.objects.push_back(brush47rvc); - render(); + render(10000); } BOOST_AUTO_TEST_CASE(foliage, *boost::unit_test::timeout(5)) @@ -116,13 +116,13 @@ BOOST_AUTO_TEST_CASE(foliage, *boost::unit_test::timeout(5)) auto tree_01_1_f = std::dynamic_pointer_cast<Foliage>(tree_01_1); BOOST_REQUIRE(tree_01_1_f); - auto plant1 = std::make_shared<Plant>(tree_01_1_f, Location {{-2, 2, 0}, {0, 0, 0}}); - auto plant2 = std::make_shared<Plant>(tree_01_1_f, Location {{3, -4, 0}, {0, 1, 0}}); - auto plant3 = std::make_shared<Plant>(tree_01_1_f, Location {{-2, -4, 0}, {0, 2, 0}}); - auto plant4 = std::make_shared<Plant>(tree_01_1_f, Location {{3, 2, 0}, {0, 3, 0}}); + auto plant1 = std::make_shared<Plant>(tree_01_1_f, Location {{-2000, 2000, 0}, {0, 0, 0}}); + auto plant2 = std::make_shared<Plant>(tree_01_1_f, Location {{3000, -4000, 0}, {0, 1, 0}}); + auto plant3 = std::make_shared<Plant>(tree_01_1_f, Location {{-2000, -4000, 0}, {0, 2, 0}}); + auto plant4 = std::make_shared<Plant>(tree_01_1_f, Location {{3000, 2000, 0}, {0, 3, 0}}); objects.objects.push_back(tree_01_1_f); - render(5); + render(6000); } BOOST_AUTO_TEST_SUITE_END(); |