Struct rusty_spine::SkeletonData

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

Static skeleton data imported from Spine.

Spine API Reference

Implementations§

source§

impl SkeletonData

source

pub fn find_bone( &self, name: &str ) -> Option<CTmpRef<'_, SkeletonData, BoneData>>

source

pub fn find_slot( &self, name: &str ) -> Option<CTmpRef<'_, SkeletonData, SlotData>>

source

pub fn find_skin(&self, name: &str) -> Option<CTmpRef<'_, SkeletonData, Skin>>

source

pub fn find_animation( &self, name: &str ) -> Option<CTmpRef<'_, SkeletonData, Animation>>

source

pub fn find_ik_constraint( &self, name: &str ) -> Option<CTmpRef<'_, SkeletonData, IkConstraintData>>

source

pub fn find_path_constraint( &self, name: &str ) -> Option<CTmpRef<'_, SkeletonData, PathConstraintData>>

source

pub fn find_physics_constraint( &self, name: &str ) -> Option<CTmpRef<'_, SkeletonData, PhysicsConstraintData>>

source

pub fn find_transform_constraint( &self, name: &str ) -> Option<CTmpRef<'_, SkeletonData, TransformConstraintData>>

source

pub fn version(&self) -> Option<&str>

The Spine version used to export the skeleton data, or None.

source

pub fn hash(&self) -> &str

The skeleton data hash. This value will change if any of the skeleton data has changed.

source

pub fn images_path(&self) -> Option<&str>

The path to the images directory as defined in Spine, or None if nonessential data was not exported.

source

pub fn audio_path(&self) -> Option<&str>

The path to the audio directory as defined in Spine, or None if nonessential data was not exported.

source

pub fn x(&self) -> f32

The X coordinate of the skeleton’s axis aligned bounding box in the setup pose.

source

pub fn y(&self) -> f32

The Y coordinate of the skeleton’s axis aligned bounding box in the setup pose.

source

pub fn width(&self) -> f32

The width of the skeleton’s axis aligned bounding box in the setup pose.

source

pub fn height(&self) -> f32

The height of the skeleton’s axis aligned bounding box in the setup pose.

source

pub fn bones_count(&self) -> usize

source

pub fn slots_count(&self) -> usize

source

pub fn skins_count(&self) -> usize

source

pub fn events_count(&self) -> usize

source

pub fn animations_count(&self) -> usize

source

pub fn ik_contraints_count(&self) -> usize

The number of IK constraints in this skeleton.

source

pub fn path_contraints_count(&self) -> usize

The number of path constraints in this skeleton.

source

pub fn physics_contraints_count(&self) -> usize

The number of physics constraints in this skeleton.

source

pub fn transform_contraints_count(&self) -> usize

The number of transform constraints in this skeleton.

source

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

source

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

source

pub fn slots(&self) -> CTmpPtrIterator<'_, SkeletonData, SlotData, spSlotData>

source

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

source

pub fn skins(&self) -> CTmpPtrIterator<'_, SkeletonData, Skin, spSkin>

source

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

source

pub fn default_skin(&self) -> CTmpRef<'_, Self, Skin>

source

pub fn animations( &self ) -> CTmpPtrIterator<'_, SkeletonData, Animation, spAnimation>

source

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

source

pub fn ik_constraints( &self ) -> CTmpPtrIterator<'_, SkeletonData, IkConstraintData, spIkConstraintData>

source

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

source

pub fn path_constraints( &self ) -> CTmpPtrIterator<'_, SkeletonData, PathConstraintData, spPathConstraintData>

source

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

source

pub fn physics_constraints( &self ) -> CTmpPtrIterator<'_, SkeletonData, PhysicsConstraintData, spPhysicsConstraintData>

source

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

source

pub fn transform_constraints( &self ) -> CTmpPtrIterator<'_, SkeletonData, TransformConstraintData, spTransformConstraintData>

source

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

source

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

Get a pointer to the underlying spine-c type.

source§

impl SkeletonData

Functions available if using the mint feature.

source

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

The translation of the skeleton’s axis aligned bounding box in the setup pose.

source

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

The size of the skeleton’s axis aligned bounding box in the setup pose.

Trait Implementations§

source§

impl Debug for SkeletonData

source§

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

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

impl Drop for SkeletonData

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl NewFromPtr<spSkeletonData> for SkeletonData

source§

unsafe fn new_from_ptr(c_skeleton_data: *mut spSkeletonData) -> 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.