Struct rusty_spine::IkConstraint
source · pub struct IkConstraint { /* private fields */ }
Expand description
Implementations§
source§impl IkConstraint
impl IkConstraint
pub fn set_to_setup_pose(&self)
sourcepub fn data(&self) -> CTmpRef<'_, Self, IkConstraintData>
pub fn data(&self) -> CTmpRef<'_, Self, IkConstraintData>
The IK constraint’s setup pose data.
pub fn data_mut(&mut self) -> CTmpMut<'_, Self, IkConstraintData>
pub fn active(&self) -> bool
sourcepub fn bend_direction(&self) -> i32
pub fn bend_direction(&self) -> i32
For two bone IK, controls the bend direction of the IK bones, either 1 or -1.
pub fn set_bend_direction(&mut self, value: i32)
sourcepub fn compress(&self) -> bool
pub fn compress(&self) -> bool
For one bone IK, when true and the target is too close, the bone is scaled to reach it.
pub fn set_compress(&mut self, value: bool)
sourcepub fn mix(&self) -> f32
pub fn mix(&self) -> f32
A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.
For two bone IK: if the parent bone has local nonuniform scale, the child bone’s local Y translation is set to 0.
pub fn set_mix(&mut self, value: f32)
sourcepub fn softness(&self) -> f32
pub fn softness(&self) -> f32
For two bone IK, the target bone’s distance from the maximum reach of the bones where rotation begins to slow. The bones will not straighten completely until the target is this far out of range.
pub fn set_softness(&mut self, value: f32)
sourcepub fn stretch(&self) -> bool
pub fn stretch(&self) -> bool
When true and the target is out of range, the parent bone is scaled to reach it.
For two bone IK: 1) the child bone’s local Y translation is set to 0, 2) stretch is not
applied if softness
is > 0, and 3) if the parent bone has local
nonuniform scale, stretch is not applied.
pub fn set_stretch(&mut self, value: bool)
pub fn bones_count(&self) -> usize
sourcepub fn bones(&self) -> CTmpPtrIterator<'_, IkConstraint, Bone, spBone> ⓘ
pub fn bones(&self) -> CTmpPtrIterator<'_, IkConstraint, Bone, spBone> ⓘ
The bones that will be modified by this IK constraint.
pub fn bone_at_index(&self, index: usize) -> Option<CTmpRef<'_, Self, Bone>>
pub fn target_mut(&mut self) -> CTmpMut<'_, Self, Bone>
sourcepub const fn c_ptr(&self) -> *mut spIkConstraint
pub const fn c_ptr(&self) -> *mut spIkConstraint
Get a pointer to the underlying spine-c
type.