pub struct VoxelChunkCommands<'world, 'state, 'cmd_ref> { /* private fields */ }Expand description
A Bevy command queue helper for working with Voxel chunk-based actions.
Implementations§
Source§impl<'world, 'state, 'cmd_ref> VoxelChunkCommands<'world, 'state, 'cmd_ref>
impl<'world, 'state, 'cmd_ref> VoxelChunkCommands<'world, 'state, 'cmd_ref>
Sourcepub fn despawn(self)
pub fn despawn(self)
Despawns this chunk and all child entities attached to it, recursively.
This method will also update the internal chunk pointer cache of the voxel world to reflect the changes.
Sourcepub fn as_entity_commands(self) -> EntityCommands<'world, 'state, 'cmd_ref>
pub fn as_entity_commands(self) -> EntityCommands<'world, 'state, 'cmd_ref>
Gets the entity command queue for this voxel chunk object.
Sourcepub fn as_world_commands(self) -> VoxelWorldCommands<'world, 'state, 'cmd_ref>
pub fn as_world_commands(self) -> VoxelWorldCommands<'world, 'state, 'cmd_ref>
Gets the voxel world command queue for the world that this chunk is in.
Sourcepub fn world_id(&self) -> Entity
pub fn world_id(&self) -> Entity
Gets the id of the world that the chunk being handled is apart of.
Sourcepub fn chunk_coords(&self) -> IVec3
pub fn chunk_coords(&self) -> IVec3
Gets the coordinates of the chunk being handled.
Auto Trait Implementations§
impl<'world, 'state, 'cmd_ref> Freeze for VoxelChunkCommands<'world, 'state, 'cmd_ref>
impl<'world, 'state, 'cmd_ref> !RefUnwindSafe for VoxelChunkCommands<'world, 'state, 'cmd_ref>
impl<'world, 'state, 'cmd_ref> Send for VoxelChunkCommands<'world, 'state, 'cmd_ref>
impl<'world, 'state, 'cmd_ref> Sync for VoxelChunkCommands<'world, 'state, 'cmd_ref>
impl<'world, 'state, 'cmd_ref> Unpin for VoxelChunkCommands<'world, 'state, 'cmd_ref>
impl<'world, 'state, 'cmd_ref> !UnwindSafe for VoxelChunkCommands<'world, 'state, 'cmd_ref>
Blanket Implementations§
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<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.