pub struct MaterialDesc { /* private fields */ }Implementations§
Source§impl MaterialDesc
impl MaterialDesc
pub const fn clearcoat_texture(&self) -> Option<TextureHandle>
pub const fn clearcoat_texture_transform(&self) -> Option<TextureTransform>
pub const fn clearcoat_roughness_texture(&self) -> Option<TextureHandle>
pub const fn clearcoat_roughness_texture_transform( &self, ) -> Option<TextureTransform>
pub const fn clearcoat_normal_texture(&self) -> Option<TextureHandle>
pub const fn clearcoat_normal_texture_transform( &self, ) -> Option<TextureTransform>
pub const fn sheen_color_texture(&self) -> Option<TextureHandle>
pub const fn sheen_color_texture_transform(&self) -> Option<TextureTransform>
pub const fn sheen_roughness_texture(&self) -> Option<TextureHandle>
pub const fn sheen_roughness_texture_transform( &self, ) -> Option<TextureTransform>
pub const fn anisotropy_texture(&self) -> Option<TextureHandle>
pub const fn anisotropy_texture_transform(&self) -> Option<TextureTransform>
pub const fn iridescence_texture(&self) -> Option<TextureHandle>
pub const fn iridescence_texture_transform(&self) -> Option<TextureTransform>
pub const fn iridescence_thickness_texture(&self) -> Option<TextureHandle>
pub const fn iridescence_thickness_texture_transform( &self, ) -> Option<TextureTransform>
pub const fn transmission_texture(&self) -> Option<TextureHandle>
pub const fn transmission_texture_transform(&self) -> Option<TextureTransform>
pub const fn thickness_texture(&self) -> Option<TextureHandle>
pub const fn thickness_texture_transform(&self) -> Option<TextureTransform>
Sourcepub const fn clearcoat_factor(&self) -> f32
pub const fn clearcoat_factor(&self) -> f32
Returns the scalar KHR_materials_clearcoat.clearcoatFactor.
The renderer multiplies this value by the sampled clearcoat texture when one is present.
Sourcepub const fn clearcoat_roughness_factor(&self) -> f32
pub const fn clearcoat_roughness_factor(&self) -> f32
Returns the untextured KHR_materials_clearcoat.clearcoatRoughnessFactor.
pub const fn clearcoat_normal_scale(&self) -> f32
Sourcepub const fn sheen_color_factor(&self) -> Color
pub const fn sheen_color_factor(&self) -> Color
Returns the scalar KHR_materials_sheen.sheenColorFactor.
Sourcepub const fn sheen_roughness_factor(&self) -> f32
pub const fn sheen_roughness_factor(&self) -> f32
Returns the scalar KHR_materials_sheen.sheenRoughnessFactor.
Sourcepub const fn anisotropy_strength_factor(&self) -> f32
pub const fn anisotropy_strength_factor(&self) -> f32
Returns KHR_materials_anisotropy.anisotropyStrength.
Sourcepub const fn anisotropy_rotation_radians(&self) -> f32
pub const fn anisotropy_rotation_radians(&self) -> f32
Returns KHR_materials_anisotropy.anisotropyRotation in radians.
Sourcepub const fn iridescence_factor(&self) -> f32
pub const fn iridescence_factor(&self) -> f32
Returns KHR_materials_iridescence.iridescenceFactor.
Sourcepub const fn iridescence_ior(&self) -> f32
pub const fn iridescence_ior(&self) -> f32
Returns KHR_materials_iridescence.iridescenceIor.
Sourcepub const fn iridescence_thickness_minimum_nm(&self) -> f32
pub const fn iridescence_thickness_minimum_nm(&self) -> f32
Returns KHR_materials_iridescence.iridescenceThicknessMinimum, in nanometers.
Sourcepub const fn iridescence_thickness_maximum_nm(&self) -> f32
pub const fn iridescence_thickness_maximum_nm(&self) -> f32
Returns KHR_materials_iridescence.iridescenceThicknessMaximum, in nanometers.
Sourcepub const fn dispersion_factor(&self) -> f32
pub const fn dispersion_factor(&self) -> f32
Returns KHR_materials_dispersion.dispersion as 20 / Abbe number.
Sourcepub const fn transmission_factor(&self) -> f32
pub const fn transmission_factor(&self) -> f32
Returns KHR_materials_transmission.transmissionFactor.
Sourcepub const fn thickness_factor(&self) -> f32
pub const fn thickness_factor(&self) -> f32
Returns KHR_materials_volume.thicknessFactor, in scene units.
Sourcepub const fn attenuation_distance(&self) -> f32
pub const fn attenuation_distance(&self) -> f32
Returns KHR_materials_volume.attenuationDistance, in scene units.
Sourcepub const fn attenuation_color(&self) -> Color
pub const fn attenuation_color(&self) -> Color
Returns KHR_materials_volume.attenuationColor.
pub const fn with_clearcoat_texture(self, texture: TextureHandle) -> Self
pub const fn with_clearcoat_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_clearcoat_roughness_texture( self, texture: TextureHandle, ) -> Self
pub const fn with_clearcoat_roughness_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_clearcoat_normal_texture(self, texture: TextureHandle) -> Self
pub const fn with_clearcoat_normal_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_clearcoat_normal_scale(self, scale: f32) -> Self
pub const fn with_sheen_color_texture(self, texture: TextureHandle) -> Self
pub const fn with_sheen_color_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_sheen_roughness_texture(self, texture: TextureHandle) -> Self
pub const fn with_sheen_roughness_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_anisotropy_texture(self, texture: TextureHandle) -> Self
pub const fn with_anisotropy_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_iridescence_texture(self, texture: TextureHandle) -> Self
pub const fn with_iridescence_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_iridescence_thickness_texture( self, texture: TextureHandle, ) -> Self
pub const fn with_iridescence_thickness_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_transmission_texture(self, texture: TextureHandle) -> Self
pub const fn with_transmission_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_thickness_texture(self, texture: TextureHandle) -> Self
pub const fn with_thickness_texture_transform( self, transform: TextureTransform, ) -> Self
Sourcepub const fn with_clearcoat_factor(self, clearcoat_factor: f32) -> Self
pub const fn with_clearcoat_factor(self, clearcoat_factor: f32) -> Self
Sets the scalar clearcoat layer strength from KHR_materials_clearcoat.
Values are clamped to [0, 1]; NaN falls back to 0.
Sourcepub const fn with_clearcoat_roughness_factor(
self,
clearcoat_roughness_factor: f32,
) -> Self
pub const fn with_clearcoat_roughness_factor( self, clearcoat_roughness_factor: f32, ) -> Self
Sets the scalar clearcoat roughness from KHR_materials_clearcoat.
Values are clamped to [0, 1]; NaN falls back to 0.
Sourcepub const fn with_sheen_color_factor(self, sheen_color_factor: Color) -> Self
pub const fn with_sheen_color_factor(self, sheen_color_factor: Color) -> Self
Sets the scalar sheen color from KHR_materials_sheen.
Sourcepub const fn with_sheen_roughness_factor(
self,
sheen_roughness_factor: f32,
) -> Self
pub const fn with_sheen_roughness_factor( self, sheen_roughness_factor: f32, ) -> Self
Sets the scalar sheen roughness from KHR_materials_sheen.
Sourcepub const fn with_anisotropy_strength_factor(
self,
anisotropy_strength_factor: f32,
) -> Self
pub const fn with_anisotropy_strength_factor( self, anisotropy_strength_factor: f32, ) -> Self
Sets the scalar anisotropy strength from KHR_materials_anisotropy.
Values are clamped to [0, 1]; NaN falls back to 0.
Sourcepub const fn with_anisotropy_rotation_radians(
self,
anisotropy_rotation_radians: f32,
) -> Self
pub const fn with_anisotropy_rotation_radians( self, anisotropy_rotation_radians: f32, ) -> Self
Sets the anisotropy rotation in tangent space, in radians.
Sourcepub const fn with_iridescence_factor(self, iridescence_factor: f32) -> Self
pub const fn with_iridescence_factor(self, iridescence_factor: f32) -> Self
Sets the scalar iridescence strength from KHR_materials_iridescence.
Values are clamped to [0, 1]; NaN falls back to 0.
Sourcepub const fn with_iridescence_ior(self, iridescence_ior: f32) -> Self
pub const fn with_iridescence_ior(self, iridescence_ior: f32) -> Self
Sets the thin-film index of refraction from KHR_materials_iridescence.
Sourcepub const fn with_iridescence_thickness_range_nm(
self,
minimum_nm: f32,
maximum_nm: f32,
) -> Self
pub const fn with_iridescence_thickness_range_nm( self, minimum_nm: f32, maximum_nm: f32, ) -> Self
Sets the thin-film thickness range in nanometers.
The glTF extension permits minimum > maximum, so values are sanitized
independently rather than reordered.
Sourcepub const fn with_dispersion_factor(self, dispersion_factor: f32) -> Self
pub const fn with_dispersion_factor(self, dispersion_factor: f32) -> Self
Sets the scalar dispersion strength from KHR_materials_dispersion.
Values are sanitized to >= 0; NaN falls back to 0.
Sourcepub const fn with_transmission_factor(self, transmission_factor: f32) -> Self
pub const fn with_transmission_factor(self, transmission_factor: f32) -> Self
Sets the scalar transmission strength from KHR_materials_transmission.
Values are clamped to [0, 1]; NaN falls back to 0.
Sourcepub const fn with_ior(self, ior: f32) -> Self
pub const fn with_ior(self, ior: f32) -> Self
Sets the material index of refraction from KHR_materials_ior.
Sourcepub const fn with_thickness_factor(self, thickness_factor: f32) -> Self
pub const fn with_thickness_factor(self, thickness_factor: f32) -> Self
Sets KHR_materials_volume.thicknessFactor, in scene units.
Sourcepub const fn with_attenuation_distance(self, attenuation_distance: f32) -> Self
pub const fn with_attenuation_distance(self, attenuation_distance: f32) -> Self
Sets KHR_materials_volume.attenuationDistance, in scene units.
Sourcepub const fn with_attenuation_color(self, attenuation_color: Color) -> Self
pub const fn with_attenuation_color(self, attenuation_color: Color) -> Self
Sets KHR_materials_volume.attenuationColor.
Source§impl MaterialDesc
impl MaterialDesc
pub const PRESET_NAMES: &'static [&'static str]
pub fn from_preset_name(name: &str, base_color: Option<Color>) -> Option<Self>
Sourcepub const fn matte(base_color: Color) -> Self
pub const fn matte(base_color: Color) -> Self
Matte dielectric material preset: high roughness, non-metallic.
§Examples
use scena::{Color, MaterialDesc};
let material = MaterialDesc::matte(Color::BLUE);
assert_eq!(material.metallic_factor(), 0.0);
assert!(material.roughness_factor() > 0.9);Sourcepub const fn plastic(base_color: Color) -> Self
pub const fn plastic(base_color: Color) -> Self
Smooth dielectric plastic preset.
§Examples
use scena::{Color, MaterialDesc};
let material = MaterialDesc::plastic(Color::ORANGE);
assert_eq!(material.metallic_factor(), 0.0);
assert!(material.roughness_factor() < MaterialDesc::matte(Color::ORANGE).roughness_factor());Sourcepub const fn metal(base_color: Color) -> Self
pub const fn metal(base_color: Color) -> Self
Metallic-roughness metal preset for generic polished-metal behavior.
Use MaterialDesc::chrome for a smoother mirror-like metal shortcut,
or MaterialDesc::brushed_steel for a texture-free anisotropic steel
shortcut. This preset stays a conservative, general bare-metal default.
§Examples
use scena::{Color, MaterialDesc};
let material = MaterialDesc::metal(Color::LIGHT_GRAY);
assert_eq!(material.metallic_factor(), 1.0);Sourcepub const fn rough_metal(base_color: Color) -> Self
pub const fn rough_metal(base_color: Color) -> Self
Rough bare-metal preset for less mirror-like product surfaces.
§Examples
use scena::{Color, MaterialDesc};
let material = MaterialDesc::rough_metal(Color::LIGHT_GRAY);
assert_eq!(material.metallic_factor(), 1.0);
assert!(material.roughness_factor() > MaterialDesc::metal(Color::LIGHT_GRAY).roughness_factor());Sourcepub const fn chrome() -> Self
pub const fn chrome() -> Self
Smooth chrome preset backed by metallic roughness, environment reflection, and opt-in screen-space material reflections.
Enable Renderer::set_screen_space_reflections
or recipe render.screen_space_reflections for chrome surfaces to sample
visible scene colour in screen space. Screen-edge and occluded samples
fall back to the environment-lit material; this is not a caustics model.
§Examples
use scena::MaterialDesc;
let material = MaterialDesc::chrome();
assert_eq!(material.metallic_factor(), 1.0);
assert!(material.roughness_factor() < 0.1);Sourcepub const fn brushed_steel() -> Self
pub const fn brushed_steel() -> Self
Brushed steel preset backed by metallic roughness plus scalar anisotropy.
This is a texture-free brushed-metal shortcut. Use anisotropy textures for authored brush direction maps.
§Examples
use scena::MaterialDesc;
let material = MaterialDesc::brushed_steel();
assert_eq!(material.metallic_factor(), 1.0);
assert!(material.anisotropy_strength_factor() > 0.5);Sourcepub const fn clearcoat_plastic(base_color: Color) -> Self
pub const fn clearcoat_plastic(base_color: Color) -> Self
Glossy coated plastic preset backed by KHR_materials_clearcoat factors.
§Examples
use scena::{Color, MaterialDesc};
let material = MaterialDesc::clearcoat_plastic(Color::BLUE);
assert_eq!(material.metallic_factor(), 0.0);
assert!(material.clearcoat_factor() > 0.0);Sourcepub const fn satin(base_color: Color) -> Self
pub const fn satin(base_color: Color) -> Self
Satin fabric-like preset backed by the sheen material lane.
This is a smooth sheen shortcut, not a procedural weave texture.
§Examples
use scena::{Color, MaterialDesc};
let material = MaterialDesc::satin(Color::MAGENTA);
assert_eq!(material.metallic_factor(), 0.0);
assert!(material.sheen_roughness_factor() > 0.0);Sourcepub const fn leather(base_color: Color) -> Self
pub const fn leather(base_color: Color) -> Self
Smooth leather-like preset backed by rough dielectric shading plus sheen.
This preset does not synthesize leather grain or normal-map detail.
§Examples
use scena::{Color, MaterialDesc};
let material = MaterialDesc::leather(Color::ORANGE);
assert_eq!(material.metallic_factor(), 0.0);
assert!(material.sheen_roughness_factor() > 0.0);Sourcepub const fn clear_glass(tint: Color) -> Self
pub const fn clear_glass(tint: Color) -> Self
Transparent glass preset backed by blend mode plus transmission, IOR, and volume metadata.
GPU backends sample the opaque scene color with IOR/thickness refraction and roughness-driven blur where supported. This is not a caustics model.
§Examples
use scena::{AlphaMode, Color, MaterialDesc};
let material = MaterialDesc::clear_glass(Color::CYAN);
assert_eq!(material.alpha_mode(), AlphaMode::Blend);
assert_eq!(material.transmission_factor(), 1.0);Sourcepub const fn frosted_glass(tint: Color) -> Self
pub const fn frosted_glass(tint: Color) -> Self
Frosted glass preset backed by blend mode plus rough transmission, IOR, and volume metadata.
GPU backends use the shared scene-color transmission path with roughness-driven blur where supported. This is not a caustics model.
§Examples
use scena::{AlphaMode, Color, MaterialDesc};
let material = MaterialDesc::frosted_glass(Color::COOL_WHITE);
assert_eq!(material.alpha_mode(), AlphaMode::Blend);
assert!(material.roughness_factor() > MaterialDesc::clear_glass(Color::COOL_WHITE).roughness_factor());Source§impl MaterialDesc
impl MaterialDesc
pub const fn unlit(base_color: Color) -> Self
pub const fn pbr_metallic_roughness( base_color: Color, metallic_factor: f32, roughness_factor: f32, ) -> Self
Sourcepub const fn line(base_color: Color, width_px: f32) -> Self
pub const fn line(base_color: Color, width_px: f32) -> Self
Creates a world-space stroke material for line-topology geometry and polylines.
The segment endpoints live in scene/model space; GPU backends expand them in the vertex shader to a screen-constant physical-pixel width. Strokes are depth-tested against scene geometry, clipped at the near plane, and are not pickable in v1.7.
Sourcepub const fn wireframe(base_color: Color, width_px: f32) -> Self
pub const fn wireframe(base_color: Color, width_px: f32) -> Self
Creates a world-space stroke material that renders triangle mesh edges.
GPU backends retain model-space edge endpoints and expand them to screen-constant width during rendering; strokes are depth-tested, near-plane clipped, and ignored by picking in v1.7.
Sourcepub const fn edge(base_color: Color, width_px: f32) -> Self
pub const fn edge(base_color: Color, width_px: f32) -> Self
Creates a world-space stroke material for extracted mesh edges.
The default edge threshold is 30 degrees. Use
with_edge_angle_threshold_degrees to
override it. GPU backends retain model-space edge endpoints and expand them to
screen-constant width during rendering; strokes are depth-tested, near-plane
clipped, and ignored by picking in v1.7.
pub const fn kind(&self) -> MaterialKind
pub const fn base_color(&self) -> Color
pub const fn with_base_color(self, base_color: Color) -> Self
pub const fn base_color_texture(&self) -> Option<TextureHandle>
pub const fn base_color_texture_transform(&self) -> Option<TextureTransform>
pub const fn normal_texture(&self) -> Option<TextureHandle>
pub const fn normal_texture_transform(&self) -> Option<TextureTransform>
pub const fn metallic_roughness_texture(&self) -> Option<TextureHandle>
pub const fn metallic_roughness_texture_transform( &self, ) -> Option<TextureTransform>
pub const fn occlusion_texture(&self) -> Option<TextureHandle>
pub const fn occlusion_texture_transform(&self) -> Option<TextureTransform>
pub const fn emissive_texture(&self) -> Option<TextureHandle>
pub const fn emissive_texture_transform(&self) -> Option<TextureTransform>
pub const fn alpha_mode(&self) -> AlphaMode
pub const fn emissive(&self) -> Color
pub const fn emissive_strength(&self) -> f32
pub const fn metallic_factor(&self) -> f32
pub const fn with_metallic_factor(self, metallic_factor: f32) -> Self
pub const fn roughness_factor(&self) -> f32
pub const fn with_roughness_factor(self, roughness_factor: f32) -> Self
pub const fn double_sided(&self) -> bool
Sourcepub const fn stroke_width_px(&self) -> Option<f32>
pub const fn stroke_width_px(&self) -> Option<f32>
Returns the screen-constant stroke width in physical pixels for line, wireframe, and
edge materials. Returns None for non-stroke materials.
Sourcepub const fn edge_angle_threshold_degrees(&self) -> Option<f32>
pub const fn edge_angle_threshold_degrees(&self) -> Option<f32>
Returns the edge dihedral-angle threshold in degrees for edge materials.
0.0 means nearly every triangle pair can become an edge; 180.0 means only
explicit boundaries remain. Returns None for non-edge materials.
Sourcepub const fn with_stroke_width_px(self, width_px: f32) -> Self
pub const fn with_stroke_width_px(self, width_px: f32) -> Self
Updates the screen-constant stroke width for line, wireframe, and edge materials.
Invalid values fall back to DEFAULT_STROKE_WIDTH_PX. This has no effect on
non-stroke materials.
Sourcepub const fn with_edge_angle_threshold_degrees(
self,
angle_threshold_degrees: f32,
) -> Self
pub const fn with_edge_angle_threshold_degrees( self, angle_threshold_degrees: f32, ) -> Self
Updates the edge dihedral-angle threshold in degrees.
Values clamp to [0.0, 180.0]; non-finite values fall back to
DEFAULT_EDGE_ANGLE_THRESHOLD_DEGREES, replacing any previous value. This has no
effect on non-edge materials.
pub const fn with_base_color_texture(self, texture: TextureHandle) -> Self
pub const fn with_base_color_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_normal_texture(self, texture: TextureHandle) -> Self
pub const fn with_normal_texture_transform( self, transform: TextureTransform, ) -> Self
Sourcepub const fn with_normal_scale(self, scale: f32) -> Self
pub const fn with_normal_scale(self, scale: f32) -> Self
Sets normalTexture.scale (glTF spec): tangent-space normal X/Y
components are multiplied by this factor before TBN
reconstruction. Default 1.0.
Sourcepub const fn with_occlusion_strength(self, strength: f32) -> Self
pub const fn with_occlusion_strength(self, strength: f32) -> Self
Sets occlusionTexture.strength (glTF spec): the AO factor
applied is lerp(1.0, occlusion_sample, strength). Default 1.0
applies the full AO; 0.0 disables it.
pub const fn normal_scale(&self) -> f32
pub const fn occlusion_strength(&self) -> f32
pub const fn with_metallic_roughness_texture( self, texture: TextureHandle, ) -> Self
pub const fn with_metallic_roughness_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_occlusion_texture(self, texture: TextureHandle) -> Self
pub const fn with_occlusion_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_emissive_texture(self, texture: TextureHandle) -> Self
pub const fn with_emissive_texture_transform( self, transform: TextureTransform, ) -> Self
pub const fn with_alpha_mode(self, alpha_mode: AlphaMode) -> Self
pub const fn with_emissive(self, emissive: Color) -> Self
pub const fn with_emissive_strength(self, emissive_strength: f32) -> Self
pub const fn with_double_sided(self, double_sided: bool) -> Self
Trait Implementations§
Source§impl Clone for MaterialDesc
impl Clone for MaterialDesc
Source§fn clone(&self) -> MaterialDesc
fn clone(&self) -> MaterialDesc
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MaterialDesc
impl Debug for MaterialDesc
Source§impl Default for MaterialDesc
impl Default for MaterialDesc
Source§impl PartialEq for MaterialDesc
impl PartialEq for MaterialDesc
Source§fn eq(&self, other: &MaterialDesc) -> bool
fn eq(&self, other: &MaterialDesc) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MaterialDesc
Auto Trait Implementations§
impl Freeze for MaterialDesc
impl RefUnwindSafe for MaterialDesc
impl Send for MaterialDesc
impl Sync for MaterialDesc
impl Unpin for MaterialDesc
impl UnsafeUnpin for MaterialDesc
impl UnwindSafe for MaterialDesc
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
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
Source§impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.Source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more