pub struct KeyFrames {
pub loop_time: Option<f32>,
pub interpolation: Interpolation,
pub times: Vec<f32>,
pub rotations: Option<Vec<Quaternion<f32>>>,
pub translations: Option<Vec<Vector3<f32>>>,
pub scales: Option<Vec<Vector3<f32>>>,
pub weights: Option<Vec<Vec<f32>>>,
}Expand description
Contains a set of key frames for rotations, translations, scales and morph weights.
Fields§
§loop_time: Option<f32>Optional time where the animation repeats itself.
interpolation: InterpolationThe type of interpolation used in between the key frames.
times: Vec<f32>The time value for each key frame.
rotations: Option<Vec<Quaternion<f32>>>The rotation for each key frame.
translations: Option<Vec<Vector3<f32>>>The rotation for each key frame.
scales: Option<Vec<Vector3<f32>>>The non uniform scale for each key frame.
weights: Option<Vec<Vec<f32>>>The morph weights for each key frame.
Implementations§
Source§impl KeyFrames
impl KeyFrames
Sourcepub fn rotation(&self, time: f32) -> Option<Quaternion<f32>>
pub fn rotation(&self, time: f32) -> Option<Quaternion<f32>>
The rotation at the specified time.
Sourcepub fn translation(&self, time: f32) -> Option<Vector3<f32>>
pub fn translation(&self, time: f32) -> Option<Vector3<f32>>
The translation at the specified time.
Sourcepub fn transformation(&self, time: f32) -> Matrix4<f32>
pub fn transformation(&self, time: f32) -> Matrix4<f32>
The transformation at the specified time.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyFrames
impl RefUnwindSafe for KeyFrames
impl Send for KeyFrames
impl Sync for KeyFrames
impl Unpin for KeyFrames
impl UnwindSafe for KeyFrames
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