EPhysics: improve log msgs a bit and remove annoying one
authorBruno Dilly <bdilly@profusion.mobi>
Tue, 3 Jul 2012 23:21:11 +0000 (23:21 +0000)
committerBruno Dilly <bdilly@profusion.mobi>
Tue, 3 Jul 2012 23:21:11 +0000 (23:21 +0000)
Print world and bodies pointers so it's possible to track them.
And remove annoying "step" debug msg.

SVN revision: 73246

legacy/ephysics/src/lib/ephysics_body.cpp
legacy/ephysics/src/lib/ephysics_world.cpp

index 75c356e..021909e 100644 (file)
@@ -149,8 +149,8 @@ _ephysics_body_geometry_set(EPhysics_Body *body, Evas_Coord x, Evas_Coord y, Eva
 
    body->rigid_body->getMotionState()->setWorldTransform(trans);
 
-   DBG("Body position changed to %lf, %lf.", mx, my);
-   DBG("Body scale changed to %lf, %lf.", sx, sy);
+   DBG("Body %p position changed to %lf, %lf.", body, mx, my);
+   DBG("Body %p scale changed to %lf, %lf.", body, sx, sy);
 }
 
 static void
@@ -283,7 +283,7 @@ ephysics_body_circle_add(EPhysics_World *world)
         return NULL;
      }
 
-   INF("Circle body added.");
+   INF("Circle body added: %p.", body);
    return body;
 }
 
@@ -315,7 +315,7 @@ ephysics_body_box_add(EPhysics_World *world)
         return NULL;
      }
 
-   INF("Box body added.");
+   INF("Box body added: %p.", body);
    return body;
 }
 
@@ -432,7 +432,7 @@ ephysics_body_del(EPhysics_Body *body)
    ephysics_world_body_del(body->world, body, body->rigid_body);
    ephysics_orphan_body_del(body);
 
-   INF("Body deleted.");
+   INF("Body %p deleted.", body);
 }
 
 EAPI void
@@ -559,7 +559,7 @@ ephysics_body_mass_set(EPhysics_Body *body, double mass)
    body->rigid_body->setMassProps(mass, inertia);
    body->rigid_body->updateInertiaTensor();
 
-   DBG("Body mass changed to %lf.", mass);
+   DBG("Body %p mass changed to %lf.", body, mass);
 }
 
 EAPI double
index 403487d..ee74844 100644 (file)
@@ -91,8 +91,6 @@ _simulate_worlds(void *data)
    double time_now;
    void *ldata;
 
-   DBG("Step");
-
    EINA_LIST_FOREACH(lworlds, l, ldata)
      {
         double time_now, delta;
@@ -303,7 +301,7 @@ ephysics_world_new(void)
    if (!_anim_simulate)
      _anim_simulate = ecore_animator_add(_simulate_worlds, _worlds);
 
-   INF("World added.");
+   INF("World %p added.", world);
    return world;
 
 no_list:
@@ -357,7 +355,7 @@ ephysics_world_serialize(const EPhysics_World *world, const char *path)
    fclose(file);
    delete serializer;
 
-   INF("Serialization written to file: %s.", path);
+   INF("Serialization of world %p written to file: %s.", world, path);
 
    return EINA_TRUE;
 }
@@ -403,7 +401,7 @@ ephysics_world_del(EPhysics_World *world)
    delete world->broadphase;
 
    free(world);
-   INF("World deleted.");
+   INF("World %p deleted.", world);
 }
 
 EAPI void
@@ -470,7 +468,7 @@ ephysics_world_gravity_set(EPhysics_World *world, double gx, double gy)
 
    world->dynamics_world->setGravity(btVector3(gx / world->rate,
                                                -gy / world->rate, 0));
-   DBG("World gravity set to X:%lf, Y:%lf.", gx, gy);
+   DBG("World %p gravity set to X:%lf, Y:%lf.", world, gx, gy);
 }
 
 EAPI void