Struct rusty_spine::PathConstraint

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

Implementations§

source§

impl PathConstraint

source

pub fn update(&self)

Applies the constraint to the constrained bones.

source

pub fn set_to_setup_pose(&self)

source

pub fn data(&self) -> CTmpRef<'_, Self, PathConstraintData>

The path constraint’s setup pose data.

source

pub fn data_mut(&mut self) -> CTmpMut<'_, Self, PathConstraintData>

source

pub fn active(&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 set_mix_rotate(&mut self, value: f32)

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 set_mix_x(&mut self, value: f32)

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 set_mix_y(&mut self, value: f32)

source

pub fn position(&self) -> f32

The position along the path.

source

pub fn set_position(&mut self, value: f32)

source

pub fn spacing(&self) -> f32

The spacing between bones.

source

pub fn set_spacing(&mut self, value: f32)

source

pub fn bones_count(&self) -> usize

source

pub fn bones(&self) -> CTmpPtrIterator<'_, PathConstraint, Bone, spBone>

The bones that will be modified by this path constraint.

source

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

source

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

The slot whose path attachment will be used to constrained the bones.

source

pub fn target_mut(&mut self) -> CTmpMut<'_, Self, Slot>

source

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

Get a pointer to the underlying spine-c type.

source§

impl PathConstraint

Functions available if using the mint feature.

source

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

source

pub fn set_mix(&mut self, mix: impl Into<Vector2<f32>>)

Trait Implementations§

source§

impl Debug for PathConstraint

source§

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

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

impl NewFromPtr<spPathConstraint> for PathConstraint

source§

unsafe fn new_from_ptr(c_slot: *mut spPathConstraint) -> Self

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.