pub struct CharacterRig {
pub name: String,
pub joints: Vec<RigJoint>,
pub morph_bindings: Vec<MorphBinding>,
pub regions: Vec<RigBodyRegion>,
pub metadata: HashMap<String, String>,
}Expand description
The complete character rig.
Fields§
§name: String§joints: Vec<RigJoint>§morph_bindings: Vec<MorphBinding>§regions: Vec<RigBodyRegion>§metadata: HashMap<String, String>Implementations§
Source§impl CharacterRig
impl CharacterRig
Sourcepub fn add_morph_binding(&mut self, binding: MorphBinding)
pub fn add_morph_binding(&mut self, binding: MorphBinding)
Add a morph binding.
Sourcepub fn add_region(&mut self, region: RigBodyRegion)
pub fn add_region(&mut self, region: RigBodyRegion)
Add a body region.
Sourcepub fn joint_count(&self) -> usize
pub fn joint_count(&self) -> usize
Number of joints in the rig.
Sourcepub fn morph_binding_count(&self) -> usize
pub fn morph_binding_count(&self) -> usize
Number of morph bindings.
Sourcepub fn root_joints(&self) -> Vec<&RigJoint>
pub fn root_joints(&self) -> Vec<&RigJoint>
Return all joints that have no parent (i.e. root joints).
Sourcepub fn children_of(&self, parent: &str) -> Vec<&RigJoint>
pub fn children_of(&self, parent: &str) -> Vec<&RigJoint>
Return all joints whose parent is parent.
Sourcepub fn joint_depth(&self, name: &str) -> usize
pub fn joint_depth(&self, name: &str) -> usize
Return the depth of name in the joint hierarchy (root = 0).
Sourcepub fn bindings_for_param(&self, param: &str) -> Vec<&MorphBinding>
pub fn bindings_for_param(&self, param: &str) -> Vec<&MorphBinding>
Return all bindings driven by param.
Sourcepub fn bindings_for_joint(&self, joint: &str) -> Vec<&MorphBinding>
pub fn bindings_for_joint(&self, joint: &str) -> Vec<&MorphBinding>
Return all bindings that have joint as their joint driver.
Auto Trait Implementations§
impl Freeze for CharacterRig
impl RefUnwindSafe for CharacterRig
impl Send for CharacterRig
impl Sync for CharacterRig
impl Unpin for CharacterRig
impl UnsafeUnpin for CharacterRig
impl UnwindSafe for CharacterRig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more