Skip to content
Browse files

Merge pull request #76 from ttencate/master

added missing SetMaxLength wrapper for b2RopeJoint
  • Loading branch information...
2 parents 61e31b8 + cb849d0 commit b5c5096c49c439ddb97cd7253520f9485fe88f24 @badlogic badlogic committed Oct 17, 2012
View
11 gdx/jni/com.badlogic.gdx.physics.box2d.joints.RopeJoint.cpp
@@ -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);
+
+
+}
+
View
8 gdx/jni/com.badlogic.gdx.physics.box2d.joints.RopeJoint.h
@@ -15,6 +15,14 @@ extern "C" {
JNIEXPORT jfloat JNICALL Java_com_badlogic_gdx_physics_box2d_joints_RopeJoint_jniGetMaxLength
(JNIEnv *, jobject, jlong);
+/*
+ * Class: com_badlogic_gdx_physics_box2d_joints_RopeJoint
+ * Method: jniSetMaxLength
+ * Signature: (JF)F
+ */
+JNIEXPORT jfloat JNICALL Java_com_badlogic_gdx_physics_box2d_joints_RopeJoint_jniSetMaxLength
+ (JNIEnv *, jobject, jlong, jfloat);
+
#ifdef __cplusplus
}
#endif
View
12 gdx/src/com/badlogic/gdx/physics/box2d/joints/RopeJoint.java
@@ -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 b5c5096

Please sign in to comment.
Something went wrong with that request. Please try again.