pub struct TextureMap { /* private fields */ }Implementations§
Source§impl TextureMap
impl TextureMap
pub fn default_mip_level(&self) -> u8
pub fn version(&self) -> WoaVersion
pub fn atlas(&self) -> &Option<AtlasData>
pub fn num_mip_levels(&self) -> usize
pub fn video_memory_requirement(&self) -> usize
pub fn mipblock1(&self) -> Option<MipblockData>
pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn format(&self) -> RenderFormat
pub fn flags(&self) -> TextureFlags
pub fn texture_type(&self) -> TextureType
pub fn interpret_as(&self) -> Option<InterpretAs>
pub fn dimensions(&self) -> Dimensions
pub fn has_mipblock1(&self) -> bool
pub fn from_file<P: AsRef<Path>>( path: P, woa_version: WoaVersion, ) -> Result<Self, TextureMapError>
pub fn from_memory( data: &[u8], woa_version: WoaVersion, ) -> Result<Self, TextureMapError>
pub fn default_mipmap(&self) -> Result<MipLevel, TextureMapError>
pub fn mipmaps( &self, ) -> impl Iterator<Item = Result<MipLevel, TextureMapError>> + '_
pub fn mipmap(&self, level: usize) -> Result<MipLevel, TextureMapError>
pub fn has_atlas(&self) -> bool
pub fn set_mipblock1(&mut self, mipblock: MipblockData)
pub fn pack_to_vec(&self) -> Result<Vec<u8>, TexturePackerError>
pub fn pack_to_file<P: AsRef<Path>>( &self, path: P, ) -> Result<(), TexturePackerError>
Trait Implementations§
Source§impl BinRead for TextureMap
impl BinRead for TextureMap
Source§type Args<'__binrw_generated_args_lifetime> = (WoaVersion,)
type Args<'__binrw_generated_args_lifetime> = (WoaVersion,)
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T from the reader assuming native-endian byte order. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for TextureMap
impl BinWrite for TextureMap
Source§fn write_options<W: Write + Seek>(
&self,
__binrw_generated_var_writer: &mut W,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>
Source§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming big-endian byte order. Read moreSource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming little-endian byte order. Read moreSource§fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
Write
Self to the writer assuming native-endian byte order. Read moreSource§fn write_be_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Write
Self to the writer, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for TextureMap
impl Clone for TextureMap
Source§fn clone(&self) -> TextureMap
fn clone(&self) -> TextureMap
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 TextureMap
impl Debug for TextureMap
Source§impl<'de> Deserialize<'de> for TextureMap
impl<'de> Deserialize<'de> for TextureMap
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl GlacierResource for TextureMap
impl GlacierResource for TextureMap
type Output = TextureMap
fn process_data<R: AsRef<[u8]>>( woa_version: WoaVersion, data: R, ) -> Result<Self::Output, GlacierResourceError>
fn serialize(&self, _: WoaVersion) -> Result<Vec<u8>, GlacierResourceError>
fn resource_type() -> [u8; 4]
fn video_memory_requirement(&self) -> u64
fn system_memory_requirement(&self) -> u64
fn should_scramble(&self) -> bool
fn should_compress(&self) -> bool
Auto Trait Implementations§
impl Freeze for TextureMap
impl RefUnwindSafe for TextureMap
impl Send for TextureMap
impl Sync for TextureMap
impl Unpin for TextureMap
impl UnwindSafe for TextureMap
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