Skip to main content

SystemKind

Enum SystemKind 

Source
pub enum SystemKind {
    FragmentField,
    Swarm,
    ParametricCurve,
    LSystem,
    StarPattern,
    ReactionDiffusion,
    Attractor,
    Spectrum,
    ShapeField,
    Emitter,
    WarpMesh,
    ShapeCollage,
}
Expand description

The built-in system a preset drives. Extend as Plan 0003 (and later plans) add systems; unknown names are rejected at load.

Variants§

§

FragmentField

The fullscreen fragment-field scene.

§

Swarm

The CPU particle-swarm scene.

§

ParametricCurve

The parametric line-curve scene (Maurer rose, …) — ADR-0007.

§

LSystem

The L-system generator scene — ADR-0007.

§

StarPattern

The Hankin star-pattern generator scene — ADR-0007.

§

ReactionDiffusion

The Gray-Scott reaction-diffusion feedback scene — ADR-0012.

§

Attractor

The GPU compute-particle strange-attractor scene — ADR-0015.

§

Spectrum

The N-element spectrum readout — ADR-0036. A line scene like the three above (it draws through the same shared renderer), driven by the analysis frame’s log-spaced band array rather than by a generator.

§

ShapeField

The mark roster drawn at frame scale as a signed-distance field — ADR-0105. The one scene whose palette coordinate is a distance, which is what makes palette_steps draw concentric offset contours of a shape.

§

Emitter

The ballistic emitter — objects that spawn, fall on a parabola and die (ADR-0057). The first scene whose population is not fixed.

§

WarpMesh

The warp mesh — a per-vertex UV grid that resamples the previous frame (ADR-0113). Generalizes ADR-0048’s single shared feedback transform to one transform per vertex, driven by a [per_vertex] table.

§

ShapeCollage

Flat opaque elements painted on their own paper, composited in painter order in one fullscreen distance-field pass (ADR-0123). The engine’s first graphic world rather than a luminous one: the only system in which one object is genuinely in front of another.

Implementations§

Source§

impl SystemKind

Source

pub const VARIANT_COUNT: usize = 12

How many variants SystemKind has. Kept honest by row: a new variant fails the build there until it is rostered, and TABLE is typed off this count, so bumping the count without adding a row does not compile either. Both are module-private, so this names them rather than linking them.

Source

pub const ALL: [SystemKind; 12]

Every SystemKind, in the order the engine builds their scenes. The scene factory (render::scenes::create_all) and the golden drift guard both iterate this rather than keeping lists of their own.

Typed [SystemKind; VARIANT_COUNT], so a roster that has drifted from the variant count is a compile error, not a test failure.

Source

pub fn from_name(name: &str) -> Option<Self>

Parse a canonical system name (as written in a preset’s system = "..." field) into its SystemKind, or None if unknown. The inverse of SystemKind::as_str; the shot CLI reuses the pair so it declares no match of its own.

Source

pub fn as_str(self) -> &'static str

The canonical name of this system – the exact string SystemKind::from_name accepts and a preset writes in its system field.

Source

pub fn param_specs(self) -> &'static [ParamSpec]

The parameters this system’s scene consumes, as the scene declares them (the module-private TABLE).

The specs carry the default and the doc line as well as the name (ADR-0170), which is what lets the generated reference in presets/README.md be derived from the same declaration the loader checks a binding against.

Source

pub fn param_names(self) -> Vec<&'static str>

Just the names, for a caller that wants to print or join them.

Allocates. Use declares for a membership test, which is what almost every caller actually wants.

Trait Implementations§

Source§

impl Clone for SystemKind

Source§

fn clone(&self) -> SystemKind

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SystemKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for SystemKind

Source§

fn eq(&self, other: &SystemKind) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for SystemKind

Source§

impl Eq for SystemKind

Source§

impl StructuralPartialEq for SystemKind

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,