Table of Contents

Struct b3DebugDraw

Namespace
Box3D.Native
Assembly
Box3D.NET.Native.dll

The callbacks and options used by b3World_Draw. Mirror of b3DebugDraw.

public struct b3DebugDraw

Inherited Members

Remarks

Start from B3.b3DefaultDebugDraw(), then install the callbacks you need and switch on the categories you want. Null callbacks are skipped.

Every callback receives world coordinates and the user context from Box3D.Native.b3DebugDraw.context. As with all callbacks in this binding they are function pointers, so the target must be a static method marked [UnmanagedCallersOnly(CallConvs = [typeof(CallConvCdecl)])], with any per-instance state reached through Box3D.Native.b3DebugDraw.context.

Fields

DrawBoundsFcn

Draws an axis-aligned bounding box.

DrawBoxFcn

Draws an oriented box.

DrawCapsuleFcn

Draws a capsule.

DrawPointFcn

Draws a point.

DrawSegmentFcn

Draws a line segment.

DrawShapeFcn

Draws a shape previously created through the create-debug-shape callback.

DrawSphereFcn

Draws a sphere.

DrawStringFcn

Draws a string in world space.

DrawTransformFcn

Draws a transform. The application chooses the axis length.

context

The user context passed to every drawing callback.

drawAnchorA

Whether to draw contact anchor A rather than anchor B.

drawBodyNames

Whether to draw body names.

drawBounds

Whether to draw shape bounding boxes.

drawContactFeatures

Whether to draw contact features.

drawContactForces

Whether to draw contact normal forces.

drawContactNormals

Whether to draw contact normals.

drawContacts

Whether to draw contact points.

drawGraphColors

Whether to colour constraints by their graph colour.

drawIslands

Whether to draw islands as bounding boxes.

drawJointExtras

Whether to draw additional joint information.

drawJoints

Whether to draw joints.

drawMass

Whether to draw the mass and centre of mass of dynamic bodies.

drawShapes

Whether to draw shapes.

drawSleep

Whether to draw sleep state for dynamic and kinematic bodies.

drawingBounds

The world bounds outside which nothing is drawn.

forceScale

The scale applied when drawing forces.

jointScale

The global scale applied when drawing joints.