pub struct TextureVisual3d { /* private fields */ }Expand description
One shared CPU image with independent material sampling and tint.
Alpha is preserved; the mesh surface decides Opaque/Mask/Blend behavior. Repeating or mipmapped packed-atlas tiles must first be isolated into separate images. This descriptor neither shapes UVs nor generates mipmap pixels.
Implementations§
Source§impl TextureVisual3d
impl TextureVisual3d
Sourcepub fn new(asset: TextureAsset3d) -> Self
pub fn new(asset: TextureAsset3d) -> Self
Uses nearest filtering, mip zero, clamp addressing, identity UVs and white tint.
Sourcepub const fn asset(&self) -> &TextureAsset3d
pub const fn asset(&self) -> &TextureAsset3d
Returns the shared immutable pixel snapshot.
Sourcepub const fn filter(&self) -> ImageFilter
pub const fn filter(&self) -> ImageFilter
Returns nearest or linear image filtering.
Sourcepub const fn address_mode(&self) -> TextureAddressMode3d
pub const fn address_mode(&self) -> TextureAddressMode3d
Returns complete-image addressing, never packed-atlas tile addressing.
Sourcepub const fn uv_transform(&self) -> TextureUvTransform3d
pub const fn uv_transform(&self) -> TextureUvTransform3d
Returns continuous scale then offset before sampling.
Sourcepub fn with_filter(self, filter: ImageFilter) -> Self
pub fn with_filter(self, filter: ImageFilter) -> Self
Selects nearest or linear filtering without changing shared pixels.
Sourcepub fn with_mipmaps(self, enabled: bool) -> Self
pub fn with_mipmaps(self, enabled: bool) -> Self
Requests a complete Engine-generated mip chain rather than mip zero only. Ordinary mip averaging does not preserve Mask alpha-test coverage.
Sourcepub fn with_address_mode(self, address: TextureAddressMode3d) -> Self
pub fn with_address_mode(self, address: TextureAddressMode3d) -> Self
Selects clamp or hardware repetition of this complete independent image.
Sourcepub fn with_uv_transform(self, transform: TextureUvTransform3d) -> Self
pub fn with_uv_transform(self, transform: TextureUvTransform3d) -> Self
Selects an Engine-validated affine UV transform, including signed scales.
Sourcepub fn with_asset(self, asset: TextureAsset3d) -> Self
pub fn with_asset(self, asset: TextureAsset3d) -> Self
Replaces the pixel snapshot, preserving independent sampling and tint.
Sourcepub fn with_tint(self, tint: Color) -> Result<Self, TextureVisualError>
pub fn with_tint(self, tint: Color) -> Result<Self, TextureVisualError>
Selects normalized straight-linear RGBA tint, rejecting invalid channels.
Sourcepub fn texel_bytes(&self) -> Result<usize, TextureVisualError>
pub fn texel_bytes(&self) -> Result<usize, TextureVisualError>
Returns exact nominal RGBA8 mip texel bytes, excluding driver metadata. This does not allocate or generate mip levels.
Trait Implementations§
Source§impl Clone for TextureVisual3d
impl Clone for TextureVisual3d
Source§impl Debug for TextureVisual3d
impl Debug for TextureVisual3d
Source§impl PartialEq for TextureVisual3d
impl PartialEq for TextureVisual3d
impl StructuralPartialEq for TextureVisual3d
Auto Trait Implementations§
impl Freeze for TextureVisual3d
impl RefUnwindSafe for TextureVisual3d
impl Send for TextureVisual3d
impl Sync for TextureVisual3d
impl Unpin for TextureVisual3d
impl UnsafeUnpin for TextureVisual3d
impl UnwindSafe for TextureVisual3d
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.