use ecs::Component; use crate::util::builder; builder! { /// Flags for how a object should be drawn. #[builder(name = Builder, derives = (Debug, Default, Clone))] #[derive(Debug, Default, Clone, Component)] #[non_exhaustive] pub struct DrawFlags { pub polygon_mode_config: PolygonModeConfig, } } impl DrawFlags { #[must_use] pub fn builder() -> Builder { Builder::default() } } #[derive(Debug, Default, Clone)] pub struct PolygonModeConfig { pub face: PolygonModeFace, pub mode: PolygonMode, } #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum PolygonMode { Point, Line, #[default] Fill, } #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum PolygonModeFace { Front, Back, #[default] FrontAndBack, } /// Component that makes a object not be drawn. #[derive(Debug, Clone, Copy, Component)] pub struct NoDraw;