pub struct DataLayerSystem {
pub layers: HashMap<u32, DataLayer>,
pub next_id: u32,
pub active_layers: HashSet<u32>,
pub actor_layer_map: HashMap<u32, Vec<u32>>,
}Fields§
§layers: HashMap<u32, DataLayer>§next_id: u32§active_layers: HashSet<u32>§actor_layer_map: HashMap<u32, Vec<u32>>Implementations§
Source§impl DataLayerSystem
impl DataLayerSystem
pub fn new() -> Self
pub fn create_layer(&mut self, name: String) -> u32
pub fn delete_layer(&mut self, id: u32)
pub fn add_actor_to_layer(&mut self, layer_id: u32, actor_id: u32)
pub fn activate_layer(&mut self, id: u32)
pub fn deactivate_layer(&mut self, id: u32)
pub fn is_actor_visible(&self, actor_id: u32) -> bool
pub fn actors_in_active_layers(&self) -> Vec<u32>
pub fn compute_layer_bounds( &mut self, layer_id: u32, actor_positions: &HashMap<u32, Vec3>, )
pub fn layer_count(&self) -> usize
Trait Implementations§
Source§impl Clone for DataLayerSystem
impl Clone for DataLayerSystem
Auto Trait Implementations§
impl Freeze for DataLayerSystem
impl RefUnwindSafe for DataLayerSystem
impl Send for DataLayerSystem
impl Sync for DataLayerSystem
impl Unpin for DataLayerSystem
impl UnsafeUnpin for DataLayerSystem
impl UnwindSafe for DataLayerSystem
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.