Fixing issues (#94)
- option to draw kinematic shapes with transparency - slight change to triangle vs hull to reduce ghost collisions - changed return of b3DebugDraw.DrawShapeFcn to void #66 #48 #69 #75 #76
This commit is contained in:
parent
c37cfe4cd7
commit
dfa5e6add0
27 changed files with 906 additions and 433 deletions
|
|
@ -29,3 +29,5 @@
|
|||
// so this suits embedding more than shipping Box3D as its own DLL.
|
||||
//#define BOX3D_EXPORT MYENGINE_API
|
||||
|
||||
// Enable assertions when NDEBUG is defined
|
||||
// #define B3_ENABLE_ASSERT
|
||||
|
|
|
|||
|
|
@ -419,6 +419,9 @@ typedef struct b3SurfaceMaterial
|
|||
/// carry a b3DebugMaterial preset, see b3MakeDebugColor.
|
||||
/// @see b3HexColor
|
||||
uint32_t customColor;
|
||||
|
||||
/// Explicit padding. Must be zero.
|
||||
uint32_t padding;
|
||||
} b3SurfaceMaterial;
|
||||
|
||||
/// Use this to initialize your surface material
|
||||
|
|
@ -2968,8 +2971,10 @@ typedef struct b3DebugShape
|
|||
/// it stays accurate far from the origin. Shift into your own camera frame inside the callbacks.
|
||||
typedef struct b3DebugDraw
|
||||
{
|
||||
/// Draws a shape and returns true if drawing should continue
|
||||
bool ( *DrawShapeFcn )( void* userShape, b3WorldTransform transform, b3HexColor color, void* context );
|
||||
/// Draws a user shape. The userShape pointer is owned by the application and is known to Box3D as
|
||||
/// an opaque pointer returned from b3CreateDebugShapeCallback. When this is called the drawn shape has
|
||||
/// passed a culling test against drawingBounds below.
|
||||
void ( *DrawShapeFcn )( void* userShape, b3WorldTransform transform, b3HexColor color, void* context );
|
||||
|
||||
/// Draw a line segment.
|
||||
void ( *DrawSegmentFcn )( b3Pos p1, b3Pos p2, b3HexColor color, void* context );
|
||||
|
|
@ -3029,7 +3034,7 @@ typedef struct b3DebugDraw
|
|||
bool drawContacts;
|
||||
|
||||
/// Draw contact anchor A or B
|
||||
int drawAnchorA;
|
||||
bool drawAnchorA;
|
||||
|
||||
/// Option to visualize the graph coloring used for contacts and joints
|
||||
bool drawGraphColors;
|
||||
|
|
|
|||
Loading…
Reference in a new issue