Trait rerun::external::re_viewer_context::ViewContextSystem
source · pub trait ViewContextSystem: Send + Sync {
// Required methods
fn compatible_component_sets(&self) -> Vec<BTreeSet<ComponentName>>;
fn execute(&mut self, ctx: &ViewContext<'_>, query: &ViewQuery<'_>);
fn as_any(&self) -> &(dyn Any + 'static);
}
Expand description
View context that can be used by view parts and ui methods to retrieve information about the scene as a whole.
Is always populated before view part systems.
Required Methods§
sourcefn compatible_component_sets(&self) -> Vec<BTreeSet<ComponentName>>
fn compatible_component_sets(&self) -> Vec<BTreeSet<ComponentName>>
Returns all the component sets that the system is compatible with.
If an entity path satisfies any of these sets, then the system will automatically run for that entity path.
Return an empty vec to specify that the system should never run automatically for any
specific entities.
It may still run once per frame as part of the global context if it has been registered to
do so, see crate::SpaceViewSystemRegistrator
.
sourcefn execute(&mut self, ctx: &ViewContext<'_>, query: &ViewQuery<'_>)
fn execute(&mut self, ctx: &ViewContext<'_>, query: &ViewQuery<'_>)
Queries the chunk store and performs data conversions to make it ready for consumption by scene elements.
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts itself to a reference of std::any::Any
, which enables downcasting to concrete types.