Skip to main content

BlendNode

Struct BlendNode 

Source
pub struct BlendNode {
Show 16 fields pub blend_type: i64, pub event_id: u32, pub event_y_id: u32, pub children: Vec<u32>, pub thresholds: Vec<f32>, pub positions: Vec<[f32; 2]>, pub magnitudes: Vec<f32>, pub pair_vectors: Vec<[f32; 2]>, pub pair_avg_mag_inv: Vec<f32>, pub neighbors: Vec<Vec<u32>>, pub direct_events: Vec<u32>, pub normalized_blend_values: bool, pub clip: u32, pub duration: f32, pub cycle_offset: f32, pub mirror: bool,
}
Expand description

One node of a blend tree (BlendTreeNodeConstant): its kind (0 1D, 1 simple 2D, 2 freeform directional, 3 freeform cartesian, 4 direct, as Unity numbers them), the parameters it blends by, its children and thresholds or positions, and for a leaf the clip (clip: an index of the controller’s clips, u32::MAX for none).

Fields§

§blend_type: i64

m_BlendType.

§event_id: u32

m_BlendEventID: the CRC-32 of the parameter the node blends by.

§event_y_id: u32

m_BlendEventYID: the second parameter, of a 2D node.

§children: Vec<u32>

m_ChildIndices: the children’s indices in the tree’s nodes.

§thresholds: Vec<f32>

m_ChildThresholdArray of the 1D data.

§positions: Vec<[f32; 2]>

m_ChildPositionArray of the 2D data.

§magnitudes: Vec<f32>

m_ChildMagnitudeArray of the 2D data.

§pair_vectors: Vec<[f32; 2]>

m_ChildPairVectorArray of the 2D data.

§pair_avg_mag_inv: Vec<f32>

m_ChildPairAvgMagInvArray of the 2D data.

§neighbors: Vec<Vec<u32>>

m_ChildNeighborListArray: per child the indices of its neighbours in the 2D tree.

§direct_events: Vec<u32>

m_ChildBlendEventIDArray of the direct data: the CRC-32 of each child’s parameter.

§normalized_blend_values: bool

m_NormalizedBlendValues of the direct data.

§clip: u32

m_ClipID.

§duration: f32

m_Duration.

§cycle_offset: f32

m_CycleOffset.

§mirror: bool

m_Mirror.

Trait Implementations§

Source§

impl Clone for BlendNode

Source§

fn clone(&self) -> Self

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 Debug for BlendNode

Source§

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

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

impl PartialEq for BlendNode

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for BlendNode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for BlendNode

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.