diff options
Diffstat (limited to 'src/sim/cell.rs')
| -rw-r--r-- | src/sim/cell.rs | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/sim/cell.rs b/src/sim/cell.rs deleted file mode 100644 index d3ca302..0000000 --- a/src/sim/cell.rs +++ /dev/null @@ -1,38 +0,0 @@ -use crate::sim::materials::MaterialId; - -#[derive(Clone, Copy)] -pub struct Cell { - pub material: MaterialId, - pub flags: u8, - pub data: u16, -} - -impl Cell { - const FLAG_PARITY: u8 = 0b0000_0001; - - #[inline] - pub fn parity(self) -> u8 { - self.flags & Self::FLAG_PARITY - } - #[inline] - pub fn flip_parity(&mut self) { - self.flags ^= Self::FLAG_PARITY; - } -} - -impl Cell { - pub fn void() -> Cell { - Cell { - material: MaterialId::Void, - flags: 0, - data: 0, - } - } - pub fn from_material(material: MaterialId) -> Cell { - Cell { - material, - flags: 0, - data: 0, - } - } -} |
