pub enum Modifier {
Show 14 variants
Array {
enabled: bool,
count: i32,
offset: Vec3,
rotation: Vec3,
scale: f32,
},
Mirror {
enabled: bool,
x: bool,
y: bool,
z: bool,
},
Subdivide {
enabled: bool,
levels: i32,
smooth: f32,
},
Displace {
enabled: bool,
strength: f32,
scale: f32,
seed: i32,
},
Twist {
enabled: bool,
angle: f32,
axis: ModAxis,
},
Bend {
enabled: bool,
angle: f32,
axis: ModAxis,
},
Taper {
enabled: bool,
amount: f32,
axis: ModAxis,
},
Solidify {
enabled: bool,
thickness: f32,
},
Wave {
enabled: bool,
amplitude: f32,
wavelength: f32,
axis: ModAxis,
phase: f32,
},
Cast {
enabled: bool,
factor: f32,
},
Shear {
enabled: bool,
amount: f32,
axis: ModAxis,
},
Smooth {
enabled: bool,
iterations: i32,
factor: f32,
},
Jitter {
enabled: bool,
amount: f32,
seed: i32,
},
RadialArray {
enabled: bool,
count: i32,
radius: f32,
axis: ModAxis,
face_outward: bool,
},
}Expand description
One entry of the stack. Fields are public so scripts can build stacks in code.
Variants§
Array
Repeats the mesh count times, each copy moved, rotated and scaled relative to the previous one.
Fields
Mirror
Adds mirrored copies across the chosen local planes.
Fields
Subdivide
Splits every triangle into four, levels times (more vertices for Displace / Bend).
Fields
Displace
Pushes vertices along their normals by noise.
Fields
Twist
Rotates slices of the mesh progressively around an axis (a screw / wring).
Fields
Bend
Curves the mesh along an axis.
Fields
Taper
Scales the cross-section along an axis: pointed or flared shapes.
Fields
Solidify
Gives surfaces thickness by adding an inner shell.
Wave
Ripples the surface like a flag or water: a sine wave along one axis lifts the vertices.
Fields
Cast
Pulls vertices towards a sphere (or pushes them away): turns boxes into balls.
Fields
Shear
Slants the mesh: the further along the axis, the more it leans sideways.
Fields
Smooth
Averages every vertex with its neighbours: rounds off hard edges and noise.
Fields
Jitter
Random push of every vertex: rough stone, crumpled paper, broken glass.
Fields
RadialArray
Copies the mesh around a circle (columns of a temple, a fence ring, a wheel of spokes).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Modifier
impl<'de> Deserialize<'de> for Modifier
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Modifier
Auto Trait Implementations§
impl Freeze for Modifier
impl RefUnwindSafe for Modifier
impl Send for Modifier
impl Sync for Modifier
impl Unpin for Modifier
impl UnsafeUnpin for Modifier
impl UnwindSafe for Modifier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSync for T
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.