Skip to main content

AnalyticInstanceUpload

Struct AnalyticInstanceUpload 

Source
pub struct AnalyticInstanceUpload { /* private fields */ }
Expand description

Immutable bounded analytic program evaluated into ordinary twelve-word primitives.

The seed identifies the keyed initial-state stream; initial facts are explicitly supplied rather than depending on a renderer’s random implementation. Time is age in seconds. Colors, sizes, images and blend policy remain in the ordinary super::InstanceUpload.

Implementations§

Source§

impl AnalyticInstanceUpload

Source

pub fn new( kind: AnalyticTrajectoryKind, seed: u64, age: f32, lifetime: f32, parameters: [f32; 8], primitive: InstanceKind, align_to_velocity: bool, states: impl ExactSizeIterator<Item = AnalyticInstanceState>, ) -> Result<Self, ValidationError>

Validates a model, explicit seed, age, lifetime, parameters and initial states.

Parameters use the builtin models’ eight-word schema: ballistic origin/acceleration/ damping/reserved/speed range; converge reserves them; orbit center/radius/angular velocity; noise drift origin/velocity/amplitude/frequency. Unsupported precision ranges fail explicitly, allowing a caller to retain evaluated CPU primitives.

Returns crate::ValidationErrorKind::Unsupported outside the portable f32 parameter and phase range, crate::ValidationErrorKind::InvalidValue for malformed inputs, and crate::ValidationErrorKind::StructuralLimit when upload allocation fails.

Source

pub fn len(&self) -> usize

Number of ordinary primitives produced by evaluation.

Source

pub fn is_empty(&self) -> bool

Whether this program has no initial states.

Source

pub fn bytes(&self) -> u64

Exact immutable upload size in bytes.

Source

pub fn words(&self) -> &[f32]

Version-one program words; seed and IDs are integer bit patterns.

Trait Implementations§

Source§

impl Clone for AnalyticInstanceUpload

Source§

fn clone(&self) -> Self

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 AnalyticInstanceUpload

Source§

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

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

impl PartialEq for AnalyticInstanceUpload

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for AnalyticInstanceUpload

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.