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
|
|
@ -21,7 +21,7 @@ static void CreateGroup( FallingRagdollData* data, b3WorldId worldId, int rowInd
|
|||
float span = RAGDOLL_GRID_COUNT * GRID_SIZE;
|
||||
float groupDistance = 1.0f * span / RAGDOLL_GRID_COUNT;
|
||||
|
||||
b3Vec3 position;
|
||||
b3Pos position;
|
||||
position.x = -0.5f * span + groupDistance * ( columnIndex + 0.5f );
|
||||
position.y = 15.0f;
|
||||
position.z = -0.5f * span + groupDistance * ( rowIndex + 0.5f );
|
||||
|
|
@ -98,8 +98,8 @@ bool UpdateFallingRagdolls( b3WorldId worldId, FallingRagdollData* data )
|
|||
for ( int b = 0; b < bone_count; ++b )
|
||||
{
|
||||
b3BodyId bodyId = human->bones[b].bodyId;
|
||||
b3Transform xf = b3Body_GetTransform( bodyId );
|
||||
data->hash = b3Hash( data->hash, (uint8_t*)( &xf ), sizeof( b3Transform ) );
|
||||
b3WorldTransform xf = b3Body_GetTransform( bodyId );
|
||||
data->hash = b3Hash( data->hash, (uint8_t*)( &xf ), sizeof( b3WorldTransform ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue