pub struct BoneConstraint {
pub bone_index: u32,
pub constraint_type: ConstraintType,
pub target_bone: Option<u32>,
pub influence: f32,
pub min: Vec3,
pub max: Vec3,
pub enabled: bool,
}Fields§
§bone_index: u32§constraint_type: ConstraintType§target_bone: Option<u32>§influence: f32§min: Vec3§max: Vec3§enabled: boolImplementations§
Source§impl BoneConstraint
impl BoneConstraint
pub fn look_at(bone: u32, target: u32) -> Self
pub fn limit_rotation(bone: u32, min: Vec3, max: Vec3) -> Self
pub fn apply_look_at( bone_transform: &Transform, target_world_pos: Vec3, up: Vec3, ) -> Transform
pub fn apply_limit_rotation(t: &Transform, min: Vec3, max: Vec3) -> Transform
Trait Implementations§
Source§impl Clone for BoneConstraint
impl Clone for BoneConstraint
Auto Trait Implementations§
impl Freeze for BoneConstraint
impl RefUnwindSafe for BoneConstraint
impl Send for BoneConstraint
impl Sync for BoneConstraint
impl Unpin for BoneConstraint
impl UnsafeUnpin for BoneConstraint
impl UnwindSafe for BoneConstraint
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.