pub trait ExtractComponent: Component {
type Query: WorldQuery + ReadOnlyWorldQuery;
type Filter: WorldQuery + ReadOnlyWorldQuery;
fn extract_component(item: QueryItem<'_, Self::Query>) -> Self;
}
Expand description
Describes how a component gets extracted for rendering.
Therefore the component is transferred from the “app world” into the “render world”
in the RenderStage::Extract
step.
Required Associated Types
type Query: WorldQuery + ReadOnlyWorldQuery
type Query: WorldQuery + ReadOnlyWorldQuery
ECS WorldQuery
to fetch the components to extract.
type Filter: WorldQuery + ReadOnlyWorldQuery
type Filter: WorldQuery + ReadOnlyWorldQuery
Filters the entities with additional constraints.
Required Methods
fn extract_component(item: QueryItem<'_, Self::Query>) -> Self
fn extract_component(item: QueryItem<'_, Self::Query>) -> Self
Defines how the component is transferred into the “render world”.