pub struct RenderEntity(/* private fields */);
Expand description
Component added on the main world entities that are synced to the Render World in order to keep track of the corresponding render world entity.
Can also be used as a newtype wrapper for render world entities.
Implementations§
Trait Implementations§
Source§impl Clone for RenderEntity
impl Clone for RenderEntity
Source§fn clone(&self) -> RenderEntity
fn clone(&self) -> RenderEntity
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Component for RenderEntity
impl Component for RenderEntity
Source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
A constant indicating the storage type used for this component.
Source§fn register_required_components(
requiree: ComponentId,
components: &mut Components,
storages: &mut Storages,
required_components: &mut RequiredComponents,
inheritance_depth: u16,
)
fn register_required_components( requiree: ComponentId, components: &mut Components, storages: &mut Storages, required_components: &mut RequiredComponents, inheritance_depth: u16, )
Registers required components.
Source§fn register_component_hooks(hooks: &mut ComponentHooks)
fn register_component_hooks(hooks: &mut ComponentHooks)
Called when registering this component, allowing mutable access to its
ComponentHooks
.Source§impl Debug for RenderEntity
impl Debug for RenderEntity
Source§impl Deref for RenderEntity
impl Deref for RenderEntity
Source§impl From<Entity> for RenderEntity
impl From<Entity> for RenderEntity
Source§impl Hash for RenderEntity
impl Hash for RenderEntity
Source§impl PartialEq for RenderEntity
impl PartialEq for RenderEntity
Source§impl QueryData for RenderEntity
impl QueryData for RenderEntity
Source§type ReadOnly = RenderEntity
type ReadOnly = RenderEntity
The read-only variant of this
QueryData
, which satisfies the ReadOnlyQueryData
trait.Source§impl WorldQuery for RenderEntity
impl WorldQuery for RenderEntity
SAFETY: defers completely to &RenderEntity
implementation,
and then only modifies the output safely.
Source§const IS_DENSE: bool = true
const IS_DENSE: bool = true
Returns true if (and only if) every table of every archetype matched by this fetch contains
all of the matched components. This is used to select a more efficient “table iterator”
for “dense” queries. If this returns true,
WorldQuery::set_table
must be used before
WorldQuery::fetch
can be called for iterators. If this returns false,
WorldQuery::set_archetype
must be used before WorldQuery::fetch
can be called for
iterators.Source§type Item<'w> = Entity
type Item<'w> = Entity
The item returned by this
WorldQuery
For QueryData
this will be the item returned by the query.
For QueryFilter
this will be either ()
, or a bool
indicating whether the entity should be included
or a tuple of such things.Source§type Fetch<'w> = <&'static RenderEntity as WorldQuery>::Fetch<'w>
type Fetch<'w> = <&'static RenderEntity as WorldQuery>::Fetch<'w>
Per archetype/table state used by this
WorldQuery
to fetch Self::Item
Source§type State = <&'static RenderEntity as WorldQuery>::State
type State = <&'static RenderEntity as WorldQuery>::State
State used to construct a
Self::Fetch
. This will be cached inside QueryState
,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch
.Source§fn shrink<'wlong: 'wshort, 'wshort>(item: Entity) -> Entity
fn shrink<'wlong: 'wshort, 'wshort>(item: Entity) -> Entity
This function manually implements subtyping for the query items.
Source§fn shrink_fetch<'wlong: 'wshort, 'wshort>(
fetch: Self::Fetch<'wlong>,
) -> Self::Fetch<'wshort>
fn shrink_fetch<'wlong: 'wshort, 'wshort>( fetch: Self::Fetch<'wlong>, ) -> Self::Fetch<'wshort>
This function manually implements subtyping for the query fetches.
Source§unsafe fn init_fetch<'w>(
world: UnsafeWorldCell<'w>,
component_id: &ComponentId,
last_run: Tick,
this_run: Tick,
) -> Self::Fetch<'w>
unsafe fn init_fetch<'w>( world: UnsafeWorldCell<'w>, component_id: &ComponentId, last_run: Tick, this_run: Tick, ) -> Self::Fetch<'w>
Creates a new instance of this fetch. Read more
Source§unsafe fn set_archetype<'w>(
fetch: &mut Self::Fetch<'w>,
component_id: &ComponentId,
archetype: &'w Archetype,
table: &'w Table,
)
unsafe fn set_archetype<'w>( fetch: &mut Self::Fetch<'w>, component_id: &ComponentId, archetype: &'w Archetype, table: &'w Table, )
Adjusts internal state to account for the next
Archetype
. This will always be called on
archetypes that match this WorldQuery
. Read moreSource§unsafe fn set_table<'w>(
fetch: &mut Self::Fetch<'w>,
component_id: &ComponentId,
table: &'w Table,
)
unsafe fn set_table<'w>( fetch: &mut Self::Fetch<'w>, component_id: &ComponentId, table: &'w Table, )
Adjusts internal state to account for the next
Table
. This will always be called on tables
that match this WorldQuery
. Read moreSource§unsafe fn fetch<'w>(
fetch: &mut Self::Fetch<'w>,
entity: Entity,
table_row: TableRow,
) -> Self::Item<'w>
unsafe fn fetch<'w>( fetch: &mut Self::Fetch<'w>, entity: Entity, table_row: TableRow, ) -> Self::Item<'w>
Fetch
Self::Item
for either the given entity
in the current Table
,
or for the given entity
in the current Archetype
. This must always be called after
WorldQuery::set_table
with a table_row
in the range of the current Table
or after
WorldQuery::set_archetype
with a entity
in the current archetype. Read moreSource§fn update_component_access(
component_id: &ComponentId,
access: &mut FilteredAccess<ComponentId>,
)
fn update_component_access( component_id: &ComponentId, access: &mut FilteredAccess<ComponentId>, )
Source§fn init_state(world: &mut World) -> ComponentId
fn init_state(world: &mut World) -> ComponentId
Creates and initializes a
State
for this WorldQuery
type.Source§fn matches_component_set(
state: &ComponentId,
set_contains_id: &impl Fn(ComponentId) -> bool,
) -> bool
fn matches_component_set( state: &ComponentId, set_contains_id: &impl Fn(ComponentId) -> bool, ) -> bool
Source§fn set_access(_state: &mut Self::State, _access: &FilteredAccess<ComponentId>)
fn set_access(_state: &mut Self::State, _access: &FilteredAccess<ComponentId>)
Sets available accesses for implementors with dynamic access such as
FilteredEntityRef
or FilteredEntityMut
. Read moreimpl Copy for RenderEntity
impl Eq for RenderEntity
impl ReadOnlyQueryData for RenderEntity
impl StructuralPartialEq for RenderEntity
Auto Trait Implementations§
impl Freeze for RenderEntity
impl RefUnwindSafe for RenderEntity
impl Send for RenderEntity
impl Sync for RenderEntity
impl Unpin for RenderEntity
impl UnwindSafe for RenderEntity
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
Return the
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId), )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> C
Source§fn register_required_components(
components: &mut Components,
storages: &mut Storages,
required_components: &mut RequiredComponents,
)
fn register_required_components( components: &mut Components, storages: &mut Storages, required_components: &mut RequiredComponents, )
Registers components that are required by the components in this
Bundle
.Source§fn get_component_ids(
components: &Components,
ids: &mut impl FnMut(Option<ComponentId>),
)
fn get_component_ids( components: &Components, ids: &mut impl FnMut(Option<ComponentId>), )
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
fn get_components(self, func: &mut impl FnMut(StorageType, OwningPtr<'_>))
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more