Skip to main content

DebugDraw

Trait DebugDraw 

Source
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§

Source

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).

Source

fn draw_segment(&mut self, p1: Pos, p2: Pos, color: HexColor)

Draw a line segment. (DrawSegmentFcn)

Source

fn draw_transform(&mut self, transform: WorldTransform)

Draw a transform; choose your own length scale. (DrawTransformFcn)

Source

fn draw_point(&mut self, p: Pos, size: f32, color: HexColor)

Draw a point. (DrawPointFcn)

Source

fn draw_sphere(&mut self, p: Pos, radius: f32, color: HexColor, alpha: f32)

Draw a sphere. (DrawSphereFcn)

Source

fn draw_capsule( &mut self, p1: Pos, p2: Pos, radius: f32, color: HexColor, alpha: f32, )

Draw a capsule. (DrawCapsuleFcn)

Source

fn draw_bounds(&mut self, aabb: Aabb, color: HexColor)

Draw a bounding box. (DrawBoundsFcn)

Source

fn draw_box( &mut self, extents: Vec3, transform: WorldTransform, color: HexColor, )

Draw an oriented box. (DrawBoxFcn)

Source

fn draw_string(&mut self, p: Pos, s: &str, color: HexColor)

Draw a string in world space. (DrawStringFcn)

Source

fn drawing_bounds(&self) -> Aabb

World bounds used for culling. (drawingBounds)

Source

fn force_scale(&self) -> f32

Scale for drawing forces. (forceScale)

Source

fn joint_scale(&self) -> f32

Global scaling for joint drawing. (jointScale)

Source

fn draw_shapes(&self) -> bool

Source

fn draw_joints(&self) -> bool

Source

fn draw_joint_extras(&self) -> bool

Source

fn draw_bounds_boxes(&self) -> bool

Source

fn draw_mass(&self) -> bool

Source

fn draw_sleep(&self) -> bool

Source

fn draw_body_names(&self) -> bool

Source

fn draw_contacts(&self) -> bool

Source

fn draw_anchor_a(&self) -> bool

Draw contact anchor A instead of B. (drawAnchorA)

Source

fn draw_graph_colors(&self) -> bool

Source

fn draw_contact_features(&self) -> bool

Source

fn draw_contact_normals(&self) -> bool

Source

fn draw_contact_forces(&self) -> bool

Source

fn draw_friction_forces(&self) -> bool

Source

fn draw_islands(&self) -> bool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§