Struct rusty_spine::BoundingBoxAttachment
source · pub struct BoundingBoxAttachment { /* private fields */ }
Expand description
An attachment made up of vertices for use in collision detection, hitboxes, etc.
Implementations§
source§impl BoundingBoxAttachment
impl BoundingBoxAttachment
pub fn name(&self) -> &str
pub fn attachment_type(&self) -> AttachmentType
sourcepub unsafe fn compute_world_vertices(
&self,
slot: &Slot,
start: i32,
count: i32,
world_vertices: &mut [f32],
offset: i32,
stride: i32
)
pub unsafe fn compute_world_vertices( &self, slot: &Slot, start: i32, count: i32, world_vertices: &mut [f32], offset: i32, stride: i32 )
§Safety
The slot passed in must be the same slot this attachment originated from.
pub fn world_vertices_length(&self) -> i32
pub fn id(&self) -> i32
pub fn bones(&self) -> &[i32]
sourcepub fn vertices(&self) -> &[f32]
pub fn vertices(&self) -> &[f32]
Gets the raw float array slice representing the vertices of the attachment. If using
the mint
feature, the Self::vertices2
function may be more convenient to use.
sourcepub fn color(&self) -> Color
pub fn color(&self) -> Color
The color of the bounding box as it was in Spine, or a default color if nonessential data was not exported. Bounding boxes are not usually rendered at runtime.
sourcepub const fn c_ptr(&self) -> *mut spBoundingBoxAttachment
pub const fn c_ptr(&self) -> *mut spBoundingBoxAttachment
Get a pointer to the underlying spine-c
type.
Trait Implementations§
source§impl Debug for BoundingBoxAttachment
impl Debug for BoundingBoxAttachment
source§impl NewFromPtr<spBoundingBoxAttachment> for BoundingBoxAttachment
impl NewFromPtr<spBoundingBoxAttachment> for BoundingBoxAttachment
unsafe fn new_from_ptr( c_bounding_box_attachment: *mut spBoundingBoxAttachment ) -> Self
Auto Trait Implementations§
impl Freeze for BoundingBoxAttachment
impl RefUnwindSafe for BoundingBoxAttachment
impl Send for BoundingBoxAttachment
impl Sync for BoundingBoxAttachment
impl Unpin for BoundingBoxAttachment
impl UnwindSafe for BoundingBoxAttachment
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