Adjust the defaults for the debug-renderer + add a JOINTS compound bitflag
This commit is contained in:
@@ -24,6 +24,8 @@ bitflags::bitflags! {
|
|||||||
const MULTIBODY_JOINTS = 1 << 2;
|
const MULTIBODY_JOINTS = 1 << 2;
|
||||||
/// If this flag is set, the impulse joints will be rendered.
|
/// If this flag is set, the impulse joints will be rendered.
|
||||||
const IMPULSE_JOINTS = 1 << 3;
|
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.
|
/// If this flag is set, the solver contacts will be rendered.
|
||||||
const SOLVER_CONTACTS = 1 << 4;
|
const SOLVER_CONTACTS = 1 << 4;
|
||||||
/// If this flag is set, the geometric contacts will be rendered.
|
/// 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.
|
/// Pipeline responsible for rendering the state of the physics engine for debugging purpose.
|
||||||
pub struct DebugRenderPipeline {
|
pub struct DebugRenderPipeline {
|
||||||
#[cfg(feature = "dim2")]
|
#[cfg(feature = "dim2")]
|
||||||
@@ -49,7 +57,7 @@ pub struct DebugRenderPipeline {
|
|||||||
|
|
||||||
impl Default for DebugRenderPipeline {
|
impl Default for DebugRenderPipeline {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::render_all(DebugRenderStyle::default())
|
Self::new(DebugRenderStyle::default(), DebugRenderMode::default())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user