From 2ded1ac2a07e52fd209988fb3d153036d5ecb77e Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 2 Dec 2023 19:59:41 -0500 Subject: [PATCH] Improve PBD documentation --- src/pbd.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pbd.rs b/src/pbd.rs index 451d90d..d70bfb8 100644 --- a/src/pbd.rs +++ b/src/pbd.rs @@ -48,16 +48,20 @@ pub struct PreBoneDeformer { #[derive(Debug)] pub struct PreBoneDeformBone { + /// Name of the affected bone pub name: String, + /// The deform matrix pub deform: [f32; 12] } #[derive(Debug)] pub struct PreBoneDeformMatrices { + /// The prebone deform bones pub bones: Vec } impl PreBoneDeformer { + /// Reads an existing PBD file pub fn from_existing(buffer: ByteSpan) -> Option { let mut cursor = Cursor::new(buffer); let mut header = PreBoneDeformerHeader::read(&mut cursor).ok()?; @@ -69,6 +73,7 @@ impl PreBoneDeformer { }) } + /// Calculates the deform matrices between two races pub fn get_deform_matrices(&self, from_body_id: u16, to_body_id: u16) -> Option { if from_body_id == to_body_id { return None;