[][src]Trait amethyst_animation::AnimationSampling

pub trait AnimationSampling: Send + Sync + 'static + for<'b> ApplyData<'b> {
    type Primitive: InterpolationPrimitive + Clone + Send + Sync + 'static;
    type Channel: Debug + Clone + Hash + Eq + Send + Sync + 'static;
    fn apply_sample<'a>(
        &mut self,
        channel: &Self::Channel,
        data: &Self::Primitive,
        extra: &Self::ApplyData
    );
fn current_sample<'a>(
        &self,
        channel: &Self::Channel,
        extra: &Self::ApplyData
    ) -> Self::Primitive;
fn default_primitive(channel: &Self::Channel) -> Self::Primitive;
fn blend_method(&self, channel: &Self::Channel) -> Option<BlendMethod>; }

Master trait used to define animation sampling on a component

Associated Types

type Primitive: InterpolationPrimitive + Clone + Send + Sync + 'static

The interpolation primitive

type Channel: Debug + Clone + Hash + Eq + Send + Sync + 'static

An independent grouping or type of functions that operate on attributes of a component

For example, translation, scaling and rotation are transformation channels independent of each other, even though they all mutate coordinates of a component.

Loading content...

Required methods

fn apply_sample<'a>(
    &mut self,
    channel: &Self::Channel,
    data: &Self::Primitive,
    extra: &Self::ApplyData
)

Apply a sample to a channel

fn current_sample<'a>(
    &self,
    channel: &Self::Channel,
    extra: &Self::ApplyData
) -> Self::Primitive

Get the current sample for a channel

fn default_primitive(channel: &Self::Channel) -> Self::Primitive

Get default primitive

fn blend_method(&self, channel: &Self::Channel) -> Option<BlendMethod>

Get blend config

Loading content...

Implementations on Foreign Types

impl AnimationSampling for Material[src]

type Primitive = MaterialPrimitive

type Channel = MaterialChannel

impl AnimationSampling for SpriteRender[src]

type Primitive = SpriteRenderPrimitive

type Channel = SpriteRenderChannel

impl AnimationSampling for Transform[src]

type Primitive = SamplerPrimitive<f32>

type Channel = TransformChannel

Loading content...

Implementors

Loading content...