pub struct M2TextureTransform {
pub id: u32,
pub transform_type: M2TextureTransformType,
pub translation: M2AnimationBlock<C3Vector>,
pub rotation: M2AnimationBlock<C4Quaternion>,
pub scaling: M2AnimationBlock<C3Vector>,
}Expand description
Represents a texture transform in an M2 model Introduced in Legion (7.x)
Fields§
§id: u32Transform ID
transform_type: M2TextureTransformTypeTransform type
translation: M2AnimationBlock<C3Vector>Translation animation (for scroll type)
rotation: M2AnimationBlock<C4Quaternion>Rotation animation (for rotate type)
scaling: M2AnimationBlock<C3Vector>Scaling animation (for scale type)
Implementations§
Source§impl M2TextureTransform
impl M2TextureTransform
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 transform 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 transform to a writer
Sourcepub fn convert(&self, _target_version: M2Version) -> Self
pub fn convert(&self, _target_version: M2Version) -> Self
Convert this texture transform to a different version
Sourcepub fn new(id: u32, transform_type: M2TextureTransformType) -> Self
pub fn new(id: u32, transform_type: M2TextureTransformType) -> Self
Create a new texture transform with default values
Trait Implementations§
Source§impl Clone for M2TextureTransform
impl Clone for M2TextureTransform
Source§fn clone(&self) -> M2TextureTransform
fn clone(&self) -> M2TextureTransform
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 M2TextureTransform
impl RefUnwindSafe for M2TextureTransform
impl Send for M2TextureTransform
impl Sync for M2TextureTransform
impl Unpin for M2TextureTransform
impl UnsafeUnpin for M2TextureTransform
impl UnwindSafe for M2TextureTransform
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