pub struct TextureInfo { /* private fields */ }Expand description
A texture reference with its UV set and local transform.
Implementations§
Source§impl TextureInfo
impl TextureInfo
Sourcepub const fn new(texture_id: TextureId) -> Self
pub const fn new(texture_id: TextureId) -> Self
Creates a reference to texture_id using UV set 0 and the identity transform.
Sourcepub const fn with_tex_coord(self, tex_coord: u32) -> Self
pub const fn with_tex_coord(self, tex_coord: u32) -> Self
Selects the UV set sampled by this texture reference.
Sourcepub const fn with_transform(self, transform: TextureTransform) -> Self
pub const fn with_transform(self, transform: TextureTransform) -> Self
Sets the local UV transform applied before sampling.
Sourcepub fn texture_id(&self) -> TextureId
pub fn texture_id(&self) -> TextureId
Returns the referenced texture identifier.
Sourcepub fn transform(&self) -> TextureTransform
pub fn transform(&self) -> TextureTransform
Returns the local UV transform.
Trait Implementations§
Source§impl Clone for TextureInfo
impl Clone for TextureInfo
impl Copy for TextureInfo
Source§impl Debug for TextureInfo
impl Debug for TextureInfo
Source§impl PartialEq for TextureInfo
impl PartialEq for TextureInfo
impl StructuralPartialEq for TextureInfo
Auto Trait Implementations§
impl Freeze for TextureInfo
impl RefUnwindSafe for TextureInfo
impl Send for TextureInfo
impl Sync for TextureInfo
impl Unpin for TextureInfo
impl UnsafeUnpin for TextureInfo
impl UnwindSafe for TextureInfo
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