pub struct SculptEngine;Implementations§
Source§impl SculptEngine
impl SculptEngine
Sourcepub fn apply_add(
model: &mut ParticleModel,
hit_pos: Vec3,
surface_normal: Vec3,
params: &BrushParams,
character: char,
color: Vec4,
symmetry: &SymmetryMode,
)
pub fn apply_add( model: &mut ParticleModel, hit_pos: Vec3, surface_normal: Vec3, params: &BrushParams, character: char, color: Vec4, symmetry: &SymmetryMode, )
Add particles at hit_pos using Poisson disk sampling within brush footprint.
Sourcepub fn poisson_disk_sample_disk(
center: Vec3,
normal: Vec3,
radius: f32,
density: f32,
) -> Vec<Vec3>
pub fn poisson_disk_sample_disk( center: Vec3, normal: Vec3, radius: f32, density: f32, ) -> Vec<Vec3>
Poisson disk sampling on a disk surface.
Sourcepub fn apply_remove(
model: &mut ParticleModel,
hit_pos: Vec3,
params: &BrushParams,
symmetry: &SymmetryMode,
)
pub fn apply_remove( model: &mut ParticleModel, hit_pos: Vec3, params: &BrushParams, symmetry: &SymmetryMode, )
Remove particles within brush radius using smooth falloff.
Sourcepub fn apply_smooth(
model: &mut ParticleModel,
hit_pos: Vec3,
params: &BrushParams,
)
pub fn apply_smooth( model: &mut ParticleModel, hit_pos: Vec3, params: &BrushParams, )
Smooth: Laplacian smoothing — move each particle toward neighborhood centroid.
Sourcepub fn apply_inflate(
model: &mut ParticleModel,
hit_pos: Vec3,
params: &BrushParams,
)
pub fn apply_inflate( model: &mut ParticleModel, hit_pos: Vec3, params: &BrushParams, )
Inflate: move particles outward along average normal.
Sourcepub fn apply_pinch(
model: &mut ParticleModel,
hit_pos: Vec3,
params: &BrushParams,
)
pub fn apply_pinch( model: &mut ParticleModel, hit_pos: Vec3, params: &BrushParams, )
Pinch: attract particles toward brush center.
Sourcepub fn apply_color(
model: &mut ParticleModel,
hit_pos: Vec3,
params: &BrushParams,
)
pub fn apply_color( model: &mut ParticleModel, hit_pos: Vec3, params: &BrushParams, )
Color brush: paint color onto particles with falloff.
Sourcepub fn apply_char(
model: &mut ParticleModel,
hit_pos: Vec3,
params: &BrushParams,
)
pub fn apply_char( model: &mut ParticleModel, hit_pos: Vec3, params: &BrushParams, )
Char brush: replace glyph within radius.
Sourcepub fn apply_flatten(
model: &mut ParticleModel,
hit_pos: Vec3,
params: &BrushParams,
)
pub fn apply_flatten( model: &mut ParticleModel, hit_pos: Vec3, params: &BrushParams, )
Flatten: project particles onto best-fit plane. Uses PCA via covariance matrix to find the plane normal.
Sourcepub fn apply_crease(
model: &mut ParticleModel,
hit_pos: Vec3,
params: &BrushParams,
)
pub fn apply_crease( model: &mut ParticleModel, hit_pos: Vec3, params: &BrushParams, )
Crease: push particles toward nearest crease line.
Sourcepub fn apply_clone(
model: &mut ParticleModel,
source_pos: Vec3,
target_pos: Vec3,
params: &BrushParams,
)
pub fn apply_clone( model: &mut ParticleModel, source_pos: Vec3, target_pos: Vec3, params: &BrushParams, )
Clone brush: stamp particles from source area to target area.
Auto Trait Implementations§
impl Freeze for SculptEngine
impl RefUnwindSafe for SculptEngine
impl Send for SculptEngine
impl Sync for SculptEngine
impl Unpin for SculptEngine
impl UnsafeUnpin for SculptEngine
impl UnwindSafe for SculptEngine
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.