ShapeInstance

Struct ShapeInstance 

Source
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: f64

MD2 thick flag (drawn as bool, kept f64 to round-trip via the eval context with no extra conversions). 0 = thin outline, 1 = thick.

§additive: f64

MD2 additive flag (0 = alpha blend, 1 = additive).

Trait Implementations§

Source§

impl Clone for ShapeInstance

Source§

fn clone(&self) -> ShapeInstance

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ShapeInstance

Source§

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

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

impl Default for ShapeInstance

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for ShapeInstance

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 ShapeInstance

Source§

impl StructuralPartialEq for ShapeInstance

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
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.