Skip to content

Commit 2dbb681

Browse files
authored
Removed unused automatic mass (erincatto#819)
1 parent a7123be commit 2dbb681

File tree

3 files changed

+0
-27
lines changed

3 files changed

+0
-27
lines changed

include/box2d/box2d.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,6 @@ B2_API b2MassData b2Body_GetMassData( b2BodyId bodyId );
346346
/// You should call this regardless of body type.
347347
B2_API void b2Body_ApplyMassFromShapes( b2BodyId bodyId );
348348

349-
/// Set the automatic mass setting. Normally this is set in b2BodyDef before creation.
350-
/// @see b2BodyDef::automaticMass
351-
B2_API void b2Body_SetAutomaticMass( b2BodyId bodyId, bool automaticMass );
352-
353-
/// Get the automatic mass setting
354-
B2_API bool b2Body_GetAutomaticMass( b2BodyId bodyId );
355-
356349
/// Adjust the linear damping. Normally this is set in b2BodyDef before creation.
357350
B2_API void b2Body_SetLinearDamping( b2BodyId bodyId, float linearDamping );
358351

src/body.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,25 +1260,6 @@ void b2Body_ApplyMassFromShapes( b2BodyId bodyId )
12601260
b2UpdateBodyMassData( world, body );
12611261
}
12621262

1263-
void b2Body_SetAutomaticMass( b2BodyId bodyId, bool automaticMass )
1264-
{
1265-
b2World* world = b2GetWorldLocked( bodyId.world0 );
1266-
if ( world == NULL )
1267-
{
1268-
return;
1269-
}
1270-
1271-
b2Body* body = b2GetBodyFullId( world, bodyId );
1272-
body->automaticMass = automaticMass;
1273-
}
1274-
1275-
bool b2Body_GetAutomaticMass( b2BodyId bodyId )
1276-
{
1277-
b2World* world = b2GetWorld( bodyId.world0 );
1278-
b2Body* body = b2GetBodyFullId( world, bodyId );
1279-
return body->automaticMass;
1280-
}
1281-
12821263
void b2Body_SetLinearDamping( b2BodyId bodyId, float linearDamping )
12831264
{
12841265
B2_ASSERT( b2IsValid( linearDamping ) && linearDamping >= 0.0f );

src/body.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ typedef struct b2Body
6767
bool fixedRotation;
6868
bool isSpeedCapped;
6969
bool isMarked;
70-
bool automaticMass;
7170
} b2Body;
7271

7372
// The body state is designed for fast conversion to and from SIMD via scatter-gather.

0 commit comments

Comments
 (0)