pub struct PrimitiveBuilder;Implementations§
Source§impl PrimitiveBuilder
impl PrimitiveBuilder
Sourcepub fn sphere(
center: Vec3,
radius: f32,
n: usize,
character: char,
color: Vec4,
) -> Vec<ModelParticle>
pub fn sphere( center: Vec3, radius: f32, n: usize, character: char, color: Vec4, ) -> Vec<ModelParticle>
Fibonacci sphere — uniform distribution of N points on a sphere surface.
Sourcepub fn cube(
center: Vec3,
half_size: Vec3,
particles_per_face: usize,
fill_interior: bool,
character: char,
color: Vec4,
) -> Vec<ModelParticle>
pub fn cube( center: Vec3, half_size: Vec3, particles_per_face: usize, fill_interior: bool, character: char, color: Vec4, ) -> Vec<ModelParticle>
Cube — particles on 6 faces, with optional interior fill.
Sourcepub fn cylinder(
center: Vec3,
radius: f32,
height: f32,
segments: usize,
bands: usize,
character: char,
color: Vec4,
) -> Vec<ModelParticle>
pub fn cylinder( center: Vec3, radius: f32, height: f32, segments: usize, bands: usize, character: char, color: Vec4, ) -> Vec<ModelParticle>
Cylinder — circular bands + caps.
Sourcepub fn cone(
apex: Vec3,
base_center: Vec3,
base_radius: f32,
segments: usize,
bands: usize,
character: char,
color: Vec4,
) -> Vec<ModelParticle>
pub fn cone( apex: Vec3, base_center: Vec3, base_radius: f32, segments: usize, bands: usize, character: char, color: Vec4, ) -> Vec<ModelParticle>
Cone.
Sourcepub fn torus(
center: Vec3,
major_radius: f32,
minor_radius: f32,
u_segments: usize,
v_segments: usize,
character: char,
color: Vec4,
) -> Vec<ModelParticle>
pub fn torus( center: Vec3, major_radius: f32, minor_radius: f32, u_segments: usize, v_segments: usize, character: char, color: Vec4, ) -> Vec<ModelParticle>
Torus — parametric surface: (R + r*cos(v)) * cos(u), etc.
Sourcepub fn plane(
center: Vec3,
width: f32,
depth: f32,
cols: usize,
rows: usize,
noise_scale: f32,
noise_amplitude: f32,
character: char,
color: Vec4,
) -> Vec<ModelParticle>
pub fn plane( center: Vec3, width: f32, depth: f32, cols: usize, rows: usize, noise_scale: f32, noise_amplitude: f32, character: char, color: Vec4, ) -> Vec<ModelParticle>
Plane — grid of particles with optional Perlin-like noise displacement.
Sourcepub fn text3d(
text: &str,
origin: Vec3,
char_width: f32,
char_height: f32,
depth: f32,
particles_per_char: usize,
character: char,
color: Vec4,
) -> Vec<ModelParticle>
pub fn text3d( text: &str, origin: Vec3, char_width: f32, char_height: f32, depth: f32, particles_per_char: usize, character: char, color: Vec4, ) -> Vec<ModelParticle>
Text3D — extrude ASCII characters into 3D particle slabs.
Sourcepub fn point_cloud(
points: Vec<Vec3>,
character: char,
color_low: Vec4,
color_high: Vec4,
) -> Vec<ModelParticle>
pub fn point_cloud( points: Vec<Vec3>, character: char, color_low: Vec4, color_high: Vec4, ) -> Vec<ModelParticle>
PointCloud — import from Vec
Auto Trait Implementations§
impl Freeze for PrimitiveBuilder
impl RefUnwindSafe for PrimitiveBuilder
impl Send for PrimitiveBuilder
impl Sync for PrimitiveBuilder
impl Unpin for PrimitiveBuilder
impl UnsafeUnpin for PrimitiveBuilder
impl UnwindSafe for PrimitiveBuilder
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.