pub struct Uncompressed { /* private fields */ }Expand description
Uncompressed animation asset (r3d2anmd format)
Supports versions 3 (legacy), 4, and 5. Uses palette-based storage where frames reference indices into shared vector and quaternion arrays.
Implementations§
Source§impl Uncompressed
impl Uncompressed
Source§impl Uncompressed
impl Uncompressed
Source§impl Uncompressed
impl Uncompressed
Sourcepub fn new(
fps: f32,
vector_palette: Vec<Vec3>,
quat_palette: Vec<Quat>,
joint_frames: HashMap<u32, Vec<UncompressedFrame>>,
) -> Self
pub fn new( fps: f32, vector_palette: Vec<Vec3>, quat_palette: Vec<Quat>, joint_frames: HashMap<u32, Vec<UncompressedFrame>>, ) -> Self
Creates a new uncompressed animation
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Returns the total number of frames
Sourcepub fn vector_palette(&self) -> &[Vec3]
pub fn vector_palette(&self) -> &[Vec3]
Returns the vector palette (translations and scales)
Sourcepub fn quat_palette(&self) -> &[Quat]
pub fn quat_palette(&self) -> &[Quat]
Returns the quaternion palette (rotations)
Sourcepub fn joint_frames(&self) -> &HashMap<u32, Vec<UncompressedFrame>>
pub fn joint_frames(&self) -> &HashMap<u32, Vec<UncompressedFrame>>
Returns the joint frames map
Sourcepub fn joint_hashes(&self) -> impl Iterator<Item = &u32>
pub fn joint_hashes(&self) -> impl Iterator<Item = &u32>
Returns the joint hashes
Sourcepub fn get_joint_frames(&self, joint_hash: u32) -> Option<&[UncompressedFrame]>
pub fn get_joint_frames(&self, joint_hash: u32) -> Option<&[UncompressedFrame]>
Gets the frame data for a specific joint
Sourcepub fn evaluate_frame(
&self,
joint_hash: u32,
frame_id: usize,
) -> Option<(Quat, Vec3, Vec3)>
pub fn evaluate_frame( &self, joint_hash: u32, frame_id: usize, ) -> Option<(Quat, Vec3, Vec3)>
Evaluates the animation at the given frame index for a joint
Sourcepub fn joint_count(&self) -> usize
pub fn joint_count(&self) -> usize
Returns the number of joints in the animation
Trait Implementations§
Source§impl Animation for Uncompressed
impl Animation for Uncompressed
Source§fn joint_count(&self) -> usize
fn joint_count(&self) -> usize
Returns the number of joints in the animation
Source§impl Clone for Uncompressed
impl Clone for Uncompressed
Source§fn clone(&self) -> Uncompressed
fn clone(&self) -> Uncompressed
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 moreSource§impl Debug for Uncompressed
impl Debug for Uncompressed
Source§impl From<Uncompressed> for AnimationAsset
impl From<Uncompressed> for AnimationAsset
Source§fn from(val: Uncompressed) -> Self
fn from(val: Uncompressed) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Uncompressed
impl RefUnwindSafe for Uncompressed
impl Send for Uncompressed
impl Sync for Uncompressed
impl Unpin for Uncompressed
impl UnsafeUnpin for Uncompressed
impl UnwindSafe for Uncompressed
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