JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_World_jniStep (JNIEnv *env, jobject obj, jlong addr, jfloat timeStep, jint velocityIterations, jint positionIterations) { b2World* world = (b2World*)addr; CustomContactFilter contactFilter(env, obj); CustomContactListener contactListener(env,obj); world->SetContactFilter(&contactFilter); world->SetContactListener(&contactListener); world->Step( timeStep, velocityIterations, positionIterations ); world->SetContactFilter(&defaultFilter); world->SetContactListener(0); }
JNIEXPORT void JNICALL Java_com_guidebee_game_physics_World_jniDestroyBody(JNIEnv* env, jobject object, jlong addr, jlong bodyAddr) { b2World* world = (b2World*)addr; b2Body* body = (b2Body*)bodyAddr; CustomContactFilter contactFilter(env, object); CustomContactListener contactListener(env,object); world->SetContactFilter(&contactFilter); world->SetContactListener(&contactListener); world->DestroyBody(body); world->SetContactFilter(&defaultFilter); world->SetContactListener(0); }
JNIEXPORT void JNICALL Java_com_guidebee_game_physics_World_jniDestroyJoint(JNIEnv* env, jobject object, jlong addr, jlong jointAddr) { b2World* world = (b2World*)addr; b2Joint* joint = (b2Joint*)jointAddr; CustomContactFilter contactFilter(env, object); CustomContactListener contactListener(env,object); world->SetContactFilter(&contactFilter); world->SetContactListener(&contactListener); world->DestroyJoint( joint ); world->SetContactFilter(&defaultFilter); world->SetContactListener(0); }
JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_World_jniDestroyJoint(JNIEnv* env, jobject object, jlong addr, jlong jointAddr) { //@line:627 b2World* world = (b2World*)addr; b2Joint* joint = (b2Joint*)jointAddr; CustomContactFilter contactFilter(env, object); CustomContactListener contactListener(env,object); world->SetContactFilter(&contactFilter); world->SetContactListener(&contactListener); world->DestroyJoint( joint ); world->SetContactFilter(&defaultFilter); world->SetContactListener(0); }
JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_World_jniDestroyBody(JNIEnv* env, jobject object, jlong addr, jlong bodyAddr) { //@line:333 b2World* world = (b2World*)addr; b2Body* body = (b2Body*)bodyAddr; CustomContactFilter contactFilter(env, object); CustomContactListener contactListener(env,object); world->SetContactFilter(&contactFilter); world->SetContactListener(&contactListener); world->DestroyBody(body); world->SetContactFilter(&defaultFilter); world->SetContactListener(0); }
JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_World_jniDeactivateBody(JNIEnv* env, jobject object, jlong addr, jlong bodyAddr) { //@line:376 b2World* world = (b2World*)(addr); b2Body* body = (b2Body*)(bodyAddr); CustomContactFilter contactFilter(env, object); CustomContactListener contactListener(env, object); world->SetContactFilter(&contactFilter); world->SetContactListener(&contactListener); body->SetActive(false); world->SetContactFilter(&defaultFilter); world->SetContactListener(0); }
JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_World_jniDestroyFixture(JNIEnv* env, jobject object, jlong addr, jlong bodyAddr, jlong fixtureAddr) { //@line:356 b2World* world = (b2World*)(addr); b2Body* body = (b2Body*)(bodyAddr); b2Fixture* fixture = (b2Fixture*)(fixtureAddr); CustomContactFilter contactFilter(env, object); CustomContactListener contactListener(env, object); world->SetContactFilter(&contactFilter); world->SetContactListener(&contactListener); body->DestroyFixture(fixture); world->SetContactFilter(&defaultFilter); world->SetContactListener(0); }