Repository navigation
ariadne: world_source and world_physics, the lab's world panels (L1) - #1123
Merged
Merged
Conversation
cvc::nav::world_grid turns any world (a generated world, a data bundle's city, a flat square) into the grid sim_world plans on: world_planes' occupancy walled at the edge, the terrain's height, the signed distance, free points drawn the same way on every platform (splitmix64), and a sim_world config. SceneWorld::world_geometry / grid give a generated or data node's world and its grid, made once per world revision; pycvc's nav_world_grid and AriApp.grid. L0 is done.
A node's `world: <name>` makes it one of the scene's worlds (a generated
world, a data bundle's city, a terrain, a flat ground), and the scene's
`world: { source, cell, half }` picks the one on. SceneWorld::bind_worlds
keeps the others out of the physics world, drawn or headless, and
publishes <prefix>.scene.world.*: source (write it to switch), sources,
node, kind, ready, rev, status, on.<node> (which the loader binds each
world node's visible: to) and the grid of the world on. physics.enabled
turns the stepping off (the world holds still) and on; physics.stats
gains step_ms_history and nodes. world_source.ari and world_physics.ari
are the panels; world_controls' widgets are world_settings; the
world_lab.ari demo has three worlds.
…/world-source # Conflicts: # docs/roadmap/ARIADNE_WORLDS.md # inc/cvc/ariadne/scene_world.h # inc/cvc/nav/world_grid.h # src/cvc/ariadne/scene_world.cpp # src/cvc/nav/world_grid.cpp
transfix
enabled auto-merge (squash)
November 10, 2026 07:46
transfix
added a commit
that referenced
this pull request
Nov 10, 2026
…ld panels (#1123), ocean shore (#1128) Also #1124, #1115 and #1120. Conflicts, both sides kept: - ariadne.h: post_signal also hands the signal to the event tap, and stays a host-thread call outside a pump, as post_input is. The tap is set on the drain's thread, which is the host thread. - ariadne.cpp: deliver_input and post_signal post to the document's scheduler (current_sched) when a resident takes the event, and queue it for the tap when the tap takes that kind. post_signal keeps its assert_outside_pump. The tap's events are handed over in drain_begin, after the input residents and before the has? snapshot, so what they start runs in the frame's pump. - ariadne_script_engine_test.cpp: this branch's isolated-document tests and master's hook tests, all kept. A lane's hook residents run on the host thread: a document that uses an engine stays there (require_host_thread), so the hook queues and the receiver's start_process need no more.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
L1 in ARIADNE_WORLDS.md (sections 14 and 15): the lab's two world panels,
world_sourceandworld_physics, built on the world runtime L0 made. This PR is stacked on #1120 (L0's grid, whichworld_sourcepublishes) and is based on its branch; it goes to master once #1120 merges.A scene's worlds.
world: <name>on a node makes it part of a world the scene can be: agenerated_worldnode, a data node (a city bundle), a terrain, or a flat ground. The scene'sworld:block picks the one on at the start, and a cell gives the navigator's grid of it:SceneWorld::bind_worldstakes the world nodes from the scene and keeps the other worlds' bodies out of the physics world, headless or drawn. Writing<prefix>.scene.world.sourceswitches at the next sync;set_world(name)does the same from C++. Restart rebuilds only the world on.scene.world:sources,nodeandkind(generated, data, terrain or flat);ready, once the world has its world;rev, which goes up on a switch, a Regenerate or a reload;status;on.<node>;cell:,grid.{rows, cols, cell, occupied, summary}of the world on.SceneWorld::gridnow covers a terrain node (from its height field) and a flat ground (an open walled grid over its footprint;cvc::nav::flat_gridover an extent). The loader binds each world node'svisible:toscene.world.on.<node>unless the node binds its own, starting as the world on does, so cvcGL draws only the world on.Physics on and off (Q11 as proposed).
physics.enabled, seeded 1, turns the stepping off and on. While it is off, the steps due are dropped: the world holds still and the clock runs on. Turned back on, it carries on from where it stopped without catching up. The telemetry gainsphysics.stats.step_ms_history(the last 120 step times, for aplot:) andphysics.stats.nodes(a line per node: its bodies and the ones awake).The panels (
src/cvc/ariadne/components/, both listed in INDEX.ari):world_source.ari(argskeys,data,as):world_controls' widgets (now also theworld_settingsgroup) with Regenerate and progress;data-loadinto the same dataset);world_source_controlsis the same without the window.world_physics.ari(argphysics):world_physics_controlsis the same without the window.A demo.
examples/ariadne/documents/world_lab.arihas the three worlds above, with a crate and a ball falling on whichever is on.Docs
Tests (Windows Release)
ariadne_scene_world_test, 3 new tests:world:parsing and visibility binds;set_world, with bodies, keys, revisions, grids, an unknown name warned once, and restart;cvcgl_ariadne_physicstest_worlds_drawn: a drawn scene draws and collides only the world on, and switches both.AriadneComponents.WorldSourceAndPhysicsBindTheWorldsKeys: the panels' binds and args.ShippedComponentsLoadCleancovers both files.arigl snapshotofworld_lab.arion each world: checked by eye. The generated world reported ready with its grid; the terrain and the flat square each drew alone, with the crate and the ball resting on them.[Aa]riadne|[Nn]av|pycvc_world|pycvc_ari|cvcgl_ariadne|SceneWorld|[Pp]hysics|arigl. The one failure was the demo listinggl.sceneas optional, which is fixed in the last commit; AriadneComponents.* then pass. A headless run through pycvcAriAppswitched worlds and moved the bodies, andAriApp.gridgave the flat square's grid.Not in this PR: a web gallery card for
world_lab(it needs a thumbnail); per-vehicle energy and forces (L2).