pub struct Rig {
pub rig_version: u32,
pub parts: Vec<RigPart>,
pub clips: BTreeMap<String, Clip>,
pub provenance: RigProvenance,
}Expand description
One rig document.
Fields§
§rig_version: u32The document version; RIG_VERSION.
parts: Vec<RigPart>One display entity each, in emission order.
clips: BTreeMap<String, Clip>Named clips. A frame is one transform per part, in Self::parts
order, in the rig’s own frame: origin at the assembly’s mark (the cell’s
centre at the mark’s floor plane), +z the rig’s front.
provenance: RigProvenanceWhere the rig came from (ADR-0013’s record, as a piece’s metadata carries it).
Implementations§
Source§impl Rig
impl Rig
Sourcepub fn clip_names(&self) -> Vec<&str>
pub fn clip_names(&self) -> Vec<&str>
The clip names, in the order the compiler numbers them.
Sourcepub fn clip_index(&self, name: &str) -> Option<usize>
pub fn clip_index(&self, name: &str) -> Option<usize>
The compiler’s index for a clip: its position in name order.
Sourcepub fn rest_pose(&self) -> Option<Vec<Transform>>
pub fn rest_pose(&self) -> Option<Vec<Transform>>
The rest pose: each part’s rest, else the first frame of the first
clip. None only for a rig check refuses.
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Total frames across every clip — the count of frame functions the compiler emits for this rig.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rig
impl<'de> Deserialize<'de> for Rig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Rig
Auto Trait Implementations§
impl Freeze for Rig
impl RefUnwindSafe for Rig
impl Send for Rig
impl Sync for Rig
impl Unpin for Rig
impl UnsafeUnpin for Rig
impl UnwindSafe for Rig
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