Struct rusty_spine::PhysicsConstraintData

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

Stores the setup pose for a PhysicsConstraint.

Spine API Reference

Implementations§

source§

impl PhysicsConstraintData

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 damping(&self) -> f32

source

pub fn damping_global(&self) -> bool

source

pub fn gravity(&self) -> f32

source

pub fn gravity_global(&self) -> bool

source

pub fn inertia(&self) -> f32

source

pub fn inertia_global(&self) -> bool

source

pub fn limit(&self) -> f32

source

pub fn mass_global(&self) -> bool

source

pub fn mass_inverse(&self) -> f32

source

pub fn mix(&self) -> f32

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

source

pub fn mix_global(&self) -> bool

source

pub fn rotate(&self) -> f32

source

pub fn scale_x(&self) -> f32

source

pub fn shear_x(&self) -> f32

source

pub fn step(&self) -> f32

source

pub fn strength(&self) -> f32

source

pub fn strength_global(&self) -> bool

source

pub fn wind(&self) -> f32

source

pub fn wind_global(&self) -> bool

source

pub fn x(&self) -> f32

source

pub fn y(&self) -> f32

source

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

The bone constrained by this physics constraint.

source

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

Get a pointer to the underlying spine-c type.

source§

impl PhysicsConstraintData

Functions available if using the mint feature.

source

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

Trait Implementations§

source§

impl Debug for PhysicsConstraintData

source§

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

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

impl NewFromPtr<spPhysicsConstraintData> for PhysicsConstraintData

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.