pub struct ModelingToolContext2 {
pub editor: ModelEditor,
pub clipboard2: Vec<ModelParticle>,
pub clipboard_pivot: Vec3,
pub presets2: BTreeMap<String, BrushParams>,
pub spline2: Vec<Vec3>,
pub material_lib: MaterialLibrary,
pub group_mgr: GroupManager,
pub animations: HashMap<String, ModelAnimation>,
}Fields§
§editor: ModelEditor§clipboard2: Vec<ModelParticle>§clipboard_pivot: Vec3§presets2: BTreeMap<String, BrushParams>§spline2: Vec<Vec3>§material_lib: MaterialLibrary§group_mgr: GroupManager§animations: HashMap<String, ModelAnimation>Implementations§
Source§impl ModelingToolContext2
impl ModelingToolContext2
pub fn new() -> Self
pub fn copy_selection(&mut self)
pub fn paste_selection(&mut self, target: Vec3)
pub fn clipboard_count(&self) -> usize
pub fn add_animation(&mut self, name: impl Into<String>) -> String
pub fn play_animation(&mut self, name: &str, time: f32)
pub fn apply_material(&mut self, material_name: &str, light: Vec3, view: Vec3)
pub fn particle_count(&self) -> usize
pub fn add_spline_point(&mut self, p: Vec3)
pub fn clear_spline(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelingToolContext2
impl RefUnwindSafe for ModelingToolContext2
impl Send for ModelingToolContext2
impl Sync for ModelingToolContext2
impl Unpin for ModelingToolContext2
impl UnsafeUnpin for ModelingToolContext2
impl UnwindSafe for ModelingToolContext2
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> 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.