pub struct VisibleEntityRanges { /* private fields */ }
Expand description
Stores which entities are in within the VisibilityRange
s of views.
This doesn’t store the results of frustum or occlusion culling; use
super::ViewVisibility
for that. Thus entities in this list may not
actually be visible.
For efficiency, these tables only store entities that have
VisibilityRange
components. Entities without such a component won’t be
in these tables at all.
The table is indexed by entity and stores a 32-bit bitmask with one bit for each camera, where a 0 bit corresponds to “out of range” and a 1 bit corresponds to “in range”. Hence it’s limited to storing information for 32 views.
Implementations§
Source§impl VisibleEntityRanges
impl VisibleEntityRanges
Sourcepub fn entity_is_in_range_of_view(&self, entity: Entity, view: Entity) -> bool
pub fn entity_is_in_range_of_view(&self, entity: Entity, view: Entity) -> bool
Returns true if the entity is in range of the given camera.
This only checks VisibilityRange
s and doesn’t perform any frustum or
occlusion culling. Thus the entity might not actually be visible.
The entity is assumed to have a VisibilityRange
component. If the
entity doesn’t have that component, this method will return false.
Sourcepub fn entity_is_in_range_of_any_view(&self, entity: Entity) -> bool
pub fn entity_is_in_range_of_any_view(&self, entity: Entity) -> bool
Returns true if the entity is in range of any view.
This only checks VisibilityRange
s and doesn’t perform any frustum or
occlusion culling. Thus the entity might not actually be visible.
The entity is assumed to have a VisibilityRange
component. If the
entity doesn’t have that component, this method will return false.
Trait Implementations§
Source§impl Default for VisibleEntityRanges
impl Default for VisibleEntityRanges
Source§fn default() -> VisibleEntityRanges
fn default() -> VisibleEntityRanges
impl Resource for VisibleEntityRanges
Auto Trait Implementations§
impl Freeze for VisibleEntityRanges
impl RefUnwindSafe for VisibleEntityRanges
impl Send for VisibleEntityRanges
impl Sync for VisibleEntityRanges
impl Unpin for VisibleEntityRanges
impl UnwindSafe for VisibleEntityRanges
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
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
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>
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>
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)
&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)
&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<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self
using data from the given World
.