Skip to main content

Rig

Struct Rig 

Source
pub struct Rig {
Show 18 fields pub twist: [f32; 4], pub stretch: [f32; 3], pub translation_dof: bool, pub root_motion_bone: i32, pub unmapped_bone: Option<usize>, pub no_axes: Option<usize>, pub no_tos: Option<usize>, pub renamed: Option<usize>, pub transform_hierarchy: bool, pub avatar: bool, pub body_offset: [f32; 3], pub root_offset: bool, pub optional: Vec<usize>, pub bone_mass: Option<Vec<f32>>, pub scale: f32, pub hierarchy: bool, pub armature: Vec<([f32; 3], [f32; 4], f32)>, pub positions: Vec<(usize, [f32; 3])>,
}
Expand description

Rig and Avatar choices. The default is a valid neutral rig.

Fields§

§twist: [f32; 4]§stretch: [f32; 3]§translation_dof: bool§root_motion_bone: i32§unmapped_bone: Option<usize>

A HumanBodyBones index left unmapped in m_HumanBoneIndex.

§no_axes: Option<usize>

A rig bone (index into BONES) whose axes record is absent.

§no_tos: Option<usize>

A rig bone whose m_TOS entry is absent.

§renamed: Option<usize>

A rig bone whose GameObject name differs from its TOS path.

§transform_hierarchy: bool§avatar: bool§body_offset: [f32; 3]

The Avatar’s rest body offset m_RootX translation.

§root_offset: bool

Move the Animator node off the identity.

§optional: Vec<usize>

HumanBodyBones indices from OPTIONAL_BONES the rig adds, in order.

§bone_mass: Option<Vec<f32>>

m_HumanBoneMass; None stores an equal share per mapped slot.

§scale: f32

m_Scale.

§hierarchy: bool

The Avatar’s human skeleton in HumanTrait’s hierarchy over the present bones, at t_pose, its nodes ordered by depth (arrange); otherwise every bone hangs on Hips at the origin.

§armature: Vec<([f32; 3], [f32; 4], f32)>

Nodes between the Animator node and Hips, top down, each a local translation, rotation and uniform scale: GameObjects 90 + k named Armature<k>, prefixing every rig path.

§positions: Vec<(usize, [f32; 3])>

With hierarchy, T-pose positions in the Animator frame that replace t_pose’s, per HumanBodyBones bone.

Trait Implementations§

Source§

impl Clone for Rig

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 Rig

Source§

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

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

impl Default for Rig

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl Forget for Rig

§

impl Freeze for Rig

§

impl Move for Rig

§

impl RefUnwindSafe for Rig

§

impl Send for Rig

§

impl Sync for Rig

§

impl Unpin for Rig

§

impl UnsafeUnpin for Rig

§

impl UnwindSafe for Rig

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.