pub struct DebugOverlay {
pub enabled: bool,
pub show_fps: bool,
pub show_counts: bool,
pub show_fields: bool,
pub show_camera: bool,
pub show_time: bool,
pub text_color: Vec4,
pub warning_color: Vec4,
pub critical_color: Vec4,
/* private fields */
}Expand description
Debug overlay: HUD glyph rendering of engine statistics.
All output is rendered as in-world glyphs at a fixed screen-space position
using RenderLayer::UI. Each call to render() clears the previous overlay
glyphs and redraws fresh ones.
Fields§
§enabled: bool§show_fps: bool§show_counts: bool§show_fields: bool§show_camera: bool§show_time: bool§text_color: Vec4§warning_color: Vec4§critical_color: Vec4Implementations§
Source§impl DebugOverlay
impl DebugOverlay
pub fn new() -> Self
Sourcepub fn with_graph(self, func: MathFunction, range: (f32, f32)) -> Self
pub fn with_graph(self, func: MathFunction, range: (f32, f32)) -> Self
Attach a math graph to display in the corner.
Sourcepub fn render(&mut self, engine: &mut ProofEngine, stats: &FrameStats)
pub fn render(&mut self, engine: &mut ProofEngine, stats: &FrameStats)
Clear the previous overlay and render the current frame’s debug info.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DebugOverlay
impl RefUnwindSafe for DebugOverlay
impl Send for DebugOverlay
impl Sync for DebugOverlay
impl Unpin for DebugOverlay
impl UnsafeUnpin for DebugOverlay
impl UnwindSafe for DebugOverlay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.