feat(editor): add --gen-mesh-anvil blacksmith primitive

Composite anvil silhouette: 4-step pedestal (wide base → narrow
waist → wide cap → flat work face), each step a single addBox
call, plus a 4-vertex tapered prism for the horn extending in
+X past the face. The prism's 4 side triangles converge to a
single tip vertex (the horn point), with a sealed base square
behind it.

Defaults: length=1.0, width=0.4, hornLen=0.5, bodyH=0.5. Useful
for blacksmith shops, dwarven forges, weapon-crafting set
dressing. Brings the procedural mesh primitive set to 28.

Added directly to cli_gen_mesh.cpp — proves the modular file
accepts new primitives the same way as extracted ones.
This commit is contained in:
Kelsi 2026-05-08 22:37:47 -07:00
parent 0075494109
commit cd4bdfec44
3 changed files with 159 additions and 0 deletions

View file

@ -122,6 +122,8 @@ void printUsage(const char* argv0) {
std::printf(" Tapered barrel: bulges in middle + 2 rim hoops (default 0.4/0.5/1.0/0.06)\n");
std::printf(" --gen-mesh-chest <wom-base> [width] [depth] [bodyHeight] [lidHeight]\n");
std::printf(" Treasure chest: body box + lid box + 3 iron bands + lock plate (default 1.4×0.9×0.9)\n");
std::printf(" --gen-mesh-anvil <wom-base> [length] [width] [hornLength] [bodyHeight]\n");
std::printf(" Blacksmith anvil: stepped pedestal + flat work surface + horn taper (default 1.0×0.4×0.5×0.5)\n");
std::printf(" Procedural tree: cylindrical trunk + spherical foliage (default 0.1/2.0/0.7)\n");
std::printf(" --displace-mesh <wom-base> <heightmap.png> [scale]\n");
std::printf(" Offset each vertex along its normal by heightmap brightness × scale (default 1.0)\n");