Trait bevy::render::render_component::ExtractComponent
[−]pub trait ExtractComponent: Component {
type Query: WorldQuery;
type Filter: WorldQuery;
fn extract_component(
item: <<Self::Query as WorldQuery>::Fetch as Fetch<'_, '_>>::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
type Query: WorldQuery
ECS WorldQuery
to fetch the components to extract.
type Filter: WorldQuery
type Filter: WorldQuery
Filters the entities with additional constraints.
Required Methods
fn extract_component(
item: <<Self::Query as WorldQuery>::Fetch as Fetch<'_, '_>>::Item
) -> Self
fn extract_component(
item: <<Self::Query as WorldQuery>::Fetch as Fetch<'_, '_>>::Item
) -> Self
Defines how the component is transferred into the “render world”.