Kelsidavis-WoWee/tools/editor/cli_mesh_io.hpp
Kelsi 3d5a786ca9 refactor(editor): extract mesh ⇄ heightmap I/O into cli_mesh_io.cpp
Moves the three mesh-PNG bridge handlers (--displace-mesh,
--gen-mesh-from-heightmap, --export-mesh-heightmap) out of
main.cpp into their own translation unit. These three are
distinct from the gen-mesh-* primitive generators in that
they read or write external image files rather than synthesize
geometry from parameters alone.

main.cpp drops 21,061 → 20,741 lines (-320). Behavior verified
by re-running gen-mesh-from-heightmap → validate-wom → and
displace-mesh on a fresh plane.
2026-05-09 00:04:27 -07:00

17 lines
501 B
C++

#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Dispatch the mesh ⇄ heightmap I/O ops:
// --displace-mesh (perturb verts along normal by PNG)
// --gen-mesh-from-heightmap (generate WOM grid from PNG heightmap)
// --export-mesh-heightmap (sample WOM Y to PNG heightmap)
//
// Returns true if matched; outRc holds the exit code.
bool handleMeshIO(int& i, int argc, char** argv, int& outRc);
} // namespace cli
} // namespace editor
} // namespace wowee