pub struct SelectionSystem {
pub selected: HashSet<usize>,
pub named_sets: HashMap<String, HashSet<usize>>,
}Fields§
§selected: HashSet<usize>§named_sets: HashMap<String, HashSet<usize>>Implementations§
Source§impl SelectionSystem
impl SelectionSystem
pub fn new() -> Self
pub fn clear(&mut self)
pub fn select_all(&mut self, count: usize)
pub fn invert(&mut self, total: usize)
pub fn add(&mut self, idx: usize)
pub fn remove(&mut self, idx: usize)
pub fn toggle(&mut self, idx: usize)
pub fn box_select( &mut self, particles: &[ModelParticle], aabb: &Aabb3, add: bool, )
pub fn sphere_select( &mut self, particles: &[ModelParticle], center: Vec3, radius: f32, add: bool, )
pub fn paint_select( &mut self, particles: &[ModelParticle], ray: &Ray3, radius: f32, add: bool, )
pub fn select_by_group( &mut self, particles: &[ModelParticle], group_id: u32, add: bool, )
pub fn select_by_char( &mut self, particles: &[ModelParticle], ch: char, add: bool, )
Sourcepub fn select_by_color_range(
&mut self,
particles: &[ModelParticle],
target_color: Vec4,
tolerance: f32,
add: bool,
)
pub fn select_by_color_range( &mut self, particles: &[ModelParticle], target_color: Vec4, tolerance: f32, add: bool, )
HSV distance based color selection.
Sourcepub fn grow(&mut self, particles: &[ModelParticle], radius: f32)
pub fn grow(&mut self, particles: &[ModelParticle], radius: f32)
Grow selection: add particles adjacent (within radius) to current selection.
Sourcepub fn shrink(&mut self, particles: &[ModelParticle], radius: f32)
pub fn shrink(&mut self, particles: &[ModelParticle], radius: f32)
Shrink selection: remove boundary particles (those with non-selected neighbors).
pub fn save_named_set(&mut self, name: impl Into<String>)
pub fn load_named_set(&mut self, name: &str)
pub fn union_named_set(&mut self, name: &str)
Trait Implementations§
Source§impl Clone for SelectionSystem
impl Clone for SelectionSystem
Source§impl Debug for SelectionSystem
impl Debug for SelectionSystem
Auto Trait Implementations§
impl Freeze for SelectionSystem
impl RefUnwindSafe for SelectionSystem
impl Send for SelectionSystem
impl Sync for SelectionSystem
impl Unpin for SelectionSystem
impl UnsafeUnpin for SelectionSystem
impl UnwindSafe for SelectionSystem
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.