pub struct AnimationChannel {
pub bone_id: BoneId,
pub target: ChannelTarget,
pub data: ChannelData,
}Expand description
A single keyframe track targeting one property of one bone.
Fields§
§bone_id: BoneId§target: ChannelTarget§data: ChannelDataImplementations§
Source§impl AnimationChannel
impl AnimationChannel
Sourcepub fn translation(bone_id: BoneId, keys: Vec<Vec3Key>) -> Self
pub fn translation(bone_id: BoneId, keys: Vec<Vec3Key>) -> Self
Create a translation channel.
Sourcepub fn blend_shape(
bone_id: BoneId,
shape_name: impl Into<String>,
keys: Vec<F32Key>,
) -> Self
pub fn blend_shape( bone_id: BoneId, shape_name: impl Into<String>, keys: Vec<F32Key>, ) -> Self
Create a blend-shape weight channel.
Sourcepub fn sample_translation(&self, t: f32) -> Option<Vec3>
pub fn sample_translation(&self, t: f32) -> Option<Vec3>
Sample the translation value at time t (seconds).
Sourcepub fn sample_rotation(&self, t: f32) -> Option<Quat>
pub fn sample_rotation(&self, t: f32) -> Option<Quat>
Sample the rotation value at time t (seconds).
Sourcepub fn sample_scale(&self, t: f32) -> Option<Vec3>
pub fn sample_scale(&self, t: f32) -> Option<Vec3>
Sample the scale value at time t (seconds).
Sourcepub fn sample_blend_shape(&self, t: f32) -> Option<f32>
pub fn sample_blend_shape(&self, t: f32) -> Option<f32>
Sample a blend-shape weight at time t (seconds).
Trait Implementations§
Source§impl Clone for AnimationChannel
impl Clone for AnimationChannel
Source§fn clone(&self) -> AnimationChannel
fn clone(&self) -> AnimationChannel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AnimationChannel
impl RefUnwindSafe for AnimationChannel
impl Send for AnimationChannel
impl Sync for AnimationChannel
impl Unpin for AnimationChannel
impl UnsafeUnpin for AnimationChannel
impl UnwindSafe for AnimationChannel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more