Skip to main content

Layer

Struct Layer 

Source
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

Source

pub fn new() -> Self

§Panics

Panics if the native allocation fails.

Source

pub fn filter_mode(&self) -> LayerFilterMode

Blending mode

Source

pub fn set_filter_mode(&mut self, value: LayerFilterMode)

Source

pub fn shading_flags(&self) -> LayerShadingFlag

Rendering flags

Source

pub fn set_shading_flags(&mut self, value: LayerShadingFlag)

Source

pub fn texture_id(&self) -> u32

Texture index (versions 800-1100)

Source

pub fn set_texture_id(&mut self, value: u32)

Source

pub fn texture_animation_id(&self) -> u32

Texture animation index

Source

pub fn set_texture_animation_id(&mut self, value: u32)

Source

pub fn coord_id(&self) -> u32

Texture coordinate set index

Source

pub fn set_coord_id(&mut self, value: u32)

Source

pub fn alpha(&self) -> f32

Layer opacity

Source

pub fn set_alpha(&mut self, value: f32)

Source

pub fn emissive_gain(&self) -> f32

Emissive light intensity (default 1.0)

Source

pub fn set_emissive_gain(&mut self, value: f32)

Source

pub fn fresnel_color(&self) -> Vector3f

Fresnel effect color

Source

pub fn set_fresnel_color(&mut self, value: Vector3f)

Source

pub fn fresnel_opacity(&self) -> f32

Fresnel effect opacity

Source

pub fn set_fresnel_opacity(&mut self, value: f32)

Source

pub fn fresnel_team_color(&self) -> f32

Fresnel team color factor

Source

pub fn set_fresnel_team_color(&mut self, value: f32)

Source

pub fn shader(&self) -> LayerShaderType

Shader to use for this layer

Source

pub fn set_shader(&mut self, value: LayerShaderType)

Source

pub fn is_hd(&self) -> bool

True if using Reforged HD shading

Source

pub fn set_is_hd(&mut self, value: bool)

Source

pub fn sub_textures_len(&self) -> usize

Multi-texture support (version 1200+)

Source

pub fn sub_textures(&self, index: usize) -> Option<Ref<'_, LayerSubTexture>>

Borrows element index in place. None when out of range.

Source

pub fn sub_textures_mut( &mut self, index: usize, ) -> Option<RefMut<'_, LayerSubTexture>>

Source

pub fn sub_textures_iter( &self, ) -> impl ExactSizeIterator<Item = Ref<'_, LayerSubTexture>>

Iterate the elements, borrowing each in turn.

Source

pub fn resize_sub_textures(&mut self, count: usize)

Source

pub fn texture_id_tracks(&self) -> Ref<'_, TrackU32>

Texture ID animation (versions 800-1100) Borrows the field in place — no copy, no allocation.

Source

pub fn texture_id_tracks_mut(&mut self) -> RefMut<'_, TrackU32>

Source

pub fn alpha_tracks(&self) -> Ref<'_, TrackF32>

Alpha animation Borrows the field in place — no copy, no allocation.

Source

pub fn alpha_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Source

pub fn emissive_gain_tracks(&self) -> Ref<'_, TrackF32>

Emissive gain animation Borrows the field in place — no copy, no allocation.

Source

pub fn emissive_gain_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Source

pub fn fresnel_color_tracks(&self) -> Ref<'_, TrackVector3f>

Fresnel color animation Borrows the field in place — no copy, no allocation.

Source

pub fn fresnel_color_tracks_mut(&mut self) -> RefMut<'_, TrackVector3f>

Source

pub fn fresnel_alpha_tracks(&self) -> Ref<'_, TrackF32>

Fresnel alpha animation Borrows the field in place — no copy, no allocation.

Source

pub fn fresnel_alpha_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Source

pub fn fresnel_team_color_tracks(&self) -> Ref<'_, TrackF32>

Fresnel team color animation Borrows the field in place — no copy, no allocation.

Source

pub fn fresnel_team_color_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Trait Implementations§

Source§

impl Debug for Layer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Layer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for Layer

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for Layer

Auto Trait Implementations§

§

impl !Sync for Layer

§

impl Freeze for Layer

§

impl RefUnwindSafe for Layer

§

impl Unpin for Layer

§

impl UnsafeUnpin for Layer

§

impl UnwindSafe for Layer

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.