mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-09 18:43:51 +00:00
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.
17 lines
501 B
C++
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
|