feat: add default for modelblock

This commit is contained in:
Anna 2022-11-25 16:54:29 -05:00
parent f635a85401
commit ea1bb1b751
Signed by: anna
GPG Key ID: 0B391D8F06FCD9E0
1 changed files with 13 additions and 1 deletions

View File

@ -127,7 +127,19 @@ pub struct ModelSectionInfo<T> {
pub index_buffer: [T; 3],
}
#[derive(Debug)]
impl<T: Default> Default for ModelSectionInfo<T> {
fn default() -> Self {
Self {
stack: T::default(),
runtime: T::default(),
vertex_buffer: [T::default(), T::default(), T::default()],
edge_geometry_vertex_buffer: [T::default(), T::default(), T::default()],
index_buffer: [T::default(), T::default(), T::default()],
}
}
}
#[derive(Debug, Default)]
#[cfg_attr(feature = "read", derive(binrw::BinRead), br(little))]
#[cfg_attr(feature = "write", derive(binrw::BinWrite), bw(little))]
pub struct ModelBlock {