Struct rusty_spine::PointAttachment
source · pub struct PointAttachment { /* private fields */ }
Expand description
A lightweight, single point attachment with a translation and rotation.
Implementations§
source§impl PointAttachment
impl PointAttachment
pub fn compute_world_position(&self, bone: &Bone) -> (f32, f32)
pub fn compute_world_rotation(&self, bone: &Bone) -> f32
pub fn name(&self) -> &str
pub fn attachment_type(&self) -> AttachmentType
sourcepub fn color(&self) -> Color
pub fn color(&self) -> Color
The color of the point attachment as it was in Spine, or a default color if nonessential data was not exported. Point attachments are not usually rendered at runtime.
pub fn rotation(&self) -> f32
pub fn set_rotation(&mut self, value: f32)
pub fn x(&self) -> f32
pub fn set_x(&mut self, value: f32)
pub fn y(&self) -> f32
pub fn set_y(&mut self, value: f32)
sourcepub const fn c_ptr(&self) -> *mut spPointAttachment
pub const fn c_ptr(&self) -> *mut spPointAttachment
Get a pointer to the underlying spine-c
type.
source§impl PointAttachment
impl PointAttachment
Functions available if using the mint
feature.
pub fn translation(&self) -> Vector2<f32>
Trait Implementations§
source§impl Debug for PointAttachment
impl Debug for PointAttachment
source§impl NewFromPtr<spPointAttachment> for PointAttachment
impl NewFromPtr<spPointAttachment> for PointAttachment
unsafe fn new_from_ptr(c_point_attachment: *mut spPointAttachment) -> Self
Auto Trait Implementations§
impl Freeze for PointAttachment
impl RefUnwindSafe for PointAttachment
impl Send for PointAttachment
impl Sync for PointAttachment
impl Unpin for PointAttachment
impl UnwindSafe for PointAttachment
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more