create constructors for VmcExtBonePos
This commit is contained in:
parent
d6d74353bd
commit
be4d54e34c
14
src/lib.rs
14
src/lib.rs
|
@ -517,6 +517,20 @@ impl VmcMessage for VmcExtBonePos {
|
|||
}
|
||||
}
|
||||
|
||||
impl VmcExtBonePos {
|
||||
fn new(name: String, transform: Transform3D) -> Result<Self, MessageCreationErr> {
|
||||
return Ok(VmcExtBonePos{name, transform});
|
||||
}
|
||||
fn new_vmc_message(name: String, transform: Transform3D) -> Result<Box<dyn VmcMessage>, MessageCreationErr> {
|
||||
let message = Self::new(name, transform);
|
||||
if message.is_ok() {
|
||||
let boxed_result: Box<dyn VmcMessage> = Box::new(message.ok().unwrap());
|
||||
return Ok(boxed_result);
|
||||
}
|
||||
return Err(message.err().unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct VmcExtBlendVal {
|
||||
name: String,
|
||||
|
|
Loading…
Reference in New Issue
Block a user