Trait amethyst_animation::AnimationSampling [−][src]
pub trait AnimationSampling: Send + Sync + 'static + for<'b> ApplyData<'b> { type Primitive: InterpolationPrimitive + Clone + Copy + 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 + Copy + 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]
impl AnimationSampling for Materialtype Primitive = MaterialPrimitive
type Channel = MaterialChannel
fn apply_sample(
&mut self,
channel: &Self::Channel,
data: &Self::Primitive,
extra: &Read<MaterialTextureSet>
)[src]
fn apply_sample(
&mut self,
channel: &Self::Channel,
data: &Self::Primitive,
extra: &Read<MaterialTextureSet>
)fn current_sample(
&self,
channel: &Self::Channel,
extra: &Read<MaterialTextureSet>
) -> Self::Primitive[src]
fn current_sample(
&self,
channel: &Self::Channel,
extra: &Read<MaterialTextureSet>
) -> Self::Primitivefn default_primitive(_: &Self::Channel) -> Self::Primitive[src]
fn default_primitive(_: &Self::Channel) -> Self::Primitivefn blend_method(&self, _: &Self::Channel) -> Option<BlendMethod>[src]
fn blend_method(&self, _: &Self::Channel) -> Option<BlendMethod>impl AnimationSampling for Transform[src]
impl AnimationSampling for Transformtype Primitive = SamplerPrimitive<f32>
type Channel = TransformChannel
fn apply_sample(
&mut self,
channel: &Self::Channel,
data: &SamplerPrimitive<f32>,
_: &()
)[src]
fn apply_sample(
&mut self,
channel: &Self::Channel,
data: &SamplerPrimitive<f32>,
_: &()
)fn current_sample(
&self,
channel: &Self::Channel,
_: &()
) -> SamplerPrimitive<f32>[src]
fn current_sample(
&self,
channel: &Self::Channel,
_: &()
) -> SamplerPrimitive<f32>fn default_primitive(channel: &Self::Channel) -> Self::Primitive[src]
fn default_primitive(channel: &Self::Channel) -> Self::Primitivefn blend_method(&self, _: &Self::Channel) -> Option<BlendMethod>[src]
fn blend_method(&self, _: &Self::Channel) -> Option<BlendMethod>