Skip to main content

NlaLayer3D

Struct NlaLayer3D 

Source
pub struct NlaLayer3D { /* private fields */ }
Expand description

Single Non-Linear Animation (NLA) playback layer supporting override/additive blending, joint bitmasks, and smooth crossfades.

Implementations§

Source§

impl NlaLayer3D

Fluent configuration and crossfade helpers for NlaLayer3D.

Source

pub const fn new(clip_index: usize) -> NlaLayer3D

Creates an enabled looping NlaLayer3D playing clip_index at full weight across all nodes.

§Arguments
  • usize - Target clip index in AnimationMixer3D::clips.
§Returns
  • Self - Configured NLA layer.
Source

pub fn with_weight(self, weight: f32) -> NlaLayer3D

Sets the initial blend weight clamped to [0.0, 1.0].

§Arguments
  • Self - Base NLA layer.
  • f32 - Layer blend weight.
§Returns
  • Self - Updated NLA layer.
Source

pub fn with_blend_mode(self, blend_mode: NlaBlendMode) -> NlaLayer3D

Sets the composition blend mode (Override or Additive).

§Arguments
  • Self - Base NLA layer.
  • NlaBlendMode - Blend composition mode.
§Returns
  • Self - Updated NLA layer.
Source

pub fn with_repeat_mode(self, repeat_mode: NlaRepeatMode) -> NlaLayer3D

Sets the playback repeat policy (Loop, Clamp, or PingPong).

§Arguments
  • Self - Base NLA layer.
  • NlaRepeatMode - Playback wrap policy.
§Returns
  • Self - Updated NLA layer.
Source

pub fn with_time_scale(self, time_scale: f32) -> NlaLayer3D

Sets the playback speed multiplier.

§Arguments
  • Self - Base NLA layer.
  • f32 - Time scale multiplier.
§Returns
  • Self - Updated NLA layer.
Source

pub fn with_joint_mask(self, joint_mask: u64) -> NlaLayer3D

Restricts this layer to scene nodes matching joint_mask ((1 << (node_id & 63)) & joint_mask != 0).

§Arguments
  • Self - Base NLA layer.
  • u64 - Node eligibility bitmask.
§Returns
  • Self - Updated NLA layer.
Source

pub fn start_crossfade(&mut self, target_weight: f32, duration_secs: f32)

Initiates a smooth linear crossfade from the current layer weight to target_weight over duration_secs.

§Arguments
  • &Self - Mutable NLA layer.
  • f32 - Destination blend weight in [0.0, 1.0].
  • f32 - Fade duration in seconds (<= 0.0 snaps immediately).
Source

pub fn advance(&mut self, dt_secs: f32)

Advances this layer’s clock and active crossfade envelope by dt_secs.

§Arguments
  • &Self - Mutable NLA layer.
  • f32 - Elapsed frame delta time in seconds.
Source§

impl NlaLayer3D

Source

pub fn get_clip_index(&self) -> usize

Source

pub fn get_mut_clip_index(&mut self) -> &mut usize

Source

pub fn set_clip_index(&mut self, val: usize) -> &mut NlaLayer3D

Source

pub fn get_weight(&self) -> f32

Source

pub fn get_mut_weight(&mut self) -> &mut f32

Source

pub fn set_weight(&mut self, val: f32) -> &mut NlaLayer3D

Source

pub fn get_blend_mode(&self) -> NlaBlendMode

Source

pub fn get_mut_blend_mode(&mut self) -> &mut NlaBlendMode

Source

pub fn set_blend_mode(&mut self, val: NlaBlendMode) -> &mut NlaLayer3D

Source

pub fn get_repeat_mode(&self) -> NlaRepeatMode

Source

pub fn get_mut_repeat_mode(&mut self) -> &mut NlaRepeatMode

Source

pub fn set_repeat_mode(&mut self, val: NlaRepeatMode) -> &mut NlaLayer3D

Source

pub fn get_time_secs(&self) -> f32

Source

pub fn get_mut_time_secs(&mut self) -> &mut f32

Source

pub fn set_time_secs(&mut self, val: f32) -> &mut NlaLayer3D

Source

pub fn get_time_scale(&self) -> f32

Source

pub fn get_mut_time_scale(&mut self) -> &mut f32

Source

pub fn set_time_scale(&mut self, val: f32) -> &mut NlaLayer3D

Source

pub fn get_fade_elapsed_secs(&self) -> f32

Source

pub fn get_mut_fade_elapsed_secs(&mut self) -> &mut f32

Source

pub fn set_fade_elapsed_secs(&mut self, val: f32) -> &mut NlaLayer3D

Source

pub fn get_fade_duration_secs(&self) -> f32

Source

pub fn get_mut_fade_duration_secs(&mut self) -> &mut f32

Source

pub fn set_fade_duration_secs(&mut self, val: f32) -> &mut NlaLayer3D

Source

pub fn get_fade_start_weight(&self) -> f32

Source

pub fn get_mut_fade_start_weight(&mut self) -> &mut f32

Source

pub fn set_fade_start_weight(&mut self, val: f32) -> &mut NlaLayer3D

Source

pub fn get_fade_target_weight(&self) -> f32

Source

pub fn get_mut_fade_target_weight(&mut self) -> &mut f32

Source

pub fn set_fade_target_weight(&mut self, val: f32) -> &mut NlaLayer3D

Source

pub fn get_joint_mask(&self) -> u64

Source

pub fn get_mut_joint_mask(&mut self) -> &mut u64

Source

pub fn set_joint_mask(&mut self, val: u64) -> &mut NlaLayer3D

Source

pub fn get_enabled(&self) -> bool

Source

pub fn get_mut_enabled(&mut self) -> &mut bool

Source

pub fn set_enabled(&mut self, val: bool) -> &mut NlaLayer3D

Trait Implementations§

Source§

impl Clone for NlaLayer3D

Source§

fn clone(&self) -> NlaLayer3D

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for NlaLayer3D

Source§

impl Debug for NlaLayer3D

Source§

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

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

impl Default for NlaLayer3D

Default playback configuration for NlaLayer3D.

Source§

fn default() -> NlaLayer3D

Returns an enabled looping override layer targeting clip 0 at full weight.

§Returns
  • Self - Default NLA layer.
Source§

impl PartialEq for NlaLayer3D

Source§

fn eq(&self, other: &NlaLayer3D) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for NlaLayer3D

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.