Trait bevy::render::extract_instances::ExtractInstance
pub trait ExtractInstance: Send + Sync + Sized + 'static {
type Query: WorldQuery + ReadOnlyWorldQuery;
type Filter: WorldQuery + ReadOnlyWorldQuery;
// Required method
fn extract(item: <Self::Query as WorldQuery>::Item<'_>) -> Option<Self>;
}
Expand description
Describes how to extract data needed for rendering from a component or components.
Before rendering, any applicable components will be transferred from the
main world to the render world in the ExtractSchedule
step.
This is essentially the same as
ExtractComponent
, but
higher-performance because it avoids the ECS overhead.
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(item: <Self::Query as WorldQuery>::Item<'_>) -> Option<Self>
fn extract(item: <Self::Query as WorldQuery>::Item<'_>) -> Option<Self>
Defines how the component is transferred into the “render world”.
Object Safety§
This trait is not object safe.