pub struct SkinData { /* private fields */ }Implementations§
Source§impl SkinData
impl SkinData
pub const DEFAULT_COLOR: [f32; 4]
pub fn get_name(&self) -> &str
pub fn get_color(&self) -> [f32; 4]
pub fn get_color_mut(&mut self) -> &mut [f32; 4]
Sourcepub fn get_attachments(&self) -> SkinAttachmentEntries<'_> ⓘ
pub fn get_attachments(&self) -> SkinAttachmentEntries<'_> ⓘ
Returns the flattened attachment entry view used by C++ Skin::getAttachments().
Sourcepub fn get_constraints(&self) -> SkinConstraintEntries<'_> ⓘ
pub fn get_constraints(&self) -> SkinConstraintEntries<'_> ⓘ
Returns the flattened constraint membership view used by C++ Skin::getConstraints().
pub fn get_bones(&self) -> &[usize]
pub fn get_bones_mut(&mut self) -> &mut Vec<usize>
Sourcepub fn add_skin(&mut self, other: &SkinData)
pub fn add_skin(&mut self, other: &SkinData)
Merges other into self (union of bones/constraints + last-write-wins attachments).
Mirrors the behaviour of the official runtimes’ Skin::addSkin.
Sourcepub fn copy_skin(&mut self, other: &SkinData)
pub fn copy_skin(&mut self, other: &SkinData)
Copies all attachments, bones, and constraints from other into this skin.
Mirrors Skin::copySkin. Attachments are owned data in this Rust model, so this uses
the same merge path as add_skin.
Sourcepub fn set_attachment(
&mut self,
slot_index: usize,
attachment_name: impl Into<String>,
attachment: AttachmentData,
)
pub fn set_attachment( &mut self, slot_index: usize, attachment_name: impl Into<String>, attachment: AttachmentData, )
Adds or replaces an attachment for the specified slot index and name.
Mirrors the official runtimes’ Skin::setAttachment, including growing the internal
slot bucket storage when the slot index is beyond the current skin capacity.
pub fn get_attachment( &self, slot_index: usize, attachment_name: &str, ) -> Option<&AttachmentData>
pub fn find_names_for_slot(&self, slot_index: usize, names: &mut Vec<String>)
pub fn find_attachments_for_slot<'a>( &'a self, slot_index: usize, attachments: &mut Vec<&'a AttachmentData>, )
Sourcepub fn remove_attachment(&mut self, slot_index: usize, attachment_name: &str)
pub fn remove_attachment(&mut self, slot_index: usize, attachment_name: &str)
Removes an attachment from the skin. Missing slots or names are no-ops, matching C++.