summaryrefslogtreecommitdiff
path: root/src/sim/cell.rs
blob: 2e26ddcc26e4381cdf81a7eea898d0d91e39d2fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::sim::materials::MaterialId;

#[derive(Clone, Copy)]
pub struct Cell {
    pub material: MaterialId,
    pub flags: u8,
}

impl Cell {
    pub fn void() -> Cell {
        Cell {
            material: MaterialId::Void,
            flags: 0,
        }
    }
    pub fn from_material(material: MaterialId) -> Cell {
        Cell { material, flags: 0 }
    }
}