Skip to content

Commit

Permalink
added missing setMaxLength wrapper for b2RopeJoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ttencate committed Oct 17, 2012
1 parent 61e31b8 commit cb849d0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
11 changes: 11 additions & 0 deletions gdx/jni/com.badlogic.gdx.physics.box2d.joints.RopeJoint.cpp
Expand Up @@ -14,3 +14,14 @@

}

JNIEXPORT jfloat JNICALL Java_com_badlogic_gdx_physics_box2d_joints_RopeJoint_jniSetMaxLength(JNIEnv* env, jobject object, jlong addr, jfloat length) {


//@line:51

b2RopeJoint* rope = (b2RopeJoint*)addr;
rope->SetMaxLength(length);


}

8 changes: 8 additions & 0 deletions gdx/jni/com.badlogic.gdx.physics.box2d.joints.RopeJoint.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion gdx/src/com/badlogic/gdx/physics/box2d/joints/RopeJoint.java
Expand Up @@ -42,4 +42,14 @@ public float getMaxLength () {
b2RopeJoint* rope = (b2RopeJoint*)addr;
return rope->GetMaxLength();
*/
}

/** Set the maximum length of the rope. */
public void setMaxLength (float length) {
jniSetMaxLength(addr, length);
}

private native float jniSetMaxLength (long addr, float length); /*
b2RopeJoint* rope = (b2RopeJoint*)addr;
rope->SetMaxLength(length);
*/
}

0 comments on commit cb849d0

Please sign in to comment.