From a2db761e18e992a4c462357a426696f8716a3377 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 2 Dec 2023 19:57:04 -0500 Subject: [PATCH] Improve SKLB documentation --- src/skeleton.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/skeleton.rs b/src/skeleton.rs index 5865411..0fe194b 100644 --- a/src/skeleton.rs +++ b/src/skeleton.rs @@ -55,20 +55,27 @@ struct SKLB { #[derive(Debug)] pub struct Bone { + /// Name of the bone pub name: String, + /// Index of the parent bone in the Skeleton's `bones` vector pub parent_index: i32, + /// Position of the bone pub position: [f32; 3], + /// Rotation quanternion of the bone pub rotation: [f32; 4], + /// Scale of the bone pub scale: [f32; 3], } #[derive(Debug)] pub struct Skeleton { + /// Bones of this skeleton pub bones: Vec, } impl Skeleton { + /// Reads an existing SKLB file pub fn from_existing(buffer: ByteSpan) -> Option { let mut cursor = Cursor::new(buffer);