Struct rusty_spine::PathAttachment
source · pub struct PathAttachment { /* private fields */ }
Expand description
An attachment of vertices forming a Bezier curve.
Implementations§
source§impl PathAttachment
impl PathAttachment
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 set_closed(&mut self, value: bool)
pub fn set_closed(&mut self, value: bool)
Set closed, see closed
.
sourcepub fn color(&self) -> Color
pub fn color(&self) -> Color
The color of the path as it was in Spine, or a default color if nonessential data was not exported. Paths are not usually rendered at runtime.
pub fn color_mut(&mut self) -> &mut Color
sourcepub fn constant_speed(&self) -> bool
pub fn constant_speed(&self) -> bool
If true
, additional calculations are performed to make computing positions along the
path more accurate and movement along the path have a constant speed.
pub fn set_constant_speed(&mut self, value: bool)
sourcepub fn lengths(&self) -> *mut c_float
pub fn lengths(&self) -> *mut c_float
The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve.
sourcepub const fn c_ptr(&self) -> *mut spPathAttachment
pub const fn c_ptr(&self) -> *mut spPathAttachment
Get a pointer to the underlying spine-c
type.