pub struct M2TextureAnimation {
pub animation_type: M2TextureAnimationType,
pub translation_u: M2AnimationBlock<f32>,
pub translation_v: M2AnimationBlock<f32>,
pub rotation: M2AnimationBlock<f32>,
pub scale_u: M2AnimationBlock<f32>,
pub scale_v: M2AnimationBlock<f32>,
}Expand description
Texture animation structure
Fields§
§animation_type: M2TextureAnimationTypeAnimation type
translation_u: M2AnimationBlock<f32>Animation for U coordinate
translation_v: M2AnimationBlock<f32>Animation for V coordinate
rotation: M2AnimationBlock<f32>Rotation animation
scale_u: M2AnimationBlock<f32>Scale U animation
scale_v: M2AnimationBlock<f32>Scale V animation
Implementations§
Source§impl M2TextureAnimation
impl M2TextureAnimation
Sourcepub fn parse<R: Read + Seek>(reader: &mut R) -> Result<Self>
pub fn parse<R: Read + Seek>(reader: &mut R) -> Result<Self>
Parse a texture animation from a reader
Sourcepub fn write<W: Write>(&self, writer: &mut W) -> Result<()>
pub fn write<W: Write>(&self, writer: &mut W) -> Result<()>
Write a texture animation to a writer
Sourcepub fn convert(&self, _target_version: M2Version) -> Self
pub fn convert(&self, _target_version: M2Version) -> Self
Convert this texture animation to a different version (no version differences yet)
Sourcepub fn new(animation_type: M2TextureAnimationType) -> Self
pub fn new(animation_type: M2TextureAnimationType) -> Self
Create a new texture animation with default values
Trait Implementations§
Source§impl Clone for M2TextureAnimation
impl Clone for M2TextureAnimation
Source§fn clone(&self) -> M2TextureAnimation
fn clone(&self) -> M2TextureAnimation
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 M2TextureAnimation
impl RefUnwindSafe for M2TextureAnimation
impl Send for M2TextureAnimation
impl Sync for M2TextureAnimation
impl Unpin for M2TextureAnimation
impl UnwindSafe for M2TextureAnimation
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