Added integration api to physics
[platform/core/uifw/dali-toolkit.git] / dali-physics / third-party / chipmunk2d / src / cpBody.c
index e5caaf9..3d2bb1c 100644 (file)
@@ -56,6 +56,7 @@ cpBodyInit(cpBody *body, cpFloat mass, cpFloat moment)
        body->w_bias = 0.0f;
        
        body->userData = NULL;
+       body->userData2 = NULL;
        
        // Setters must be called after full initialization so the sanity checks don't assert on garbage data.
        cpBodySetMass(body, mass);
@@ -483,6 +484,17 @@ cpBodySetUserData(cpBody *body, cpDataPointer userData)
 {
        body->userData = userData;
 }
+cpDataPointer
+cpBodyGetUserData2(const cpBody *body)
+{
+       return body->userData2;
+}
+
+void
+cpBodySetUserData2(cpBody *body, cpDataPointer userData)
+{
+       body->userData2 = userData;
+}
 
 void
 cpBodySetVelocityUpdateFunc(cpBody *body, cpBodyVelocityFunc velocityFunc)