pub struct GridSystem { /* private fields */ }Implementations§
Source§impl GridSystem
impl GridSystem
pub const DEFAULT_EDITOR_GRID_SIZE_X: u32 = 8192
pub const DEFAULT_EDITOR_GRID_SIZE_Z: u32 = 8192
pub const DEFAULT_EDITOR_GRID_SPACING: f32 = 1.0
pub fn new() -> Self
pub fn install_handlers(&self, rx: &mut RxWorld)
pub fn mark_dirty(&self)
pub fn grid_owner_transform( world: &World, grid_component: ComponentId, ) -> Option<ComponentId>
pub fn active_grid_for_editor( &self, world: &World, editor_root: ComponentId, ) -> Option<ActiveGrid>
pub fn selected_grid_for_editor( &self, world: &World, editor_root: ComponentId, ) -> Option<GridEntry>
pub fn enumerate_grids_for_editor( &self, world: &World, editor_root: ComponentId, ) -> Vec<GridEntry>
pub fn grid_owned_by_transform( &self, world: &World, transform: ComponentId, ) -> Option<GridEntry>
pub fn active_grid_for_owner_transform( &self, world: &World, owner_transform: ComponentId, ) -> Option<ActiveGrid>
pub fn grid_entry( &self, world: &World, grid_component: ComponentId, ) -> Option<GridEntry>
pub fn grid_hit_context_for_renderable( &self, world: &World, renderable: ComponentId, ) -> Option<ActiveGrid>
pub fn grid_component_for_renderable( &self, world: &World, renderable: ComponentId, ) -> Option<ComponentId>
pub fn grid_owner_from_renderable( &self, world: &World, renderable: ComponentId, ) -> Option<ComponentId>
pub fn snap_hit( active: &ActiveGrid, hit_point_world: [f32; 3], ) -> GridSnapResult
pub fn snap_point_preserving_plane_offset( active: &ActiveGrid, point_world: [f32; 3], ) -> GridSnapResult
pub fn same_step(a: Option<GridStep>, b: GridStep) -> bool
pub fn ensure_default_grid( &self, world: &mut World, emit: &mut dyn SignalEmitter, editor_root: ComponentId, ) -> ComponentId
pub fn spawn_grid_for_editor( &self, world: &mut World, emit: &mut dyn SignalEmitter, editor_root: ComponentId, spec: GridSpawnSpec, ) -> ComponentId
pub fn set_grid_enabled( &self, world: &mut World, emit: &mut dyn SignalEmitter, owner_transform: ComponentId, enabled: bool, ) -> bool
pub fn toggle_grid_enabled( &self, world: &mut World, emit: &mut dyn SignalEmitter, owner_transform: ComponentId, ) -> bool
pub fn delete_grid( &self, world: &mut World, emit: &mut dyn SignalEmitter, owner_transform: ComponentId, ) -> bool
Trait Implementations§
Source§impl Clone for GridSystem
impl Clone for GridSystem
Source§fn clone(&self) -> GridSystem
fn clone(&self) -> GridSystem
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GridSystem
impl Debug for GridSystem
Source§impl Default for GridSystem
impl Default for GridSystem
Source§fn default() -> GridSystem
fn default() -> GridSystem
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GridSystem
impl RefUnwindSafe for GridSystem
impl Send for GridSystem
impl Sync for GridSystem
impl Unpin for GridSystem
impl UnsafeUnpin for GridSystem
impl UnwindSafe for GridSystem
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> 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.