From 63a6889d8805bd563ca06eac2a0f055cbd2728da Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Tue, 31 May 2022 15:47:01 +0200 Subject: Adjust the defaults for the debug-renderer + add a JOINTS compound bitflag --- src/pipeline/debug_render_pipeline/debug_render_pipeline.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs b/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs index bcd19e8..fd93d6c 100644 --- a/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs +++ b/src/pipeline/debug_render_pipeline/debug_render_pipeline.rs @@ -24,6 +24,8 @@ bitflags::bitflags! { const MULTIBODY_JOINTS = 1 << 2; /// If this flag is set, the impulse joints will be rendered. const IMPULSE_JOINTS = 1 << 3; + /// If this flag is set, all the joints will be rendered. + const JOINTS = Self::MULTIBODY_JOINTS.bits | Self::IMPULSE_JOINTS.bits; /// If this flag is set, the solver contacts will be rendered. const SOLVER_CONTACTS = 1 << 4; /// If this flag is set, the geometric contacts will be rendered. @@ -33,6 +35,12 @@ bitflags::bitflags! { } } +impl Default for DebugRenderMode { + fn default() -> Self { + Self::COLLIDER_SHAPES | Self::JOINTS | Self::RIGID_BODY_AXES + } +} + /// Pipeline responsible for rendering the state of the physics engine for debugging purpose. pub struct DebugRenderPipeline { #[cfg(feature = "dim2")] @@ -49,7 +57,7 @@ pub struct DebugRenderPipeline { impl Default for DebugRenderPipeline { fn default() -> Self { - Self::render_all(DebugRenderStyle::default()) + Self::new(DebugRenderStyle::default(), DebugRenderMode::default()) } } -- cgit