[−][src]Trait amethyst_animation::AnimationSampling
Master trait used to define animation sampling on a component
Associated Types
type Primitive: InterpolationPrimitive + Debug + 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.
Required methods
fn apply_sample<'a>(
&mut self,
channel: &Self::Channel,
data: &Self::Primitive,
extra: &Self::ApplyData
)
&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
&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
Implementations on Foreign Types
impl AnimationSampling for Material
[src]
type Primitive = MaterialPrimitive
type Channel = MaterialChannel
fn apply_sample(
&mut self,
channel: &Self::Channel,
data: &Self::Primitive,
_: &()
)
[src]
&mut self,
channel: &Self::Channel,
data: &Self::Primitive,
_: &()
)
fn current_sample(&self, channel: &Self::Channel, _: &()) -> Self::Primitive
[src]
fn default_primitive(_: &Self::Channel) -> Self::Primitive
[src]
fn blend_method(&self, _: &Self::Channel) -> Option<BlendMethod>
[src]
impl AnimationSampling for SpriteRender
[src]
type Primitive = SpriteRenderPrimitive
type Channel = SpriteRenderChannel
fn apply_sample(
&mut self,
channel: &Self::Channel,
data: &Self::Primitive,
_: &()
)
[src]
&mut self,
channel: &Self::Channel,
data: &Self::Primitive,
_: &()
)
fn current_sample(&self, channel: &Self::Channel, _: &()) -> Self::Primitive
[src]
fn default_primitive(_: &Self::Channel) -> Self::Primitive
[src]
fn blend_method(&self, _: &Self::Channel) -> Option<BlendMethod>
[src]
impl AnimationSampling for Transform
[src]
type Primitive = SamplerPrimitive<f32>
type Channel = TransformChannel
fn apply_sample(
&mut self,
channel: &Self::Channel,
data: &SamplerPrimitive<f32>,
_: &()
)
[src]
&mut self,
channel: &Self::Channel,
data: &SamplerPrimitive<f32>,
_: &()
)
fn current_sample(
&self,
channel: &Self::Channel,
_: &()
) -> SamplerPrimitive<f32>
[src]
&self,
channel: &Self::Channel,
_: &()
) -> SamplerPrimitive<f32>