Doubles (#14)
Added a compile time option to use double precision body positions. Most math remains single precision with minimal performance loss. `BOX3D_DOUBLE_PRECISION` Improved accuracy of body inertia computation when shapes are far from the body origin. WARNING: several APIs changed but migration should be straight forward if doubles are not enabled.
This commit is contained in:
parent
a252f03b19
commit
09c65b08ea
115 changed files with 7591 additions and 5295 deletions
|
|
@ -176,7 +176,8 @@ static bool b3PairQueryCallback( int proxyId, uint64_t userData, void* context )
|
|||
b3Shape* shape = b3Array_Get( world->shapes, shapeIndex );
|
||||
if ( shape->type == b3_compoundShape )
|
||||
{
|
||||
b3Transform compoundTransform = b3GetBodyTransform( world, shape->bodyId );
|
||||
// Query bounds are float world space, so the demoted transform is the matching float frame
|
||||
b3Transform compoundTransform = b3ToRelativeTransform( b3GetBodyTransform( world, shape->bodyId ), b3Pos_zero );
|
||||
b3AABB localAABB = b3AABB_Transform( b3InvertTransform( compoundTransform ), queryContext->aabb );
|
||||
|
||||
// recurse
|
||||
|
|
|
|||
Loading…
Reference in a new issue