pub trait DebugDraw {
Show 27 methods
// Provided methods
fn draw_shape(
&mut self,
user_shape: u64,
transform: WorldTransform,
color: HexColor,
) -> bool { ... }
fn draw_segment(&mut self, p1: Pos, p2: Pos, color: HexColor) { ... }
fn draw_transform(&mut self, transform: WorldTransform) { ... }
fn draw_point(&mut self, p: Pos, size: f32, color: HexColor) { ... }
fn draw_sphere(&mut self, p: Pos, radius: f32, color: HexColor, alpha: f32) { ... }
fn draw_capsule(
&mut self,
p1: Pos,
p2: Pos,
radius: f32,
color: HexColor,
alpha: f32,
) { ... }
fn draw_bounds(&mut self, aabb: Aabb, color: HexColor) { ... }
fn draw_box(
&mut self,
extents: Vec3,
transform: WorldTransform,
color: HexColor,
) { ... }
fn draw_string(&mut self, p: Pos, s: &str, color: HexColor) { ... }
fn drawing_bounds(&self) -> Aabb { ... }
fn force_scale(&self) -> f32 { ... }
fn joint_scale(&self) -> f32 { ... }
fn draw_shapes(&self) -> bool { ... }
fn draw_joints(&self) -> bool { ... }
fn draw_joint_extras(&self) -> bool { ... }
fn draw_bounds_boxes(&self) -> bool { ... }
fn draw_mass(&self) -> bool { ... }
fn draw_sleep(&self) -> bool { ... }
fn draw_body_names(&self) -> bool { ... }
fn draw_contacts(&self) -> bool { ... }
fn draw_anchor_a(&self) -> bool { ... }
fn draw_graph_colors(&self) -> bool { ... }
fn draw_contact_features(&self) -> bool { ... }
fn draw_contact_normals(&self) -> bool { ... }
fn draw_contact_forces(&self) -> bool { ... }
fn draw_friction_forces(&self) -> bool { ... }
fn draw_islands(&self) -> bool { ... }
}Expand description
Debug drawing callbacks and options (b3DebugDraw).
Defaults match b3DefaultDebugDraw: draw callbacks are no-ops, option flags
are off, drawing_bounds is a cube of half-extent 100 * lengthUnits, and
force/joint scales are 1.
Provided Methods§
Sourcefn draw_shape(
&mut self,
user_shape: u64,
transform: WorldTransform,
color: HexColor,
) -> bool
fn draw_shape( &mut self, user_shape: u64, transform: WorldTransform, color: HexColor, ) -> bool
Draws a previously created user shape. (DrawShapeFcn)
Returns whether drawing should continue (unused by world_draw today).
Sourcefn draw_segment(&mut self, p1: Pos, p2: Pos, color: HexColor)
fn draw_segment(&mut self, p1: Pos, p2: Pos, color: HexColor)
Draw a line segment. (DrawSegmentFcn)
Sourcefn draw_transform(&mut self, transform: WorldTransform)
fn draw_transform(&mut self, transform: WorldTransform)
Draw a transform; choose your own length scale. (DrawTransformFcn)
Sourcefn draw_point(&mut self, p: Pos, size: f32, color: HexColor)
fn draw_point(&mut self, p: Pos, size: f32, color: HexColor)
Draw a point. (DrawPointFcn)
Sourcefn draw_sphere(&mut self, p: Pos, radius: f32, color: HexColor, alpha: f32)
fn draw_sphere(&mut self, p: Pos, radius: f32, color: HexColor, alpha: f32)
Draw a sphere. (DrawSphereFcn)
Sourcefn draw_capsule(
&mut self,
p1: Pos,
p2: Pos,
radius: f32,
color: HexColor,
alpha: f32,
)
fn draw_capsule( &mut self, p1: Pos, p2: Pos, radius: f32, color: HexColor, alpha: f32, )
Draw a capsule. (DrawCapsuleFcn)
Sourcefn draw_bounds(&mut self, aabb: Aabb, color: HexColor)
fn draw_bounds(&mut self, aabb: Aabb, color: HexColor)
Draw a bounding box. (DrawBoundsFcn)
Sourcefn draw_box(
&mut self,
extents: Vec3,
transform: WorldTransform,
color: HexColor,
)
fn draw_box( &mut self, extents: Vec3, transform: WorldTransform, color: HexColor, )
Draw an oriented box. (DrawBoxFcn)
Sourcefn draw_string(&mut self, p: Pos, s: &str, color: HexColor)
fn draw_string(&mut self, p: Pos, s: &str, color: HexColor)
Draw a string in world space. (DrawStringFcn)
Sourcefn drawing_bounds(&self) -> Aabb
fn drawing_bounds(&self) -> Aabb
World bounds used for culling. (drawingBounds)
Sourcefn force_scale(&self) -> f32
fn force_scale(&self) -> f32
Scale for drawing forces. (forceScale)
Sourcefn joint_scale(&self) -> f32
fn joint_scale(&self) -> f32
Global scaling for joint drawing. (jointScale)
fn draw_shapes(&self) -> bool
fn draw_joints(&self) -> bool
fn draw_joint_extras(&self) -> bool
fn draw_bounds_boxes(&self) -> bool
fn draw_mass(&self) -> bool
fn draw_sleep(&self) -> bool
fn draw_body_names(&self) -> bool
fn draw_contacts(&self) -> bool
Sourcefn draw_anchor_a(&self) -> bool
fn draw_anchor_a(&self) -> bool
Draw contact anchor A instead of B. (drawAnchorA)
fn draw_graph_colors(&self) -> bool
fn draw_contact_features(&self) -> bool
fn draw_contact_normals(&self) -> bool
fn draw_contact_forces(&self) -> bool
fn draw_friction_forces(&self) -> bool
fn draw_islands(&self) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".