Skip to content

Relay 4c: clients draw the room's entities - #1337

Merged
transfix merged 1 commit into
feat/relay-entitiesfrom
feat/relay-entity-view
Nov 18, 2026
Merged

transfix merged 1 commit into
feat/relay-entitiesfrom
feat/relay-entity-view

Conversation

@transfix

Copy link
Copy Markdown
Owner

Third step of the relay hand-off, stacked on #1336: arigl, ariglx and the web client draw the vehicles the relay's document runs.

Change

  • room_view::update_entities(const entity_playout &) draws each entity the client's playout shows (Relay 4b: the room's entities on the wire, and a client's playout of them #1336) as a vehicle. It uses vehicle_view's box look (vehicle_scene_node: chassis, cabin, four wheels), sized from the entity's identity, in its two colours. The node is posed at the chassis's centre and heading, and the entity's name joins the labels. The node is rebuilt when the identity changes and removed when the room drops the entity; the view's teardown removes these nodes too.
  • room_entity.wheels carries the wheelbase, track and wheel radius from the vehicle's desc, so the box look's wheels sit where the plant's do.
  • arigl calls it every frame after the room view's update. ariglx and the web client are arigl builds, so they draw entities too.

Tests

  • cvcgl_room_view has a new entities section: no node before the first sample, posed at its centre, a box look with wheels, rebuilt on a new colour, removed when dropped, drawn again on return, torn down with the view.
  • Windows Release: 220/220 of the cvcgl room/ariadne/vehicle, pose stream, holon, room and arisrv ctest set pass. Changed lines are clang-format clean.

Not yet

  • A model look (the Humvee, a file) is drawn as its box. The relay's model files are its own, and the client doesn't look for the model locally yet.
  • The wheels are drawn but don't turn or steer.

room_view::update_entities draws each entity a client's playout shows
(entity_playout, 4b) as a vehicle: vehicle_view's box look (chassis,
cabin, four wheels), sized from its identity, in its two colours, posed
at its chassis's centre and heading, and named among the labels. Its
node is built again when its identity changes and removed when the room
drops it; the view's teardown removes them too. A model look is drawn as
its box for now: the relay's model files are its own, and the client
does not look for the model itself yet.

room_entity carries its wheels (wheelbase, track, a wheel's radius) from
its vehicle, so the box look's wheels sit where the plant's do.

arigl (and ariglx and the web client, which are arigl) calls it each
frame after the room view's update.

Test: cvcgl_room_view's entities section (no node before a first sample,
posed at its centre, a box look with wheels, rebuilt on a new colour,
removed when dropped, drawn again on return, torn down with the view).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant