Struct rusty_spine::TransformConstraintData

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

Stores the setup pose for a TransformConstraint.

Spine API Reference

Implementations§

source§

impl TransformConstraintData

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 local(&self) -> bool

source

pub fn mix_rotate(&self) -> f32

A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.

source

pub fn mix_scale_x(&self) -> f32

A percentage (0-1) that controls the mix between the constrained and unconstrained scale X.

source

pub fn mix_scale_y(&self) -> f32

A percentage (0-1) that controls the mix between the constrained and unconstrained scale Y.

source

pub fn mix_shear_y(&self) -> f32

A percentage (0-1) that controls the mix between the constrained and unconstrained shear Y.

source

pub fn mix_x(&self) -> f32

A percentage (0-1) that controls the mix between the constrained and unconstrained translation X.

source

pub fn mix_y(&self) -> f32

A percentage (0-1) that controls the mix between the constrained and unconstrained translation Y.

source

pub fn offset_rotation(&self) -> f32

An offset added to the constrained bone rotation.

source

pub fn offset_scale_x(&self) -> f32

An offset added to the constrained bone scale X.

source

pub fn offset_scale_y(&self) -> f32

An offset added to the constrained bone scale Y.

source

pub fn offset_shear_y(&self) -> f32

An offset added to the constrained bone shear Y.

source

pub fn offset_x(&self) -> f32

An offset added to the constrained bone X translation.

source

pub fn offset_y(&self) -> f32

An offset added to the constrained bone Y translation.

source

pub fn relative(&self) -> bool

source

pub fn bones_count(&self) -> usize

source

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

source

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

source

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

The target bone whose world transform will be copied to the constrained bones.

source

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

Get a pointer to the underlying spine-c type.

source§

impl TransformConstraintData

Functions available if using the mint feature.

source

pub fn mix_scale(&self) -> Vector2<f32>

source

pub fn mix(&self) -> Vector2<f32>

source

pub fn offset_scale(&self) -> Vector2<f32>

source

pub fn offset(&self) -> Vector2<f32>

Trait Implementations§

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.