#[repr(C)]pub struct b2DebugDraw {Show 26 fields
pub DrawPolygonFcn: Option<unsafe extern "C" fn(vertices: *const b2Vec2, vertexCount: c_int, color: b2HexColor, context: *mut c_void)>,
pub DrawSolidPolygonFcn: Option<unsafe extern "C" fn(transform: b2Transform, vertices: *const b2Vec2, vertexCount: c_int, radius: f32, color: b2HexColor, context: *mut c_void)>,
pub DrawCircleFcn: Option<unsafe extern "C" fn(center: b2Vec2, radius: f32, color: b2HexColor, context: *mut c_void)>,
pub DrawSolidCircleFcn: Option<unsafe extern "C" fn(transform: b2Transform, radius: f32, color: b2HexColor, context: *mut c_void)>,
pub DrawSolidCapsuleFcn: Option<unsafe extern "C" fn(p1: b2Vec2, p2: b2Vec2, radius: f32, color: b2HexColor, context: *mut c_void)>,
pub DrawLineFcn: Option<unsafe extern "C" fn(p1: b2Vec2, p2: b2Vec2, color: b2HexColor, context: *mut c_void)>,
pub DrawTransformFcn: Option<unsafe extern "C" fn(transform: b2Transform, context: *mut c_void)>,
pub DrawPointFcn: Option<unsafe extern "C" fn(p: b2Vec2, size: f32, color: b2HexColor, context: *mut c_void)>,
pub DrawStringFcn: Option<unsafe extern "C" fn(p: b2Vec2, s: *const c_char, color: b2HexColor, context: *mut c_void)>,
pub drawingBounds: b2AABB,
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 drawContactPoints: bool,
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 holds callbacks you can implement to draw a Box2D world. This structure should be zero initialized. @ingroup world
Fields§
§DrawPolygonFcn: Option<unsafe extern "C" fn(vertices: *const b2Vec2, vertexCount: c_int, color: b2HexColor, context: *mut c_void)>Draw a closed polygon provided in CCW order.
DrawSolidPolygonFcn: Option<unsafe extern "C" fn(transform: b2Transform, vertices: *const b2Vec2, vertexCount: c_int, radius: f32, color: b2HexColor, context: *mut c_void)>Draw a solid closed polygon provided in CCW order.
DrawCircleFcn: Option<unsafe extern "C" fn(center: b2Vec2, radius: f32, color: b2HexColor, context: *mut c_void)>Draw a circle.
DrawSolidCircleFcn: Option<unsafe extern "C" fn(transform: b2Transform, radius: f32, color: b2HexColor, context: *mut c_void)>Draw a solid circle.
DrawSolidCapsuleFcn: Option<unsafe extern "C" fn(p1: b2Vec2, p2: b2Vec2, radius: f32, color: b2HexColor, context: *mut c_void)>Draw a solid capsule.
DrawLineFcn: Option<unsafe extern "C" fn(p1: b2Vec2, p2: b2Vec2, color: b2HexColor, context: *mut c_void)>Draw a line segment.
DrawTransformFcn: Option<unsafe extern "C" fn(transform: b2Transform, context: *mut c_void)>Draw a transform. Choose your own length scale.
DrawPointFcn: Option<unsafe extern "C" fn(p: b2Vec2, size: f32, color: b2HexColor, context: *mut c_void)>Draw a point.
DrawStringFcn: Option<unsafe extern "C" fn(p: b2Vec2, s: *const c_char, color: b2HexColor, context: *mut c_void)>Draw a string in world space
drawingBounds: b2AABBWorld 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
drawContactPoints: boolOption to draw contact points
drawGraphColors: boolOption to visualize the graph coloring used for contacts and joints
drawContactFeatures: boolOption to draw contact feature ids
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 b2DebugDraw
impl Clone for b2DebugDraw
Source§fn clone(&self) -> b2DebugDraw
fn clone(&self) -> b2DebugDraw
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for b2DebugDraw
impl Debug for b2DebugDraw
impl Copy for b2DebugDraw
Auto Trait Implementations§
impl Freeze for b2DebugDraw
impl RefUnwindSafe for b2DebugDraw
impl !Send for b2DebugDraw
impl !Sync for b2DebugDraw
impl Unpin for b2DebugDraw
impl UnwindSafe for b2DebugDraw
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)