pub struct M2Texture {
pub texture_type: M2TextureType,
pub flags: M2TextureFlags,
pub filename: M2ArrayString,
}Expand description
Represents a texture in an M2 model
Fields§
§texture_type: M2TextureTypeType of the texture
flags: M2TextureFlagsFlags for this texture
filename: M2ArrayStringFilename of the texture
Implementations§
Source§impl M2Texture
impl M2Texture
Sourcepub fn parse<R: Read + Seek>(reader: &mut R, _version: u32) -> Result<Self>
pub fn parse<R: Read + Seek>(reader: &mut R, _version: u32) -> Result<Self>
Parse a texture from a reader based on the M2 version
Sourcepub fn convert(&self, _target_version: M2Version) -> Self
pub fn convert(&self, _target_version: M2Version) -> Self
Convert this texture to a different version (no version differences for textures)
Sourcepub fn new(texture_type: M2TextureType, filename: M2ArrayString) -> Self
pub fn new(texture_type: M2TextureType, filename: M2ArrayString) -> Self
Create a new texture with the given type and filename
Trait Implementations§
Auto Trait Implementations§
impl Freeze for M2Texture
impl RefUnwindSafe for M2Texture
impl Send for M2Texture
impl Sync for M2Texture
impl Unpin for M2Texture
impl UnwindSafe for M2Texture
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