mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
feat(editor): add --gen-mesh-standing-torch hall-lining torch
83rd procedural mesh primitive. Tall standing floor torch:
• post — thin Y-axis cylinder rising from the floor
• bowl — wider shallow Y-axis cylinder (the fire bowl)
sitting on top of the post
Distinct from --gen-mesh-brazier (squat fire-bowl on a
short stem with a wide-base silhouette) — standing-torch
is the tall thin walking-height variant for lining
hallways, ceremonial paths, dungeon entries, palace
entrance walks, watch-station lighting.
Validates that postR < bowlR so the silhouette always
reads as the wider-bowl-on-thinner-pole shape.
Watertight under weld (verified 168 manifold edges, 0
boundary, 0 non-manifold). Two clean addClosedCylinderY
calls — pattern is now well-established for cylindrical
prop primitives.
This commit is contained in:
parent
2d566dbe63
commit
1ad1977ad6
3 changed files with 45 additions and 0 deletions
|
|
@ -62,6 +62,7 @@ const char* const kArgRequired[] = {
|
|||
"--gen-mesh-statue-base", "--gen-mesh-bird-bath",
|
||||
"--gen-mesh-planter-box", "--gen-mesh-urn", "--gen-mesh-candle",
|
||||
"--gen-mesh-lantern", "--gen-mesh-chalice",
|
||||
"--gen-mesh-standing-torch",
|
||||
"--gen-camp-pack", "--gen-blacksmith-pack", "--gen-village-pack",
|
||||
"--gen-temple-pack", "--gen-graveyard-pack",
|
||||
"--gen-garden-pack", "--gen-dock-pack", "--gen-tavern-pack",
|
||||
|
|
|
|||
|
|
@ -5161,6 +5161,47 @@ int handleTent(int& i, int argc, char** argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int handleStandingTorch(int& i, int argc, char** argv) {
|
||||
// Standing floor torch: tall thin post with a wider shallow
|
||||
// fire-bowl cylinder on top. Distinct from --gen-mesh-brazier
|
||||
// (squat fire-bowl on a stem with a bowl-on-base silhouette)
|
||||
// — standing-torch is the tall thin walking-height variant
|
||||
// for lining hallways, ceremonial paths, dungeon entries.
|
||||
// The 83rd procedural mesh primitive.
|
||||
std::string womBase = argv[++i];
|
||||
float postR = 0.04f;
|
||||
float postH = 1.20f;
|
||||
float bowlR = 0.10f;
|
||||
float bowlH = 0.08f;
|
||||
int sides = 14;
|
||||
parseOptFloat(i, argc, argv, postR);
|
||||
parseOptFloat(i, argc, argv, postH);
|
||||
parseOptFloat(i, argc, argv, bowlR);
|
||||
parseOptFloat(i, argc, argv, bowlH);
|
||||
parseOptInt(i, argc, argv, sides);
|
||||
if (postR <= 0 || postH <= 0 || bowlR <= 0 || bowlH <= 0 ||
|
||||
sides < 6 || sides > 64 || postR >= bowlR) {
|
||||
std::fprintf(stderr,
|
||||
"gen-mesh-standing-torch: dims > 0; sides 6..64; "
|
||||
"postR < bowlR\n");
|
||||
return 1;
|
||||
}
|
||||
stripExt(womBase, ".wom");
|
||||
wowee::pipeline::WoweeModel wom;
|
||||
initWomDefaults(wom, womBase);
|
||||
addClosedCylinderY(wom, postR, 0.0f, postH, sides);
|
||||
addClosedCylinderY(wom, bowlR, postH, postH + bowlH, sides);
|
||||
finalizeAsSingleBatch(wom);
|
||||
setCenteredBoundsXZ(wom, bowlR, bowlR, postH + bowlH);
|
||||
if (!saveWomOrError(wom, womBase, "gen-mesh-standing-torch")) return 1;
|
||||
printWomWrote(womBase);
|
||||
std::printf(" post : R=%.3f x %.3f tall\n", postR, postH);
|
||||
std::printf(" bowl : R=%.3f x %.3f thick (%d sides)\n",
|
||||
bowlR, bowlH, sides);
|
||||
printWomMeshStats(wom);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int handleChalice(int& i, int argc, char** argv) {
|
||||
// Ceremonial chalice / goblet: foot (wide flat base) →
|
||||
// stem (thin tall connecting column) → bowl (wider shallow
|
||||
|
|
@ -7351,6 +7392,7 @@ constexpr MeshEntry kMeshTable[] = {
|
|||
{"--gen-mesh-candle", 1, handleCandle},
|
||||
{"--gen-mesh-lantern", 1, handleLantern},
|
||||
{"--gen-mesh-chalice", 1, handleChalice},
|
||||
{"--gen-mesh-standing-torch", 1, handleStandingTorch},
|
||||
{"--gen-camp-pack", 1, handleGenCampPack},
|
||||
{"--gen-blacksmith-pack", 1, handleGenBlacksmithPack},
|
||||
{"--gen-village-pack", 1, handleGenVillagePack},
|
||||
|
|
|
|||
|
|
@ -320,6 +320,8 @@ void printUsage(const char* argv0) {
|
|||
std::printf(" Lantern: 4-tier base + glass-globe + neck + cap stack (hand lantern / oil lamp silhouette)\n");
|
||||
std::printf(" --gen-mesh-chalice <wom-base> [footR] [footH] [stemR] [stemH] [bowlR] [bowlH] [sides]\n");
|
||||
std::printf(" Chalice: ceremonial 3-tier foot + stem + bowl goblet (chapel / treasure / ritual scene)\n");
|
||||
std::printf(" --gen-mesh-standing-torch <wom-base> [postR] [postH] [bowlR] [bowlH] [sides]\n");
|
||||
std::printf(" Standing torch: tall thin post + wider fire-bowl on top (hall lining / dungeon entry / ceremony path)\n");
|
||||
std::printf(" --gen-camp-pack <outDir>\n");
|
||||
std::printf(" Convenience: emit tent + firepit + bedroll + canopy + woodpile + haystack into outDir as 6 .wom files\n");
|
||||
std::printf(" --gen-blacksmith-pack <outDir>\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue