pub struct Layer { /* private fields */ }Expand description
Material rendering layer
Materials can have multiple layers, each with its own texture and blending mode. Layers control how textures are combined and rendered.
Implementations§
Source§impl Layer
impl Layer
Sourcepub fn filter_mode(&self) -> LayerFilterMode
pub fn filter_mode(&self) -> LayerFilterMode
Blending mode
pub fn set_filter_mode(&mut self, value: LayerFilterMode)
Sourcepub fn shading_flags(&self) -> LayerShadingFlag
pub fn shading_flags(&self) -> LayerShadingFlag
Rendering flags
pub fn set_shading_flags(&mut self, value: LayerShadingFlag)
Sourcepub fn texture_id(&self) -> u32
pub fn texture_id(&self) -> u32
Texture index (versions 800-1100)
pub fn set_texture_id(&mut self, value: u32)
Sourcepub fn texture_animation_id(&self) -> u32
pub fn texture_animation_id(&self) -> u32
Texture animation index
pub fn set_texture_animation_id(&mut self, value: u32)
pub fn set_coord_id(&mut self, value: u32)
pub fn set_alpha(&mut self, value: f32)
Sourcepub fn emissive_gain(&self) -> f32
pub fn emissive_gain(&self) -> f32
Emissive light intensity (default 1.0)
pub fn set_emissive_gain(&mut self, value: f32)
Sourcepub fn fresnel_color(&self) -> Vector3f
pub fn fresnel_color(&self) -> Vector3f
Fresnel effect color
pub fn set_fresnel_color(&mut self, value: Vector3f)
Sourcepub fn fresnel_opacity(&self) -> f32
pub fn fresnel_opacity(&self) -> f32
Fresnel effect opacity
pub fn set_fresnel_opacity(&mut self, value: f32)
Sourcepub fn fresnel_team_color(&self) -> f32
pub fn fresnel_team_color(&self) -> f32
Fresnel team color factor
pub fn set_fresnel_team_color(&mut self, value: f32)
Sourcepub fn shader(&self) -> LayerShaderType
pub fn shader(&self) -> LayerShaderType
Shader to use for this layer
pub fn set_shader(&mut self, value: LayerShaderType)
pub fn set_is_hd(&mut self, value: bool)
Sourcepub fn sub_textures_len(&self) -> usize
pub fn sub_textures_len(&self) -> usize
Multi-texture support (version 1200+)
Sourcepub fn sub_textures(&self, index: usize) -> Option<Ref<'_, LayerSubTexture>>
pub fn sub_textures(&self, index: usize) -> Option<Ref<'_, LayerSubTexture>>
Borrows element index in place. None when out of range.
pub fn sub_textures_mut( &mut self, index: usize, ) -> Option<RefMut<'_, LayerSubTexture>>
Sourcepub fn sub_textures_iter(
&self,
) -> impl ExactSizeIterator<Item = Ref<'_, LayerSubTexture>>
pub fn sub_textures_iter( &self, ) -> impl ExactSizeIterator<Item = Ref<'_, LayerSubTexture>>
Iterate the elements, borrowing each in turn.
pub fn resize_sub_textures(&mut self, count: usize)
Sourcepub fn texture_id_tracks(&self) -> Ref<'_, TrackU32>
pub fn texture_id_tracks(&self) -> Ref<'_, TrackU32>
Texture ID animation (versions 800-1100) Borrows the field in place — no copy, no allocation.
pub fn texture_id_tracks_mut(&mut self) -> RefMut<'_, TrackU32>
Sourcepub fn alpha_tracks(&self) -> Ref<'_, TrackF32>
pub fn alpha_tracks(&self) -> Ref<'_, TrackF32>
Alpha animation Borrows the field in place — no copy, no allocation.
pub fn alpha_tracks_mut(&mut self) -> RefMut<'_, TrackF32>
Sourcepub fn emissive_gain_tracks(&self) -> Ref<'_, TrackF32>
pub fn emissive_gain_tracks(&self) -> Ref<'_, TrackF32>
Emissive gain animation Borrows the field in place — no copy, no allocation.
pub fn emissive_gain_tracks_mut(&mut self) -> RefMut<'_, TrackF32>
Sourcepub fn fresnel_color_tracks(&self) -> Ref<'_, TrackVector3f>
pub fn fresnel_color_tracks(&self) -> Ref<'_, TrackVector3f>
Fresnel color animation Borrows the field in place — no copy, no allocation.
pub fn fresnel_color_tracks_mut(&mut self) -> RefMut<'_, TrackVector3f>
Sourcepub fn fresnel_alpha_tracks(&self) -> Ref<'_, TrackF32>
pub fn fresnel_alpha_tracks(&self) -> Ref<'_, TrackF32>
Fresnel alpha animation Borrows the field in place — no copy, no allocation.
pub fn fresnel_alpha_tracks_mut(&mut self) -> RefMut<'_, TrackF32>
Sourcepub fn fresnel_team_color_tracks(&self) -> Ref<'_, TrackF32>
pub fn fresnel_team_color_tracks(&self) -> Ref<'_, TrackF32>
Fresnel team color animation Borrows the field in place — no copy, no allocation.