#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct RenderLayer(pub u32);

impl Default for RenderLayer {
    fn default() -> Self {
        Self(Self::WORLD)
    }
}

impl RenderLayer {
    pub const WORLD: u32 = 0;
    pub const OVERLAY: u32 = 1;

    pub fn new(layer: u32) -> Self {
        Self(layer)
    }

    pub fn is_in_layer(&self, layer: u32) -> bool {
        self.0 == layer
    }

    pub fn is_overlay(&self) -> bool {
        self.0 == Self::OVERLAY
    }
}
