upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/vk_sandbox.cpp
diff options
context:
space:
mode:
authorTravis Curtsinger <93950613+tcurtsinger@users.noreply.github.com>2026-11-23 16:17:36 -0600
committerTravis Curtsinger <93950613+tcurtsinger@users.noreply.github.com>2026-11-23 16:17:36 -0600
commit0c5c0b40ad2e4106adb1d7696b40b2ae09b7cee6 (patch)
tree636df28bca2271299b30aa231bab12880b4a4862 /runtime/test/vk_sandbox.cpp
parent72e90d8ce515a22ee84ed99f669ae5d145b7a1b3 (diff)
Keep the ground builder callable for collision regressions
Diffstat (limited to 'runtime/test/vk_sandbox.cpp')
-rw-r--r--runtime/test/vk_sandbox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/test/vk_sandbox.cpp b/runtime/test/vk_sandbox.cpp
index 554e6f647..9ceddff8e 100644
--- a/runtime/test/vk_sandbox.cpp
+++ b/runtime/test/vk_sandbox.cpp
@@ -145,7 +145,7 @@ struct Ground {
145 float cell = 4, x0 = 0, y0 = 0; 145 float cell = 4, x0 = 0, y0 = 0;
146 int nx = 0, ny = 0; 146 int nx = 0, ny = 0;
147 std::vector<std::vector<float>> tris; // per cell: 9 floats a triangle 147 std::vector<std::vector<float>> tris; // per cell: 9 floats a triangle
148 explicit Ground(const Scene& s) { 148 void build(const Scene& s) {
149 float lo[2] = {1e30f, 1e30f}, hi[2] = {-1e30f, -1e30f}; 149 float lo[2] = {1e30f, 1e30f}, hi[2] = {-1e30f, -1e30f};
150 std::vector<float> all; 150 std::vector<float> all;
151 for (const Draw& d : s.draws) { 151 for (const Draw& d : s.draws) {
@@ -664,7 +664,7 @@ int main(int argc, char** argv) {
664 cam.pos[2] += (float(key('E')) - float(key('Q'))) * v; 664 cam.pos[2] += (float(key('E')) - float(key('Q'))) * v;
665 } else { 665 } else {
666 if (!ground) { 666 if (!ground) {
667 ground.emplace(scene); 667 ground.emplace().build(scene);
668 last = std::chrono::steady_clock::now(); // Exclude grid construction from the next movement step. 668 last = std::chrono::steady_clock::now(); // Exclude grid construction from the next movement step.
669 } 669 }
670 const float h = std::hypot(f[0], f[1]) > 1e-4f ? std::hypot(f[0], f[1]) : 1; 670 const float h = std::hypot(f[0], f[1]) > 1e-4f ? std::hypot(f[0], f[1]) : 1;