Trait bevy::render::extract_component::ExtractComponent
pub trait ExtractComponent: Component {
type Query: WorldQuery + ReadOnlyWorldQuery;
type Filter: WorldQuery + ReadOnlyWorldQuery;
fn extract_component(item: <Self::Query as WorldQuery>::Item<'_>) -> 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: <Self::Query as WorldQuery>::Item<'_>) -> Self
fn extract_component(item: <Self::Query as WorldQuery>::Item<'_>) -> Self
Defines how the component is transferred into the “render world”.