Skip to main content

RegionAttachment

Struct RegionAttachment 

Source
pub struct RegionAttachment<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> RegionAttachment<'a>

Source

pub fn load_vertices(&self, bone: &Bone<'_>, vertices: &mut [f32; 8])

Loads the 8 vertex positions for this attachments rendering into the provided vertices buffer.

§spine-c

Maps to calling spRegionAttachment_computeWorldVertices

Source

pub fn get_vertices(&self, bone: &Bone<'_>) -> [f32; 8]

Returns the 8 vertex positions for this attachments rendering in a new array.

§spine-c

Maps to calling spRegionAttachment_computeWorldVertices

Source

pub fn texture_id(&self) -> u32

Returns the u32 texture id which was provided for this image during Atlas loading.

§spine-c

Maps to dereferencing ((*spAtlasRegion)spRegionAttachment->rendererObject)->rendererObject

Source

pub fn rotation(&self) -> f32

Source

pub fn color(&self) -> [f32; 4]

Source

pub fn position(&self) -> [f32; 2]

Source

pub fn scale(&self) -> [f32; 2]

Source

pub fn dimensions(&self) -> [f32; 2]

Source

pub fn uv(&self) -> [f32; 8]

Source

pub fn offset(&self) -> [f32; 8]

Auto Trait Implementations§

§

impl<'a> !Send for RegionAttachment<'a>

§

impl<'a> !Sync for RegionAttachment<'a>

§

impl<'a> Freeze for RegionAttachment<'a>

§

impl<'a> RefUnwindSafe for RegionAttachment<'a>

§

impl<'a> Unpin for RegionAttachment<'a>

§

impl<'a> UnsafeUnpin for RegionAttachment<'a>

§

impl<'a> UnwindSafe for RegionAttachment<'a>

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>,

Source§

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>,

Source§

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.