pub struct Texture { /* private fields */ }Expand description
Wraps the corresponding Model I/O texture counterpart.
Implementations§
Source§impl Texture
impl Texture
Sourcepub fn from_url(path: impl AsRef<Path>, name: Option<&str>) -> Result<Self>
pub fn from_url(path: impl AsRef<Path>, name: Option<&str>) -> Result<Self>
Calls the corresponding Model I/O method on the wrapped Model I/O texture counterpart.
Sourcepub 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_checkerboard( divisions: f32, name: Option<&str>, dimensions: [i32; 2], channel_count: usize, channel_encoding: TextureChannelEncoding, color1: [f32; 4], color2: [f32; 4], ) -> Result<Self>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O texture counterpart.
Sourcepub fn new_color_temperature_gradient(
color_temperature1: f32,
color_temperature2: f32,
name: Option<&str>,
dimensions: [i32; 2],
) -> Result<Self>
pub fn new_color_temperature_gradient( color_temperature1: f32, color_temperature2: f32, name: Option<&str>, dimensions: [i32; 2], ) -> Result<Self>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O texture counterpart.
Sourcepub fn new_color_gradient(
color1: [f32; 4],
color2: [f32; 4],
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>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O texture counterpart.
Sourcepub fn new_vector_noise(
smoothness: f32,
name: Option<&str>,
dimensions: [i32; 2],
channel_encoding: TextureChannelEncoding,
) -> Result<Self>
pub fn new_vector_noise( smoothness: f32, name: Option<&str>, dimensions: [i32; 2], channel_encoding: TextureChannelEncoding, ) -> Result<Self>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O texture counterpart.
Sourcepub 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_scalar_noise( smoothness: f32, name: Option<&str>, dimensions: [i32; 2], channel_count: usize, channel_encoding: TextureChannelEncoding, grayscale: bool, ) -> Result<Self>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O texture counterpart.
Sourcepub fn new_cellular_noise(
frequency: f32,
name: Option<&str>,
dimensions: [i32; 2],
channel_encoding: TextureChannelEncoding,
) -> Result<Self>
pub fn new_cellular_noise( frequency: f32, name: Option<&str>, dimensions: [i32; 2], channel_encoding: TextureChannelEncoding, ) -> Result<Self>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O texture counterpart.
Sourcepub fn new_normal_map(
source_texture: &Self,
name: Option<&str>,
smoothness: f32,
contrast: f32,
) -> Result<Self>
pub fn new_normal_map( source_texture: &Self, name: Option<&str>, smoothness: f32, contrast: f32, ) -> Result<Self>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O texture counterpart.
Sourcepub 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( name: Option<&str>, dimensions: [i32; 2], channel_encoding: TextureChannelEncoding, turbidity: f32, sun_elevation: f32, upper_atmosphere_scattering: f32, ground_albedo: f32, ) -> Result<Self>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O texture counterpart.
Sourcepub 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 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>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O texture counterpart.
Sourcepub fn update_sky_cube(&self)
pub fn update_sky_cube(&self)
Calls the corresponding Model I/O method on the wrapped Model I/O texture counterpart.
Sourcepub fn info(&self) -> Result<TextureInfo>
pub fn info(&self) -> Result<TextureInfo>
Calls the corresponding Model I/O method on the wrapped Model I/O texture counterpart.
Sourcepub fn write_to_url(&self, path: impl AsRef<Path>) -> Result<()>
pub fn write_to_url(&self, path: impl AsRef<Path>) -> Result<()>
Calls the corresponding Model I/O method on the wrapped Model I/O texture counterpart.
Sourcepub fn texel_data_top_left(&self) -> Vec<u8> ⓘ
pub fn texel_data_top_left(&self) -> Vec<u8> ⓘ
Calls the corresponding Model I/O method on the wrapped Model I/O texture counterpart.
Sourcepub fn texel_data_bottom_left(&self) -> Vec<u8> ⓘ
pub fn texel_data_bottom_left(&self) -> Vec<u8> ⓘ
Calls the corresponding Model I/O method on the wrapped Model I/O texture counterpart.