diff options
| author | Sébastien Crozet <sebcrozet@dimforge.com> | 2022-05-31 15:47:01 +0200 |
|---|---|---|
| committer | Sébastien Crozet <sebcrozet@dimforge.com> | 2022-05-31 15:47:01 +0200 |
| commit | 63a6889d8805bd563ca06eac2a0f055cbd2728da (patch) | |
| tree | c10a45f9ec2877a4f737f4c2148fefd764b5b978 /src | |
| parent | 10ca3474e67d53d3d1ec306dd2973d95043ba666 (diff) | |
| download | rapier-63a6889d8805bd563ca06eac2a0f055cbd2728da.tar.gz rapier-63a6889d8805bd563ca06eac2a0f055cbd2728da.tar.bz2 rapier-63a6889d8805bd563ca06eac2a0f055cbd2728da.zip | |
Adjust the defaults for the debug-renderer + add a JOINTS compound bitflag
Diffstat (limited to 'src')
| -rw-r--r-- | src/pipeline/debug_render_pipeline/debug_render_pipeline.rs | 10 |
1 files changed, 9 insertions, 1 deletions
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()) } } |
