pub struct Formation {
pub positions: Vec<Vec3>,
pub chars: Vec<char>,
}Expand description
A formation: a list of 3D offsets from the entity center with per-slot characters.
Fields§
§positions: Vec<Vec3>§chars: Vec<char>Implementations§
Source§impl Formation
impl Formation
Sourcepub fn rings(spec: &[(usize, f32)]) -> Self
pub fn rings(spec: &[(usize, f32)]) -> Self
Concentric rings. Each entry is (glyph_count, radius).
Sourcepub fn diamond(size: i32) -> Self
pub fn diamond(size: i32) -> Self
Diamond shape (all integer (x,y) within Manhattan distance ≤ size).
Sourcepub fn cross(arm_length: i32) -> Self
pub fn cross(arm_length: i32) -> Self
Cross / plus sign with arm_length glyphs per arm (center + 4 arms).
Sourcepub fn star(points: usize, inner_r: f32, outer_r: f32) -> Self
pub fn star(points: usize, inner_r: f32, outer_r: f32) -> Self
N-pointed star with inner_r and outer_r radii.
Sourcepub fn hex_cluster(radius: f32) -> Self
pub fn hex_cluster(radius: f32) -> Self
Hexagonal close-pack: all hex centers within radius.
Sourcepub fn fibonacci_spiral(n: usize, scale: f32) -> Self
pub fn fibonacci_spiral(n: usize, scale: f32) -> Self
Fibonacci (golden-ratio) phyllotaxis spiral — N points.
Sourcepub fn dna_helix(height: f32, turns: f32, n: usize) -> Self
pub fn dna_helix(height: f32, turns: f32, n: usize) -> Self
Double helix (DNA-like): two interleaved spirals winding vertically.
Sourcepub fn lissajous(n: usize, a: f32, b: f32, delta: f32, scale: f32) -> Self
pub fn lissajous(n: usize, a: f32, b: f32, delta: f32, scale: f32) -> Self
Lissajous figure: parametric (sin(a·t+δ), sin(b·t)) for n points.
Sourcepub fn lorenz_trace(n: usize, scale: f32) -> Self
pub fn lorenz_trace(n: usize, scale: f32) -> Self
Lorenz attractor sample: step the attractor n times and record positions.
Sourcepub fn arrow(length: usize, direction: Vec3) -> Self
pub fn arrow(length: usize, direction: Vec3) -> Self
Arrow pointing in a direction (normalized), length glyphs long.
Sourcepub fn scatter(n: usize, radius: f32, seed: u64) -> Self
pub fn scatter(n: usize, radius: f32, seed: u64) -> Self
Random scatter within radius, seeded for reproducibility.
Sourcepub fn rune_sigma() -> Self
pub fn rune_sigma() -> Self
Rune: Sigma / S-curve.
Sourcepub fn rune_infinity() -> Self
pub fn rune_infinity() -> Self
Rune: Infinity / ∞ shape.
Sourcepub fn rune_chaos() -> Self
pub fn rune_chaos() -> Self
Rune: Chaos — a 3-armed triskelion.
Sourcepub fn sierpinski(depth: u32, size: f32) -> Self
pub fn sierpinski(depth: u32, size: f32) -> Self
Boss formation: Sierpinski triangle approximation (2 levels deep).
Sourcepub fn mandala(layers: usize, base_n: usize, base_r: f32) -> Self
pub fn mandala(layers: usize, base_n: usize, base_r: f32) -> Self
Boss formation: Mandala (multiple concentric rings with rotational symmetry).
Sourcepub fn rotated_z(self, angle: f32) -> Self
pub fn rotated_z(self, angle: f32) -> Self
Rotate the entire formation around the Z axis by angle radians.
Sourcepub fn translated(self, offset: Vec3) -> Self
pub fn translated(self, offset: Vec3) -> Self
Translate all positions by an offset.
Sourcepub fn mirrored_x(self) -> Self
pub fn mirrored_x(self) -> Self
Reflect across the Y axis (mirror left-right).
Sourcepub fn bounding_radius(&self) -> f32
pub fn bounding_radius(&self) -> f32
Compute bounding radius (max distance from centroid).
Sourcepub fn normalized(self) -> Self
pub fn normalized(self) -> Self
Normalize so bounding_radius == 1.0.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Formation
impl RefUnwindSafe for Formation
impl Send for Formation
impl Sync for Formation
impl Unpin for Formation
impl UnsafeUnpin for Formation
impl UnwindSafe for Formation
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,
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.