pub struct IkRig {
pub chains: HashMap<String, IkChain>,
pub targets: HashMap<String, Vec3>,
pub poles: HashMap<String, Vec3>,
pub weights: HashMap<String, f32>,
pub enabled: bool,
}Expand description
A full character IK rig with multiple named chains.
Fields§
§chains: HashMap<String, IkChain>§targets: HashMap<String, Vec3>§poles: HashMap<String, Vec3>§weights: HashMap<String, f32>§enabled: boolImplementations§
Source§impl IkRig
impl IkRig
pub fn new() -> Self
pub fn add_chain(&mut self, name: impl Into<String>, chain: IkChain)
pub fn set_target(&mut self, chain: &str, target: Vec3)
pub fn set_pole(&mut self, chain: &str, pole: Vec3)
pub fn set_weight(&mut self, chain: &str, w: f32)
Sourcepub fn end_effector(&self, chain: &str) -> Option<Vec3>
pub fn end_effector(&self, chain: &str) -> Option<Vec3>
Get the solved end-effector position for a named chain.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IkRig
impl RefUnwindSafe for IkRig
impl Send for IkRig
impl Sync for IkRig
impl Unpin for IkRig
impl UnsafeUnpin for IkRig
impl UnwindSafe for IkRig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.