Implement `Insert` for `Tetrahedron`

This commit is contained in:
Hanno Braun 2023-05-04 12:03:43 +02:00
parent b5ec5738f3
commit bd9ae22aea
1 changed files with 15 additions and 1 deletions

View File

@ -7,7 +7,7 @@ use crate::{
storage::Handle, storage::Handle,
}; };
use super::Polygon; use super::{Polygon, Tetrahedron};
/// Insert an object into its respective store /// Insert an object into its respective store
/// ///
@ -91,3 +91,17 @@ impl<const D: usize> Insert for Polygon<D, IsInsertedNo> {
} }
} }
} }
impl Insert for Tetrahedron<IsInsertedNo> {
type Inserted = Tetrahedron<IsInsertedYes>;
fn insert(self, services: &mut Services) -> Self::Inserted {
Tetrahedron {
shell: self.shell.insert(services),
abc: self.abc,
bad: self.bad,
dac: self.dac,
cbd: self.cbd,
}
}
}