#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DebugLine {
pub start: [f32; 3],
pub end: [f32; 3],
pub color: [f32; 4],
pub thickness: f32,
pub on_top: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RenderDebugOverlay {
pub lines: Vec<DebugLine>,
}
impl RenderDebugOverlay {
pub fn line(&mut self, start: [f32; 3], end: [f32; 3], color: [f32; 4]) {
self.lines.push(DebugLine {
start,
end,
color,
thickness: 1.0,
on_top: false,
});
}
pub fn line_on_top(
&mut self,
start: [f32; 3],
end: [f32; 3],
color: [f32; 4],
thickness: f32,
) {
self.lines.push(DebugLine {
start,
end,
color,
thickness: thickness.max(1.0),
on_top: true,
});
}
}