#[repr(C)]pub struct b3DebugDraw {Show 27 fields
pub DrawShapeFcn: Option<unsafe extern "C" fn(userShape: *mut c_void, transform: b3WorldTransform, color: b3HexColor, context: *mut c_void) -> bool>,
pub DrawSegmentFcn: Option<unsafe extern "C" fn(p1: b3Pos, p2: b3Pos, color: b3HexColor, context: *mut c_void)>,
pub DrawTransformFcn: Option<unsafe extern "C" fn(transform: b3WorldTransform, context: *mut c_void)>,
pub DrawPointFcn: Option<unsafe extern "C" fn(p: b3Pos, size: f32, color: b3HexColor, context: *mut c_void)>,
pub DrawSphereFcn: Option<unsafe extern "C" fn(p: b3Pos, radius: f32, color: b3HexColor, alpha: f32, context: *mut c_void)>,
pub DrawCapsuleFcn: Option<unsafe extern "C" fn(p1: b3Pos, p2: b3Pos, radius: f32, color: b3HexColor, alpha: f32, context: *mut c_void)>,
pub DrawBoundsFcn: Option<unsafe extern "C" fn(aabb: b3AABB, color: b3HexColor, context: *mut c_void)>,
pub DrawBoxFcn: Option<unsafe extern "C" fn(extents: b3Vec3, transform: b3WorldTransform, color: b3HexColor, context: *mut c_void)>,
pub DrawStringFcn: Option<unsafe extern "C" fn(p: b3Pos, s: *const c_char, color: b3HexColor, context: *mut c_void)>,
pub drawingBounds: b3AABB,
pub forceScale: f32,
pub jointScale: f32,
pub drawShapes: bool,
pub drawJoints: bool,
pub drawJointExtras: bool,
pub drawBounds: bool,
pub drawMass: bool,
pub drawBodyNames: bool,
pub drawContacts: bool,
pub drawAnchorA: c_int,
pub drawGraphColors: bool,
pub drawContactFeatures: bool,
pub drawContactNormals: bool,
pub drawContactForces: bool,
pub drawFrictionForces: bool,
pub drawIslands: bool,
pub context: *mut c_void,
}Expand description
This struct is passed to b3World_Draw to draw a debug view of the simulation world. Callbacks receive world coordinates. In large world mode the translation is double precision so it stays accurate far from the origin. Shift into your own camera frame inside the callbacks.
Fields§
§DrawShapeFcn: Option<unsafe extern "C" fn(userShape: *mut c_void, transform: b3WorldTransform, color: b3HexColor, context: *mut c_void) -> bool>Draws a shape and returns true if drawing should continue
DrawSegmentFcn: Option<unsafe extern "C" fn(p1: b3Pos, p2: b3Pos, color: b3HexColor, context: *mut c_void)>Draw a line segment.
DrawTransformFcn: Option<unsafe extern "C" fn(transform: b3WorldTransform, context: *mut c_void)>Draw a transform. Choose your own length scale.
DrawPointFcn: Option<unsafe extern "C" fn(p: b3Pos, size: f32, color: b3HexColor, context: *mut c_void)>Draw a point.
DrawSphereFcn: Option<unsafe extern "C" fn(p: b3Pos, radius: f32, color: b3HexColor, alpha: f32, context: *mut c_void)>Draw a sphere.
DrawCapsuleFcn: Option<unsafe extern "C" fn(p1: b3Pos, p2: b3Pos, radius: f32, color: b3HexColor, alpha: f32, context: *mut c_void)>Draw a capsule.
DrawBoundsFcn: Option<unsafe extern "C" fn(aabb: b3AABB, color: b3HexColor, context: *mut c_void)>Draw a bounding box.
DrawBoxFcn: Option<unsafe extern "C" fn(extents: b3Vec3, transform: b3WorldTransform, color: b3HexColor, context: *mut c_void)>Draw an oriented box.
DrawStringFcn: Option<unsafe extern "C" fn(p: b3Pos, s: *const c_char, color: b3HexColor, context: *mut c_void)>Draw a string in world space
drawingBounds: b3AABBWorld bounds to use for debug draw
forceScale: f32Scale to use when drawing forces
jointScale: f32Global scaling for joint drawing
drawShapes: boolOption to draw shapes
drawJoints: boolOption to draw joints
drawJointExtras: boolOption to draw additional information for joints
drawBounds: boolOption to draw the bounding boxes for shapes
drawMass: boolOption to draw the mass and center of mass of dynamic bodies
drawBodyNames: boolOption to draw body names
drawContacts: boolOption to draw contact points
drawAnchorA: c_intDraw contact anchor A or B
drawGraphColors: boolOption to visualize the graph coloring used for contacts and joints
drawContactFeatures: boolOption to draw contact features
drawContactNormals: boolOption to draw contact normals
drawContactForces: boolOption to draw contact normal forces
drawFrictionForces: boolOption to draw contact friction forces
drawIslands: boolOption to draw islands as bounding boxes
context: *mut c_voidUser context that is passed as an argument to drawing callback functions
Trait Implementations§
Source§impl Clone for b3DebugDraw
impl Clone for b3DebugDraw
Source§fn clone(&self) -> b3DebugDraw
fn clone(&self) -> b3DebugDraw
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more