pub struct ShapeInstance {Show 23 fields
pub instance: f64,
pub num_inst: f64,
pub sides: f64,
pub x: f64,
pub y: f64,
pub rad: f64,
pub ang: f64,
pub tex_zoom: f64,
pub tex_ang: f64,
pub r: f64,
pub g: f64,
pub b: f64,
pub a: f64,
pub r2: f64,
pub g2: f64,
pub b2: f64,
pub a2: f64,
pub border_r: f64,
pub border_g: f64,
pub border_b: f64,
pub border_a: f64,
pub thick: f64,
pub additive: f64,
}Expand description
One iteration of a custom-shape (shapecode_N) per-instance loop.
MD2 shape per-frame equations can mutate any of these fields and the
next instance’s loop body sees the seed values fresh from the
preset’s scalar block — instances do NOT carry state across each
other (unlike WavePoint). Persistent state across instances lives
in q* / t* channels.
instance is the 0-based loop counter; the eval seeds it (and
sides + num_inst) into the context before each call so equations
like ang = ang + 0.1 * instance work.
Fields§
§instance: f64§num_inst: f64§sides: f64§x: f64§y: f64§rad: f64§ang: f64§tex_zoom: f64§tex_ang: f64§r: f64§g: f64§b: f64§a: f64§r2: f64§g2: f64§b2: f64§a2: f64§border_r: f64§border_g: f64§border_b: f64§border_a: f64§thick: f64MD2 thick flag (drawn as bool, kept f64 to round-trip via the
eval context with no extra conversions). 0 = thin outline, 1 = thick.
additive: f64MD2 additive flag (0 = alpha blend, 1 = additive).
Trait Implementations§
Source§impl Clone for ShapeInstance
impl Clone for ShapeInstance
Source§fn clone(&self) -> ShapeInstance
fn clone(&self) -> ShapeInstance
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShapeInstance
impl Debug for ShapeInstance
Source§impl Default for ShapeInstance
impl Default for ShapeInstance
Source§impl PartialEq for ShapeInstance
impl PartialEq for ShapeInstance
impl Copy for ShapeInstance
impl StructuralPartialEq for ShapeInstance
Auto Trait Implementations§
impl Freeze for ShapeInstance
impl RefUnwindSafe for ShapeInstance
impl Send for ShapeInstance
impl Sync for ShapeInstance
impl Unpin for ShapeInstance
impl UnwindSafe for ShapeInstance
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