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
|
|
@ -148,7 +148,7 @@ static bool b3SensorQueryCallback( int proxyId, uint64_t userData, void* context
|
|||
}
|
||||
}
|
||||
|
||||
b3Transform otherTransform = b3GetBodyTransform( world, otherShape->bodyId );
|
||||
b3Transform otherTransform = b3ToRelativeTransform( b3GetBodyTransform( world, otherShape->bodyId ), b3Pos_zero );
|
||||
|
||||
bool overlap = b3OverlapSensor( sensorShape, queryContext->transform, otherShape, otherTransform );
|
||||
if ( overlap == false )
|
||||
|
|
@ -217,7 +217,7 @@ static void b3SensorTask( int startIndex, int endIndex, int workerIndex, void* c
|
|||
continue;
|
||||
}
|
||||
|
||||
b3Transform transform = b3GetBodyTransformQuick( world, body );
|
||||
b3Transform transform = b3ToRelativeTransform( b3GetBodyTransformQuick( world, body ), b3Pos_zero );
|
||||
|
||||
b3SensorQueryContext queryContext = {
|
||||
.world = world,
|
||||
|
|
|
|||
Loading…
Reference in a new issue