pub struct Texture { /* private fields */ }Implementations§
Source§impl Texture
impl Texture
pub fn from_url(path: impl AsRef<Path>, name: Option<&str>) -> Result<Self>
pub fn new_checkerboard( divisions: f32, name: Option<&str>, dimensions: [i32; 2], channel_count: usize, channel_encoding: TextureChannelEncoding, color1: [f32; 4], color2: [f32; 4], ) -> Result<Self>
pub fn new_color_temperature_gradient( color_temperature1: f32, color_temperature2: f32, name: Option<&str>, dimensions: [i32; 2], ) -> Result<Self>
pub fn new_color_gradient( color1: [f32; 4], color2: [f32; 4], name: Option<&str>, dimensions: [i32; 2], ) -> Result<Self>
pub fn new_vector_noise( smoothness: f32, name: Option<&str>, dimensions: [i32; 2], channel_encoding: TextureChannelEncoding, ) -> Result<Self>
pub fn new_scalar_noise( smoothness: f32, name: Option<&str>, dimensions: [i32; 2], channel_count: usize, channel_encoding: TextureChannelEncoding, grayscale: bool, ) -> Result<Self>
pub fn new_cellular_noise( frequency: f32, name: Option<&str>, dimensions: [i32; 2], channel_encoding: TextureChannelEncoding, ) -> Result<Self>
pub fn new_normal_map( source_texture: &Self, name: Option<&str>, smoothness: f32, contrast: f32, ) -> Result<Self>
pub fn new_sky_cube( name: Option<&str>, dimensions: [i32; 2], channel_encoding: TextureChannelEncoding, turbidity: f32, sun_elevation: f32, upper_atmosphere_scattering: f32, ground_albedo: f32, ) -> Result<Self>
pub fn new_sky_cube_with_azimuth( name: Option<&str>, dimensions: [i32; 2], channel_encoding: TextureChannelEncoding, turbidity: f32, sun_elevation: f32, sun_azimuth: f32, upper_atmosphere_scattering: f32, ground_albedo: f32, ) -> Result<Self>
pub fn update_sky_cube(&self)
pub fn info(&self) -> Result<TextureInfo>
pub fn write_to_url(&self, path: impl AsRef<Path>) -> Result<()>
pub fn texel_data_top_left(&self) -> Vec<u8> ⓘ
pub fn texel_data_bottom_left(&self) -> Vec<u8> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Texture
impl RefUnwindSafe for Texture
impl !Send for Texture
impl !Sync for Texture
impl Unpin for Texture
impl UnsafeUnpin for Texture
impl UnwindSafe for Texture
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