1 #include <com.badlogic.gdx.physics.box2d.CircleShape.h> 2 3 //@line:25 4 5 #include <Box2D/Box2D.h> 6 JNIEXPORT jlong JNICALL Java_com_badlogic_gdx_physics_box2d_CircleShape_newCircleShape(JNIEnv* env, jobject object) { 7 8 9 //@line:33 10 11 return (jlong)(new b2CircleShape( )); 12 13 14 } 15 16 JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_CircleShape_jniGetPosition(JNIEnv* env, jobject object, jlong addr, jfloatArray obj_position) { 17 float* position = (float*)env->GetPrimitiveArrayCritical(obj_position, 0); 18 19 20 //@line:58 21 22 b2CircleShape* circle = (b2CircleShape*)addr; 23 position[0] = circle->m_p.x; 24 position[1] = circle->m_p.y; 25 26 env->ReleasePrimitiveArrayCritical(obj_position, position, 0); 27 28 } 29 30 JNIEXPORT void JNICALL Java_com_badlogic_gdx_physics_box2d_CircleShape_jniSetPosition(JNIEnv* env, jobject object, jlong addr, jfloat positionX, jfloat positionY) { 31 32 33 //@line:69 34 35 b2CircleShape* circle = (b2CircleShape*)addr; 36 circle->m_p.x = positionX; 37 circle->m_p.y = positionY; 38 39 40 } 41 42