create constructors for VmcExtSetPeriod

This commit is contained in:
Cassandra de la Cruz-Munoz 2024-01-01 14:01:06 -05:00
parent 3a55079212
commit f24d788950
Signed by: cassdlcm
GPG Key ID: BFEBACEA812DDA70

View File

@ -1725,7 +1725,7 @@ impl VmcThru {
} }
#[derive(Debug)] #[derive(Debug)]
struct VmcExtSetPeriod { pub struct VmcExtSetPeriod {
status: i32, status: i32,
root: i32, root: i32,
bone: i32, bone: i32,
@ -1786,6 +1786,18 @@ impl VmcMessage for VmcExtSetPeriod {
} }
} }
impl VmcExtSetPeriod {
pub fn new(status: i32, root: i32, bone: i32, blendshape: i32, camera: i32, devices: i32) ->MsgNewResult<Self> {
Ok(Self { status, root, bone, blendshape, camera, devices})
}
pub fn new_vmc_message(status: i32, root: i32, bone: i32, blendshape: i32, camera: i32, devices: i32) ->TraitMsgNewResult {
match Self::new(status, root, bone, blendshape, camera, devices) {
Ok(val) => Ok(Box::new(val)),
Err(val) => Err(val),
}
}
}
#[derive(Debug)] #[derive(Debug)]
struct VmcExtSetEye { struct VmcExtSetEye {
enable: i32, enable: i32,