Struct rusty_spine::IkConstraintData

source ·
pub struct IkConstraintData { /* private fields */ }
Expand description

Stores the setup pose for an IkConstraint.

Spine API Reference

Implementations§

source§

impl IkConstraintData

source

pub fn name(&self) -> &str

The constraint’s name, which is unique across all constraints in the skeleton of the same type.

source

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.

source

pub fn skin_required(&self) -> bool

When true, Skeleton::update_world_transform only updates this constraint if the skin contains this constraint.

source

pub fn bend_direction(&self) -> i32

For two bone IK, controls the bend direction of the IK bones, either 1 or -1.

source

pub fn compress(&self) -> bool

For one bone IK, when true and the target is too close, the bone is scaled to reach it.

source

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.

source

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.

source

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.

source

pub fn uniform(&self) -> bool

When true and compress or stretch is used, the bone is scaled on both the X and Y axes.

source

pub fn bones_count(&self) -> usize

source

pub fn bones( &self ) -> CTmpPtrIterator<'_, IkConstraintData, BoneData, spBoneData>

source

pub fn bone_at_index(&self, index: usize) -> Option<CTmpRef<'_, Self, BoneData>>

source

pub fn target(&self) -> CTmpRef<'_, Self, BoneData>

source

pub const fn c_ptr(&self) -> *mut spIkConstraintData

Get a pointer to the underlying spine-c type.

Trait Implementations§

source§

impl Debug for IkConstraintData

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl NewFromPtr<spIkConstraintData> for IkConstraintData

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.