pub trait Drawer: Component + Sized {
type Vertex: Vertex;
type ExtractParam: ReadOnlySystemParam;
type ExtractData: ReadOnlyQueryData;
type ExtractFilter: QueryFilter;
type DrawParam: ReadOnlySystemParam;
// Required methods
fn extract(
param: &SystemParamItem<'_, '_, Self::ExtractParam>,
query: QueryItem<'_, Self::ExtractData>,
) -> Option<Self>;
fn enqueue(
&self,
param: &SystemParamItem<'_, '_, Self::DrawParam>,
queuer: &mut impl Extend<(f32, <Self::Vertex as Vertex>::PipelineKey, <Self::Vertex as Vertex>::Command)>,
);
}Expand description
A render world Component extracted from the main world that will be used to issue
VertexCommands.
Required Associated Types§
Sourcetype ExtractParam: ReadOnlySystemParam
type ExtractParam: ReadOnlySystemParam
System parameter to fetch when extracting data from the main world.
Sourcetype ExtractData: ReadOnlyQueryData
type ExtractData: ReadOnlyQueryData
Query item to fetch from entities when extracting from those entities to the render world.
Sourcetype ExtractFilter: QueryFilter
type ExtractFilter: QueryFilter
Additional query filters accompanying ExtractData.
Sourcetype DrawParam: ReadOnlySystemParam
type DrawParam: ReadOnlySystemParam
System parameter to fetch when issuing VertexCommands.
Required Methods§
Sourcefn extract(
param: &SystemParamItem<'_, '_, Self::ExtractParam>,
query: QueryItem<'_, Self::ExtractData>,
) -> Option<Self>
fn extract( param: &SystemParamItem<'_, '_, Self::ExtractParam>, query: QueryItem<'_, Self::ExtractData>, ) -> Option<Self>
Extracts an instance of this drawer from matching entities, if available.
Sourcefn enqueue(
&self,
param: &SystemParamItem<'_, '_, Self::DrawParam>,
queuer: &mut impl Extend<(f32, <Self::Vertex as Vertex>::PipelineKey, <Self::Vertex as Vertex>::Command)>,
)
fn enqueue( &self, param: &SystemParamItem<'_, '_, Self::DrawParam>, queuer: &mut impl Extend<(f32, <Self::Vertex as Vertex>::PipelineKey, <Self::Vertex as Vertex>::Command)>, )
Issues VertexCommands for rendering, in a form of Z-layer,
pipeline key, and vertex command.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.