Trait libre_pvz_animation::curve::AnyCurve

source ·
pub trait AnyCurve: Send + Sync + 'static {
    // Required methods
    fn descriptor(&self) -> CurveDescriptor;
    fn get_frame_count(&self) -> usize;
    fn apply_sampled_any(
        &self,
        segment: Segment,
        frame: f32,
        blending: Option<(BlendMethod, f32)>,
        output: &mut dyn AnyComponent
    ) -> Result<(), String>;
}
Expand description

Type-erased Curve. Prefer Curve whenever possible.

Required Methods§

source

fn descriptor(&self) -> CurveDescriptor

Get a descriptor for this Curve.

source

fn get_frame_count(&self) -> usize

Delegate to Curve::frame_count.

source

fn apply_sampled_any( &self, segment: Segment, frame: f32, blending: Option<(BlendMethod, f32)>, output: &mut dyn AnyComponent ) -> Result<(), String>

Delegate to Curve::apply_sampled.

Implementors§

source§

impl<T: Curve> AnyCurve for T