-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rethink view selection & filtering + make all views opt-in (#3323)
This refactors view selection & heuristic filtering based on the lengthy standup discussions we had regarding the difficulties met during the implementation of the mesh-related archetypes. The most important changes are to the `ViewPartSystem` trait which now looks like this: ```rust // [...] /// Returns the minimal set of components that the system _requires_ in order to be instantiated. fn required_components(&self) -> IntSet<ComponentName>; /// Implements a filter to heuristically determine whether or not to instantiate the system. /// /// If and when the system can be instantiated (i.e. because there is at least one entity that satisfies /// the minimal set of required components), this method applies an arbitrary filter to determine whether /// or not the system should be instantiated by default. /// /// The passed-in set of `components` corresponds to all the different component that have ever been logged /// on the entity path. /// /// By default, this always returns true. /// Override this method only if a more detailed condition is required to inform heuristics whether or not /// the given entity is relevant for this system. fn heuristic_filter( &self, _store: &re_arrow_store::DataStore, _ent_path: &EntityPath, _components: &IntSet<ComponentName>, ) -> bool { true } // [...] ``` as well as the modification made to [the heuristic filtering logic](https://github.com/rerun-io/rerun/pull/3323/files#diff-3f3d4453e2c33e0cbe9e4d3be98acbeca9e8ae6425c7cfbc099cd40425e90698). As a side-effect of these changes, our heuristics now support archetypes with multiple required components. --- This also makes all space views opt-in based on indicator components, as opposed to the status quo where views are opt-out, even though there is no way to opt-out. This prevents issues like the following: ![image](https://github.com/rerun-io/rerun/assets/2910679/971a7ded-3777-41ee-8e38-be13a8a7a2b1) where multiple view systems render the same data because they all can, even though that wasn't the intention of the logger (which merely logged a `Mesh3D` archetype in this case). Same data with this PR: ![image](https://github.com/rerun-io/rerun/assets/2910679/4571c84c-a532-4521-a9c8-6d0759725ddd) In the future, we'll want to provide ways for users to easily opt-in into multiple views. This is already possible today by extending existing archetypes, but could definitely be more friendly using blueprints.
- Loading branch information
Showing
38 changed files
with
451 additions
and
256 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.