Add deterministic procedural mesh toolkit (procgen) with primitives, spline extrusion, lathe, segments, SDF/volume & shell demo - #17
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
CpuMeshData/renderer upload path while remaining deterministic and testable.Description
engine/procgenexposingprocgen.hpp/procgen.cppwithProcVertex, generation entry points (primitives,extrude_profile_along_path,lathe_profile,assemble_segments), scalar field and SDF composition helpers, marching-tetrahedra extraction, and mesh post-process/validation utilities.make_quad,make_plane,make_box,make_uv_sphere,make_cylinder,make_cone,make_torus,make_capsule), spline utilities (Catmull‑Rom sampling + frame derivation), extrusion and lathe generation, deterministic segment assembly usingcore::Seed/core::Randomsplits,ScalarFieldstorage, and SDF primitives/composition functions.CMakeLists.txt) and addedtests/procgen/procgen_tests.cppexercising primitive/spline/lathe/segment/SDF/extraction determinism and validation, plus updated the runtime shell (engine/shell/main.cpp) to upload and render representative generated meshes via existingcreate_mesh_buffer/create_index_bufferAPIs.docs/procgen.mdand updateddocs/architecture.mdto describe organization, determinism, generation conventions, integration, and known limits.Testing
cmake --preset linux-debugfailed in this environment due to missing third-party dependencies (SDL3/bgfx), so the full CMake run could not be completed here.g++ -std=c++20 -I. -fsyntax-only engine/procgen/procgen.cpp tests/procgen/procgen_tests.cppandg++ -std=c++20 -I. -fsyntax-only engine/shell/main.cpp, both of which succeeded.g++ -std=c++20 -I. tests/procgen/procgen_tests.cpp engine/procgen/procgen.cpp engine/render/buffer_types.cpp engine/core/math.cpp engine/core/transform.cpp engine/core/random.cpp engine/core/hash.cpp -o /tmp/procgen_tests && /tmp/procgen_tests, and the procgen test ran successfully (assertions passed).render_procgen_testsin CMake and added CTest entryunit.procgen.mesh_toolkitso the suite will run under CI once external dependencies are present.Codex Task