pub struct AnimFile {
pub format: AnimFormat,
pub sections: Vec<AnimSection>,
pub metadata: AnimMetadata,
}Expand description
Unified ANIM file representation
Fields§
§format: AnimFormatDetected format type
sections: Vec<AnimSection>Animation sections (unified regardless of source format)
metadata: AnimMetadataFormat-specific metadata
Implementations§
Source§impl AnimFile
impl AnimFile
Sourcepub fn parse<R: Read + Seek>(reader: &mut R) -> Result<Self>
pub fn parse<R: Read + Seek>(reader: &mut R) -> Result<Self>
Parse an ANIM file from a reader with automatic format detection
Sourcepub fn parse_validated<R: Read + Seek>(reader: &mut R) -> Result<Self>
pub fn parse_validated<R: Read + Seek>(reader: &mut R) -> Result<Self>
Parse ANIM file with validation
Sourcepub fn load<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn load<P: AsRef<Path>>(path: P) -> Result<Self>
Load an ANIM file from a file with automatic format detection
Sourcepub fn load_with_version<P: AsRef<Path>>(
path: P,
version: M2Version,
) -> Result<Self>
pub fn load_with_version<P: AsRef<Path>>( path: P, version: M2Version, ) -> Result<Self>
Load ANIM file with version hint for format detection
Sourcepub fn parse_with_format<R: Read + Seek>(
reader: &mut R,
format: AnimFormat,
) -> Result<Self>
pub fn parse_with_format<R: Read + Seek>( reader: &mut R, format: AnimFormat, ) -> Result<Self>
Parse ANIM file with explicit format specification
Sourcepub fn write<W: Write + Seek>(&self, writer: &mut W) -> Result<()>
pub fn write<W: Write + Seek>(&self, writer: &mut W) -> Result<()>
Write an ANIM file to a writer
Sourcepub fn convert(&self, target_version: M2Version) -> Self
pub fn convert(&self, target_version: M2Version) -> Self
Convert this ANIM file to a different version
Sourcepub fn animation_count(&self) -> u32
pub fn animation_count(&self) -> u32
Get the number of animation sections
Sourcepub fn is_legacy_format(&self) -> bool
pub fn is_legacy_format(&self) -> bool
Check if this ANIM file uses legacy format
Sourcepub fn is_modern_format(&self) -> bool
pub fn is_modern_format(&self) -> bool
Check if this ANIM file uses modern format
Sourcepub fn memory_usage(&self) -> MemoryUsage
pub fn memory_usage(&self) -> MemoryUsage
Get memory usage statistics for this ANIM file
Sourcepub fn optimize_memory(&mut self)
pub fn optimize_memory(&mut self)
Optimize memory usage by deduplicating identical keyframe sequences
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnimFile
impl RefUnwindSafe for AnimFile
impl Send for AnimFile
impl Sync for AnimFile
impl Unpin for AnimFile
impl UnwindSafe for AnimFile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more