Trait gltf::mesh::util::colors::Cast [−][src]
pub trait Cast { type Output; fn cast_rgb_u8(x: [u8; 3]) -> Self::Output; fn cast_rgb_u16(x: [u16; 3]) -> Self::Output; fn cast_rgb_f32(x: [f32; 3]) -> Self::Output; fn cast_rgba_u8(x: [u8; 4]) -> Self::Output; fn cast_rgba_u16(x: [u16; 4]) -> Self::Output; fn cast_rgba_f32(x: [f32; 4]) -> Self::Output; }
This is supported on crate feature
utils
only.Expand description
Trait for types which describe casting behaviour.
Associated Types
Loading content...Required methods
fn cast_rgb_u8(x: [u8; 3]) -> Self::Output
[src]
Expand description
Cast from RGB u8.
fn cast_rgb_u16(x: [u16; 3]) -> Self::Output
[src]
Expand description
Cast from RGB u16.
fn cast_rgb_f32(x: [f32; 3]) -> Self::Output
[src]
Expand description
Cast from RGB f32.
fn cast_rgba_u8(x: [u8; 4]) -> Self::Output
[src]
Expand description
Cast from RGBA u8.
fn cast_rgba_u16(x: [u16; 4]) -> Self::Output
[src]
Expand description
Cast from RGBA u16.
fn cast_rgba_f32(x: [f32; 4]) -> Self::Output
[src]
Expand description
Cast from RGBA f32.
Implementors
impl Cast for RgbF32
[src]
impl Cast for RgbF32
[src]type Output = [f32; 3]
fn cast_rgb_u8(x: [u8; 3]) -> Self::Output
[src]
fn cast_rgb_u16(x: [u16; 3]) -> Self::Output
[src]
fn cast_rgb_f32(x: [f32; 3]) -> Self::Output
[src]
fn cast_rgba_u8(x: [u8; 4]) -> Self::Output
[src]
fn cast_rgba_u16(x: [u16; 4]) -> Self::Output
[src]
fn cast_rgba_f32(x: [f32; 4]) -> Self::Output
[src]
impl Cast for RgbU8
[src]
impl Cast for RgbU8
[src]type Output = [u8; 3]
fn cast_rgb_u8(x: [u8; 3]) -> Self::Output
[src]
fn cast_rgb_u16(x: [u16; 3]) -> Self::Output
[src]
fn cast_rgb_f32(x: [f32; 3]) -> Self::Output
[src]
fn cast_rgba_u8(x: [u8; 4]) -> Self::Output
[src]
fn cast_rgba_u16(x: [u16; 4]) -> Self::Output
[src]
fn cast_rgba_f32(x: [f32; 4]) -> Self::Output
[src]
impl Cast for RgbU16
[src]
impl Cast for RgbU16
[src]type Output = [u16; 3]
fn cast_rgb_u8(x: [u8; 3]) -> Self::Output
[src]
fn cast_rgb_u16(x: [u16; 3]) -> Self::Output
[src]
fn cast_rgb_f32(x: [f32; 3]) -> Self::Output
[src]
fn cast_rgba_u8(x: [u8; 4]) -> Self::Output
[src]
fn cast_rgba_u16(x: [u16; 4]) -> Self::Output
[src]
fn cast_rgba_f32(x: [f32; 4]) -> Self::Output
[src]
impl Cast for RgbaF32
[src]
impl Cast for RgbaF32
[src]type Output = [f32; 4]
fn cast_rgb_u8(x: [u8; 3]) -> Self::Output
[src]
fn cast_rgb_u16(x: [u16; 3]) -> Self::Output
[src]
fn cast_rgb_f32(x: [f32; 3]) -> Self::Output
[src]
fn cast_rgba_u8(x: [u8; 4]) -> Self::Output
[src]
fn cast_rgba_u16(x: [u16; 4]) -> Self::Output
[src]
fn cast_rgba_f32(x: [f32; 4]) -> Self::Output
[src]
impl Cast for RgbaU8
[src]
impl Cast for RgbaU8
[src]type Output = [u8; 4]
fn cast_rgb_u8(x: [u8; 3]) -> Self::Output
[src]
fn cast_rgb_u16(x: [u16; 3]) -> Self::Output
[src]
fn cast_rgb_f32(x: [f32; 3]) -> Self::Output
[src]
fn cast_rgba_u8(x: [u8; 4]) -> Self::Output
[src]
fn cast_rgba_u16(x: [u16; 4]) -> Self::Output
[src]
fn cast_rgba_f32(x: [f32; 4]) -> Self::Output
[src]
impl Cast for RgbaU16
[src]
impl Cast for RgbaU16
[src]