Struct rusty_spine::IkConstraintData
source · pub struct IkConstraintData { /* private fields */ }
Expand description
Stores the setup pose for an IkConstraint
.
Implementations§
source§impl IkConstraintData
impl IkConstraintData
sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The constraint’s name, which is unique across all constraints in the skeleton of the same type.
sourcepub fn order(&self) -> i32
pub fn order(&self) -> i32
The ordinal of this constraint for the order a skeleton’s constraints will be applied by
Skeleton::update_world_transform
.
sourcepub fn skin_required(&self) -> bool
pub fn skin_required(&self) -> bool
When true,
Skeleton::update_world_transform
only
updates this constraint if the skin contains this constraint.
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.
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.
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.
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.
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 bones_count(&self) -> usize
pub fn bones( &self ) -> CTmpPtrIterator<'_, IkConstraintData, BoneData, spBoneData> ⓘ
pub fn bone_at_index(&self, index: usize) -> Option<CTmpRef<'_, Self, BoneData>>
pub fn target(&self) -> CTmpRef<'_, Self, BoneData>
sourcepub const fn c_ptr(&self) -> *mut spIkConstraintData
pub const fn c_ptr(&self) -> *mut spIkConstraintData
Get a pointer to the underlying spine-c
type.