Commit graph

23 commits

Author SHA1 Message Date
Kelsi
a953142b50 feat(editor): add --gen-mesh-tombstone graveyard primitive
47th procedural mesh: 3-box vertical headstone — wide low
base plinth, tall thin main slab on top, and a slightly-
wider decorative crown that acts as a flat-cap stand-in for
the arched-top headstone shape (which would need rotated
faces). Pairs with --gen-mesh-grave (horizontal mound) and
--gen-mesh-coffin for graveyards, dungeon crypts, haunted-
zone set dressing.

Vertical layout: 15% base, 75% slab, 10% crown. Defaults to
0.60 wide x 1.10 tall x 0.18 deep with the base 1.45x wider
than the slab on each footprint axis.
2026-05-09 08:19:04 -07:00
Kelsi
f1a2e6850b feat(editor): add --gen-mesh-mailbox wayside primitive
46th procedural mesh: 4-box mailbox — vertical post with a
horizontal box body on top and a small flag (pole + plate)
mounted on the right (+X) side near the front. Useful for
inns, post stations, manor gates, frontier outposts, courier
routes between zones.

Defaults to a 1.10m post + 0.45L x 0.20W x 0.20H body
(~1.44m total). The box body is intentionally slightly wider
than the post on each axis so the body visually caps the
post. Flag plate extends +X away from the body so it reads
as a raised flag from the road side.
2026-05-09 08:08:37 -07:00
Kelsi
af3c4f0bd6 feat(editor): add --gen-mesh-signpost wayfinding primitive
45th procedural mesh: 4-box signpost — stone base anchor,
tall vertical pole, thin sign board mounted face-out near
the top, and a small decorative cap. Useful for crossroads,
tavern fronts, town entrances, dungeon area markers, quest
hub indicators.

Sign board's long axis runs along Z so the player reads the
sign when facing parallel to the road. Defaults to a 2.5 m
post with a 0.8 x 0.35 m board (~2.7 m total).
2026-05-09 07:58:45 -07:00
Kelsi
549bdaf191 feat(editor): add --gen-mesh-well village-prop primitive
44th procedural mesh: 7-box water well — 4 stone walls
arranged in a hollow square (interior visible, like a real
well shaft) + 2 vertical roof posts on opposite sides + 1
horizontal cross beam at the top where rope/bucket would
mount. Useful for village squares, courtyards, dungeon
water sources, druidic shrines.

Defaults to 1.4 m square footprint with 0.8 m walls and
1.6 m roof posts (~2.4 m total height). The east/west
walls are shortened so the corner joints line up cleanly
without overlap geometry.
2026-05-09 07:47:15 -07:00
Kelsi
55a768f1f3 feat(editor): add --gen-mesh-ladder utility primitive
43rd procedural mesh: 2 vertical rails + N evenly-spaced
horizontal rungs. Sits flat against +Z (the climbing face)
so it can be parented to walls, wagons, ship hulls, mage
tower trapdoors, attic openings, dungeon shafts.

Defaults to 3.0m tall × 0.6m wide with 8 rungs (typical
home/loft ladder). Rung spacing computes as height/(rungs+1)
so the first rung sits a half-step from the floor and the
last rung the same distance from the top — keeps the ladder
visually symmetric regardless of rung count.
2026-05-09 07:36:02 -07:00
Kelsi
8d71618c28 feat(editor): add --gen-mesh-bed bedroom-prop primitive
42nd procedural mesh: 8-box bed — 4 corner legs, mattress
slab, tall headboard at the +Z end, shorter footboard at the
-Z end, and a small pillow on the mattress near the headboard.
Pairs with --gen-mesh-table / --gen-mesh-bookshelf for inn
rooms, manor bedrooms, barracks, dungeon cells.

Defaults to 2.0 × 1.2 (length × width) with 0.30 leg height
and 0.20 mattress thickness — proportions of a single bed.
Customizable per dimension so the same primitive covers
single, double, and king-size beds plus child cots.
2026-05-09 07:25:11 -07:00
Kelsi
6c9edc8130 feat(editor): add --gen-mesh-lamppost urban-prop primitive
41st procedural mesh: 4-box urban lighting fixture — square
base plinth, tall thin vertical pole, lantern body box around
the pole top (overlaps so the lamp visually caps the pole),
and a slightly-wider cap plate that reads as an awning.

Useful for streets, plazas, courtyards, taverns — anywhere
that wants explicit lighting fixtures without modeling each
one by hand. Defaults to 3-meter pole + 0.5-meter lantern
(~3.6m total). Customizable per dimension to cover everything
from candlestick-stands to tall ornate streetlamps.
2026-05-09 07:12:46 -07:00
Kelsi
61bc9dfb15 feat(editor): add --gen-mesh-table furniture primitive
40th procedural mesh: simple 5-box table — flat top slab on
4 vertical corner legs. Pairs with --gen-mesh-bench /
--gen-mesh-throne / --gen-mesh-bookshelf for taverns,
dining halls, libraries, and study set dressing.

Defaults to 1.6 × 1.0 base × 0.85 tall, 0.10-square legs,
0.06-thick top — sensible dining-table proportions.
Customizable per dimension so a single primitive covers
desks, end tables, and big banquet tables.
2026-05-09 06:58:38 -07:00
Kelsi
ecb97428aa feat(editor): add --gen-mesh-bookshelf cabinet primitive
39th procedural mesh: 5-panel cabinet (back / left / right /
top / bottom) divided into N bays by N-1 horizontal shelves,
with rows of pseudo-random book boxes on each level. Book
widths and heights vary per bay (seeded by bay index so
re-generating the same shelf gives the same layout) so the
result reads as a stocked library instead of a perfect grid.

Defaults to 1.5x2.0x0.4 with 4 shelves (~72 books). Useful
for studies, libraries, mage towers, anywhere that needs
filled-out furniture set dressing.
2026-05-09 06:39:39 -07:00
Kelsi
2658e8297a feat(editor): add --gen-mesh-coffin hexagonal-prism primitive
38th procedural mesh: classic 6-sided coffin with the
narrow-head / wide-shoulder / tapered-foot top-down profile
that's instantly recognizable from any angle. Built as 6 side
quads + top lid fan + bottom panel fan, all with face-shared
normals so it shades cleanly under any lighting.

Pairs with --gen-mesh-grave for graveyard set dressing.
Defaults to 2.0×0.8×0.6 (length × shoulder-width × height).
2026-05-09 06:18:42 -07:00
Kelsi
b75924762e feat(editor): add --gen-mesh-throne regal-seat primitive
5-box composite: low pedestal slab + seat block + tall
vertical backrest at -Z + 2 small armrests on the +X/-X
sides. Pedestal is wider than the seat for a stable
foundation, seat thickness is 30% of total seat height.

Defaults: seatW=0.8, seatH=0.5, backH=1.5, pedSize=1.2.
Useful for throne rooms, hero seats, judgement halls,
royal court set dressing. Brings the procedural mesh
primitive set to 37.
2026-05-09 05:50:23 -07:00
Kelsi
9973da07ab feat(editor): add --gen-mesh-cage prison-cell primitive
Square cage frame: top + bottom thin slabs + 4 corner posts
(thicker than bars) + N evenly-spaced bars per side. Bars on
each side span perpendicular to that side's plane so the
cage reads as enclosed from any viewing angle.

Defaults: width=1.5, height=2.0, barsPerSide=5, barR=0.04.
Useful for prison cells, animal pens, dungeon set dressing,
caged exhibits. Brings the procedural mesh primitive set to 36.
2026-05-09 05:25:39 -07:00
Kelsi
47e78d4e08 feat(editor): add --gen-mesh-totem stacked carved totem primitive
Stack of N square blocks with alternating widths: even-indexed
blocks (0, 2, 4...) get full base width, odd blocks (1, 3, 5...)
get 70% — gives the carved-segment look characteristic of
totem poles.

Defaults: baseW=0.5, 5 segments, segH=0.5. Useful for tribal
zones, druid groves, fairgrounds, primitive village markers.
Brings the procedural mesh primitive set to 35.
2026-05-09 04:57:33 -07:00
Kelsi
887dce647e feat(editor): add --gen-mesh-shrine canopy primitive
6-component composite: square base slab + 4 cylindrical
pillars (12-segment, inset by pillarR so they sit fully on
the base) + flat roof slab on top with 5% overhang past the
base footprint. Pillars + roof create an open canopy.

Defaults: size=1.5, pillarH=2, pillarR=0.1, roofT=0.15.
Useful for wayside shrines, gazebos, well covers, market
stalls, religious altars in temples. Brings the procedural
mesh primitive set to 34.

Milestone: kArgRequired entries reaches 300.
2026-05-09 04:25:52 -07:00
Kelsi
0a5f508f4e feat(editor): add --gen-mesh-bench wooden bench primitive
Three-box composite: long thin seat plank on top + 2 leg
slabs at the ends (positioned at 90% along the bench length
to leave a small overhang on each side). Legs are vertical
Y-aligned slabs spanning the full height from floor to
bottom-of-seat, ~5% of bench length thick.

Defaults: length=1.5, seatY=0.5, seatT=0.06, seatW=0.4. Useful
for taverns, plazas, roadside rest stops, council halls.
Brings the procedural mesh primitive set to 33.
2026-05-09 03:43:11 -07:00
Kelsi
dab7705c0f feat(editor): add --gen-mesh-grave tombstone primitive
Two-box composite: a wider low base + a vertical tablet
centered on top. Base is deeper than tablet (1.5×) and base
height is 20% of tablet height — proportions that read as a
stable foundation supporting an upright stone.

Defaults: tablet 0.6×1.0×0.15, base width 0.8. Useful for
graveyards, undead zones, memorial set dressing, ruined
chapel courtyards. Brings the procedural mesh primitive set
to 32.
2026-05-09 03:00:19 -07:00
Kelsi
0c1f873029 feat(editor): add --gen-mesh-banner pole + flag primitive
Composite banner: 12-segment vertical pole cylinder with top
and bottom caps + a rectangular flag attached at the top of
the pole, draped along -Z. The flag is two-sided (front faces
+X, back faces -X) so it reads from both viewing angles
without needing backface-culling-disabled materials.

Defaults: poleH=3, poleR=0.05, flagW=0.8, flagH=1.2. Useful
for guild halls, faction territory markers, military camps,
parade dressing. Brings the procedural mesh primitive set
to 31.
2026-05-09 02:10:23 -07:00
Kelsi
d0c8ea582e feat(editor): add --gen-mesh-cart wagon primitive
Composite cart: rectangular bed box + 2 axis-along-Z cylindrical
wheels mounted on each side at the bottom of the bed. Each wheel
has 16 angular segments + front/back caps. Bed sits at y=wheelR
so the wheels touch the ground at y=0.

Defaults: 1.6×0.8×0.5 bed, wheelR=0.35. Useful for medieval
village clutter, market scenes, NPC vendor decoration. Brings
the procedural mesh primitive set to 30.
2026-05-09 00:52:13 -07:00
Kelsi
326f7bcdaa feat(editor): add --gen-mesh-mushroom forest-prop primitive
Composite mushroom: 12-segment cylindrical stalk + 16×8
hemisphere cap on top (top half of a UV sphere). Cap radius
is independent of stalk radius so the silhouette can match
anything from a slim toadstool to a wide morel. Stalk has a
bottom cap and the hemisphere's lower edge is sealed against
a flat -Y disc (the "gills") so the mesh is watertight from
all viewing angles.

Defaults: stalkR=0.1, stalkH=0.6, capR=0.4. Useful for
forest decoration, swamp zones, fairy-ring set dressing.
Brings the procedural mesh primitive set to 29.
2026-05-08 23:48:03 -07:00
Kelsi
251a830966 refactor(editor): extract --gen-mesh dispatcher into cli_gen_mesh.cpp
Moves the bare --gen-mesh dispatcher (cube/plane/sphere/cylinder/
torus/cone/ramp internal switch — 391 lines) and the related
--gen-mesh-textured handler (~72 lines) into the existing
cli_gen_mesh.cpp module.

The bare --gen-mesh handler renamed to handleMeshDispatch since
'handleMesh' would shadow the dispatcher class. --gen-mesh-textured
matched first in the dispatch chain to keep the longer-name
convention consistent with --gen-texture-noise vs -noise-color.

main.cpp drops 21,526 → 21,061 lines (-465). Behavior verified
by re-running --gen-mesh cube/sphere/torus.
2026-05-08 23:32:04 -07:00
Kelsi
8e73b715e5 refactor(editor): extract 9 more mesh handlers into cli_gen_mesh.cpp
Moves stairs, grid, disc, tube, capsule, arch, pyramid, fence,
and tree into the existing cli_gen_mesh.cpp module. Together
with the 12 composite props extracted in 00754941 and the
anvil added in cd4bdfec, the module now contains 22 of the
28 procedural mesh primitives.

Remaining mesh handlers in main.cpp: --gen-mesh dispatcher
(cube/plane/sphere/cylinder/torus/cone/ramp), --gen-mesh-from-
heightmap, --gen-mesh-textured. Those have specialized I/O or
embedded sub-dispatch and will move in a follow-up batch.

main.cpp drops 22,681 → 21,526 lines (-1,155). Behavior
verified by re-running stairs/disc/fence/tree.
2026-05-08 22:58:21 -07:00
Kelsi
cd4bdfec44 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.
2026-05-08 22:37:47 -07:00
Kelsi
0075494109 refactor(editor): extract 12 composite mesh primitives into cli_gen_mesh.cpp
Moves the recently-added composite-prop mesh handlers (rock,
pillar, bridge, tower, house, fountain, statue, altar, portal,
archway, barrel, chest) into their own translation unit. These
12 handlers were the most contiguous block of similar-shaped
mesh code in main.cpp.

Other mesh handlers (--gen-mesh dispatcher, fence, tree, grid,
stairs, disc, tube, capsule, arch, pyramid, from-heightmap,
textured) still live in main.cpp and may be migrated in
subsequent batches.

main.cpp drops 24,270 → 22,681 lines (-1,589). Behavior
verified by re-running rock/chest/archway/fountain.
2026-05-08 22:19:41 -07:00