Skip to content

Conversation

@jrobsonchase
Copy link
Contributor

@jrobsonchase jrobsonchase commented Sep 25, 2024

Builds on #15425

Objective

Solution

With #15425, we have a trait encapsulating iteration over entity-containing components. This effectively becomes the "entity relation" trait for components, which we can target generically in the HierarchyQueryExt instead of the concrete Parent and Children types.

Testing

  • A couple of copy-pasted tests showing that it traverses child/parent hierarchies identically to the more specialized methods

TODO

  • Documentation
  • Some way to control traversal? Max depth, depth/breadth-first, etc.

@alice-i-cecile alice-i-cecile added the M-Release-Note Work that should be called out in the blog due to impact label Sep 25, 2024
@jrobsonchase jrobsonchase force-pushed the iter_relations branch 8 times, most recently from 8d3558c to 1b2d84a Compare September 25, 2024 16:04
Once the `*_world_entities` reflect methods are removed, we can also remove the
distinction between the two and consolidate to a single `RelfectMapEntities`
that isn't bound by `T: Component`.
@alice-i-cecile alice-i-cecile added A-Hierarchy S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged C-Feature A new feature, making something new possible labels Sep 26, 2024
@alice-i-cecile
Copy link
Member

Wow, that's super neat! This really makes me prefer the latter proposal.

@BenjaminBrienen BenjaminBrienen added the D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes label Sep 28, 2024
@jrobsonchase jrobsonchase force-pushed the iter_relations branch 4 times, most recently from e859a11 to 6260929 Compare September 29, 2024 01:32
@jrobsonchase jrobsonchase force-pushed the iter_relations branch 3 times, most recently from 202393c to e1dea3b Compare September 30, 2024 12:11
@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events and removed A-Hierarchy labels Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ECS Entities, components, systems, and events C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes M-Release-Note Work that should be called out in the blog due to impact S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants