aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2022-05-31 16:26:40 +0200
committerGitHub <noreply@github.com>2022-05-31 16:26:40 +0200
commit77aa1dda087af89e5615c4654dd4cd27333a9abb (patch)
treec10a45f9ec2877a4f737f4c2148fefd764b5b978 /src
parentde44fda4c3dc7cbd4d8c07df618b24d963fc4327 (diff)
parent63a6889d8805bd563ca06eac2a0f055cbd2728da (diff)
downloadrapier-77aa1dda087af89e5615c4654dd4cd27333a9abb.tar.gz
rapier-77aa1dda087af89e5615c4654dd4cd27333a9abb.tar.bz2
rapier-77aa1dda087af89e5615c4654dd4cd27333a9abb.zip
Merge pull request #336 from dimforge/debug-render-tweaks
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.rs10
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())
}
}