create constructors for VmcExtLight

This commit is contained in:
Cassandra de la Cruz-Munoz 2024-01-01 13:42:27 -05:00
parent b59d0762d2
commit 311ec2552a
Signed by: cassdlcm
GPG Key ID: BFEBACEA812DDA70

View File

@ -1221,7 +1221,7 @@ impl VmcExtRvc {
} }
#[derive(Debug)] #[derive(Debug)]
struct VmcExtLight { pub struct VmcExtLight {
name: String, name: String,
transform: Transform3D, transform: Transform3D,
color: Color, color: Color,
@ -1315,6 +1315,18 @@ impl VmcMessage for VmcExtLight {
} }
} }
impl VmcExtLight {
pub fn new(name: String, transform: Transform3D, color: Color) ->MsgNewResult<Self> {
Ok(Self { name, transform, color})
}
pub fn new_vmc_message(name: String, transform: Transform3D, color: Color) ->TraitMsgNewResult {
match Self::new(name, transform, color) {
Ok(val) => Ok(Box::new(val)),
Err(val) => Err(val)
}
}
}
#[derive(Debug)] #[derive(Debug)]
struct VmcExtVrm { struct VmcExtVrm {
path: String, path: String,