- bullet native: change casting of java long to c++ objects

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8489 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 6ce4cc012e
commit b768d45016
  1. 56
      engine/src/bullet/native/com_jme3_bullet_PhysicsSpace.cpp
  2. 38
      engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionEvent.cpp
  3. 12
      engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionObject.cpp
  4. 2
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_BoxCollisionShape.cpp
  5. 2
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.cpp
  6. 8
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_CollisionShape.cpp
  7. 10
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_CompoundCollisionShape.cpp
  8. 2
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_ConeCollisionShape.cpp
  9. 2
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_CylinderCollisionShape.cpp
  10. 6
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_GImpactCollisionShape.cpp
  11. 2
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.cpp
  12. 2
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_HullCollisionShape.cpp
  13. 6
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_MeshCollisionShape.cpp
  14. 2
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_PlaneCollisionShape.cpp
  15. 8
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_SimplexCollisionShape.cpp
  16. 2
      engine/src/bullet/native/com_jme3_bullet_collision_shapes_SphereCollisionShape.cpp
  17. 10
      engine/src/bullet/native/com_jme3_bullet_joints_ConeJoint.cpp
  18. 26
      engine/src/bullet/native/com_jme3_bullet_joints_HingeJoint.cpp
  19. 2
      engine/src/bullet/native/com_jme3_bullet_joints_PhysicsJoint.cpp
  20. 18
      engine/src/bullet/native/com_jme3_bullet_joints_Point2PointJoint.cpp
  21. 22
      engine/src/bullet/native/com_jme3_bullet_joints_SixDofJoint.cpp
  22. 16
      engine/src/bullet/native/com_jme3_bullet_joints_SixDofSpringJoint.cpp
  23. 118
      engine/src/bullet/native/com_jme3_bullet_joints_SliderJoint.cpp
  24. 40
      engine/src/bullet/native/com_jme3_bullet_joints_motors_RotationalLimitMotor.cpp
  25. 24
      engine/src/bullet/native/com_jme3_bullet_joints_motors_TranslationalLimitMotor.cpp
  26. 46
      engine/src/bullet/native/com_jme3_bullet_objects_PhysicsCharacter.cpp
  27. 30
      engine/src/bullet/native/com_jme3_bullet_objects_PhysicsGhostObject.cpp
  28. 102
      engine/src/bullet/native/com_jme3_bullet_objects_PhysicsRigidBody.cpp
  29. 34
      engine/src/bullet/native/com_jme3_bullet_objects_PhysicsVehicle.cpp
  30. 14
      engine/src/bullet/native/com_jme3_bullet_objects_VehicleWheel.cpp
  31. 12
      engine/src/bullet/native/com_jme3_bullet_objects_infos_RigidBodyMotionState.cpp
  32. 6
      engine/src/bullet/native/com_jme3_bullet_util_DebugShapeFactory.cpp
  33. 2
      engine/src/bullet/native/com_jme3_bullet_util_NativeMeshUtil.cpp
  34. 8
      engine/src/bullet/native/jmeBulletUtil.h

@ -55,7 +55,7 @@ extern "C" {
return 0; return 0;
} }
space->createPhysicsSpace(minX, minY, minZ, maxX, maxY, maxZ, broadphase, threading); space->createPhysicsSpace(minX, minY, minZ, maxX, maxY, maxZ, broadphase, threading);
return (OBJ_PTR) space; return reinterpret_cast<jlong>(space);
} }
/* /*
@ -65,7 +65,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_stepSimulation JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_stepSimulation
(JNIEnv * env, jobject object, jlong spaceId, jfloat tpf, jint maxSteps, jfloat accuracy) { (JNIEnv * env, jobject object, jlong spaceId, jfloat tpf, jint maxSteps, jfloat accuracy) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -81,8 +81,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCollisionObject JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCollisionObject
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) { (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btCollisionObject* collisionObject = (btCollisionObject*) objectId; btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -106,8 +106,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCollisionObject JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCollisionObject
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) { (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btCollisionObject* collisionObject = (btCollisionObject*) objectId; btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -130,8 +130,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addRigidBody JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addRigidBody
(JNIEnv * env, jobject object, jlong spaceId, jlong rigidBodyId) { (JNIEnv * env, jobject object, jlong spaceId, jlong rigidBodyId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btRigidBody* collisionObject = (btRigidBody*) rigidBodyId; btRigidBody* collisionObject = reinterpret_cast<btRigidBody*>(rigidBodyId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -154,8 +154,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeRigidBody JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeRigidBody
(JNIEnv * env, jobject object, jlong spaceId, jlong rigidBodyId) { (JNIEnv * env, jobject object, jlong spaceId, jlong rigidBodyId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btRigidBody* collisionObject = (btRigidBody*) rigidBodyId; btRigidBody* collisionObject = reinterpret_cast<btRigidBody*>(rigidBodyId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -178,8 +178,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCharacterObject JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCharacterObject
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) { (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btCollisionObject* collisionObject = (btCollisionObject*) objectId; btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -205,8 +205,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCharacterObject JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCharacterObject
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) { (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btCollisionObject* collisionObject = (btCollisionObject*) objectId; btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -229,8 +229,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addAction JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addAction
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) { (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btActionInterface* actionObject = (btActionInterface*) objectId; btActionInterface* actionObject = reinterpret_cast<btActionInterface*>(objectId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -251,8 +251,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeAction JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeAction
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) { (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btActionInterface* actionObject = (btActionInterface*) objectId; btActionInterface* actionObject = reinterpret_cast<btActionInterface*>(objectId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -273,8 +273,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addVehicle JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addVehicle
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) { (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btActionInterface* actionObject = (btActionInterface*) objectId; btActionInterface* actionObject = reinterpret_cast<btActionInterface*>(objectId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -295,8 +295,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeVehicle JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeVehicle
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) { (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btActionInterface* actionObject = (btActionInterface*) objectId; btActionInterface* actionObject = reinterpret_cast<btActionInterface*>(objectId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -317,8 +317,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addConstraint JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addConstraint
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) { (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btTypedConstraint* constraint = (btTypedConstraint*) objectId; btTypedConstraint* constraint = reinterpret_cast<btTypedConstraint*>(objectId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -339,8 +339,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeConstraint JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeConstraint
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) { (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
btTypedConstraint* constraint = (btTypedConstraint*) objectId; btTypedConstraint* constraint = reinterpret_cast<btTypedConstraint*>(objectId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -361,7 +361,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_setGravity JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_setGravity
(JNIEnv * env, jobject object, jlong spaceId, jobject vector) { (JNIEnv * env, jobject object, jlong spaceId, jobject vector) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The physics space does not exist."); env->ThrowNew(newExc, "The physics space does not exist.");
@ -389,7 +389,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_finalizeNative JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_finalizeNative
(JNIEnv * env, jobject object, jlong spaceId) { (JNIEnv * env, jobject object, jlong spaceId) {
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId; jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
if (space == NULL) { if (space == NULL) {
return; return;
} }

@ -9,7 +9,7 @@
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulse JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulse
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -25,7 +25,7 @@ JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_ge
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral1 JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral1
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -41,7 +41,7 @@ JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_ge
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral2 JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral2
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -57,7 +57,7 @@ JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_ge
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedFriction JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedFriction
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -73,7 +73,7 @@ JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_ge
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedRestitution JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedRestitution
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -89,7 +89,7 @@ JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_ge
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getDistance1 JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getDistance1
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -105,7 +105,7 @@ JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_ge
*/ */
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex0 JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex0
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -121,7 +121,7 @@ JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getI
*/ */
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex1 JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex1
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -137,7 +137,7 @@ JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getI
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir1 JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir1
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject lateralFrictionDir1) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject lateralFrictionDir1) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -153,7 +153,7 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getL
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir2 JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir2
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject lateralFrictionDir2) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject lateralFrictionDir2) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -169,7 +169,7 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getL
*/ */
JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_isLateralFrictionInitialized JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_isLateralFrictionInitialized
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -185,7 +185,7 @@ JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_
*/ */
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLifeTime JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLifeTime
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -201,7 +201,7 @@ JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getL
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointA JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointA
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject localPointA) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject localPointA) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -217,7 +217,7 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getL
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointB JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointB
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject localPointB) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject localPointB) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -233,7 +233,7 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getL
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getNormalWorldOnB JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getNormalWorldOnB
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject normalWorldOnB) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject normalWorldOnB) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -249,7 +249,7 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getN
*/ */
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId0 JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId0
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -265,7 +265,7 @@ JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getP
*/ */
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId1 JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId1
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -281,7 +281,7 @@ JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getP
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnA JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnA
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject positionWorldOnA) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject positionWorldOnA) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");
@ -298,7 +298,7 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getP
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnB JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnB
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject positionWorldOnB) { (JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject positionWorldOnB) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId; btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
if (mp == NULL) { if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist."); env->ThrowNew(newExc, "The manifoldPoint does not exist.");

@ -49,13 +49,13 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_attachCollisionShape JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_attachCollisionShape
(JNIEnv * env, jobject object, jlong objectId, jlong shapeId) { (JNIEnv * env, jobject object, jlong objectId, jlong shapeId) {
btCollisionObject* collisionObject = (btCollisionObject*) objectId; btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
if (collisionObject == NULL) { if (collisionObject == NULL) {
jclass newExc = env->FindClass("java/lang/IllegalStateException"); jclass newExc = env->FindClass("java/lang/IllegalStateException");
env->ThrowNew(newExc, "The collision object does not exist."); env->ThrowNew(newExc, "The collision object does not exist.");
return; return;
} }
btCollisionShape* collisionShape = (btCollisionShape*) shapeId; btCollisionShape* collisionShape = reinterpret_cast<btCollisionShape*>(shapeId);
if (collisionShape == NULL) { if (collisionShape == NULL) {
jclass newExc = env->FindClass("java/lang/IllegalStateException"); jclass newExc = env->FindClass("java/lang/IllegalStateException");
env->ThrowNew(newExc, "The collision shape does not exist."); env->ThrowNew(newExc, "The collision shape does not exist.");
@ -71,7 +71,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_finalizeNative JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_finalizeNative
(JNIEnv * env, jobject object, jlong objectId) { (JNIEnv * env, jobject object, jlong objectId) {
btCollisionObject* collisionObject = (btCollisionObject*) objectId; btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
if (collisionObject == NULL) { if (collisionObject == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -90,7 +90,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_initUserPointer JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_initUserPointer
(JNIEnv *env, jobject object, jlong objectId, jint group, jint groups) { (JNIEnv *env, jobject object, jlong objectId, jint group, jint groups) {
btCollisionObject* collisionObject = (btCollisionObject*) objectId; btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
if (collisionObject == NULL) { if (collisionObject == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -114,7 +114,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_setCollisionGroup JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_setCollisionGroup
(JNIEnv *env, jobject object, jlong objectId, jint group) { (JNIEnv *env, jobject object, jlong objectId, jint group) {
btCollisionObject* collisionObject = (btCollisionObject*) objectId; btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
if (collisionObject == NULL) { if (collisionObject == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -132,7 +132,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_setCollideWithGroups JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_setCollideWithGroups
(JNIEnv *env, jobject object, jlong objectId, jint groups) { (JNIEnv *env, jobject object, jlong objectId, jint groups) {
btCollisionObject* collisionObject = (btCollisionObject*) objectId; btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
if (collisionObject == NULL) { if (collisionObject == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -51,7 +51,7 @@ extern "C" {
btVector3 extents = btVector3(); btVector3 extents = btVector3();
jmeBulletUtil::convert(env, halfExtents, &extents); jmeBulletUtil::convert(env, halfExtents, &extents);
btBoxShape* shape = new btBoxShape(extents); btBoxShape* shape = new btBoxShape(extents);
return (OBJ_PTR)shape; return reinterpret_cast<jlong>(shape);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -60,7 +60,7 @@ extern "C" {
shape = new btCapsuleShapeZ(radius, height); shape = new btCapsuleShapeZ(radius, height);
break; break;
} }
return (OBJ_PTR) shape; return reinterpret_cast<jlong>(shape);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -47,7 +47,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_getMargin JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_getMargin
(JNIEnv * env, jobject object, jlong shapeId) { (JNIEnv * env, jobject object, jlong shapeId) {
btCollisionShape* shape = (btCollisionShape*) shapeId; btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
if (shape == NULL) { if (shape == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -63,7 +63,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_setLocalScaling JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_setLocalScaling
(JNIEnv * env, jobject object, jlong shapeId, jobject scale) { (JNIEnv * env, jobject object, jlong shapeId, jobject scale) {
btCollisionShape* shape = (btCollisionShape*) shapeId; btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
if (shape == NULL) { if (shape == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -81,7 +81,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_setMargin JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_setMargin
(JNIEnv * env, jobject object, jlong shapeId, jfloat newMargin) { (JNIEnv * env, jobject object, jlong shapeId, jfloat newMargin) {
btCollisionShape* shape = (btCollisionShape*) shapeId; btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
if (shape == NULL) { if (shape == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -97,7 +97,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_finalizeNative JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_finalizeNative
(JNIEnv * env, jobject object, jlong shapeId) { (JNIEnv * env, jobject object, jlong shapeId) {
btCollisionShape* shape = (btCollisionShape*) shapeId; btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
if (shape == NULL) { if (shape == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -49,7 +49,7 @@ extern "C" {
(JNIEnv *env, jobject object) { (JNIEnv *env, jobject object) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btCompoundShape* shape = new btCompoundShape(); btCompoundShape* shape = new btCompoundShape();
return (OBJ_PTR) shape; return reinterpret_cast<jlong>(shape);
} }
/* /*
@ -59,13 +59,13 @@ extern "C" {
*/ */
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_addChildShape JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_addChildShape
(JNIEnv *env, jobject object, jlong compoundId, jlong childId, jobject childLocation, jobject childRotation) { (JNIEnv *env, jobject object, jlong compoundId, jlong childId, jobject childLocation, jobject childRotation) {
btCompoundShape* shape = (btCompoundShape*) compoundId; btCompoundShape* shape = reinterpret_cast<btCompoundShape*>(compoundId);
if (shape == NULL) { if (shape == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
return 0; return 0;
} }
btCollisionShape* child = (btCollisionShape*) childId; btCollisionShape* child = reinterpret_cast<btCollisionShape*>(childId);
if (shape == NULL) { if (shape == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -86,13 +86,13 @@ extern "C" {
*/ */
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_removeChildShape JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_removeChildShape
(JNIEnv * env, jobject object, jlong compoundId, jlong childId) { (JNIEnv * env, jobject object, jlong compoundId, jlong childId) {
btCompoundShape* shape = (btCompoundShape*) compoundId; btCompoundShape* shape = reinterpret_cast<btCompoundShape*>(compoundId);
if (shape == NULL) { if (shape == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
return 0; return 0;
} }
btCollisionShape* child = (btCollisionShape*) childId; btCollisionShape* child = reinterpret_cast<btCollisionShape*>(childId);
if (shape == NULL) { if (shape == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -60,7 +60,7 @@ extern "C" {
shape = new btConeShapeZ(radius, height); shape = new btConeShapeZ(radius, height);
break; break;
} }
return (OBJ_PTR) shape; return reinterpret_cast<jlong>(shape);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -62,7 +62,7 @@ extern "C" {
shape = new btCylinderShapeZ(extents); shape = new btCylinderShapeZ(extents);
break; break;
} }
return (OBJ_PTR) shape; return reinterpret_cast<jlong>(shape);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -49,9 +49,9 @@ extern "C" {
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_GImpactCollisionShape_createShape JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_GImpactCollisionShape_createShape
(JNIEnv * env, jobject object, jlong meshId) { (JNIEnv * env, jobject object, jlong meshId) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btTriangleIndexVertexArray* array = (btTriangleIndexVertexArray*) meshId; btTriangleIndexVertexArray* array = reinterpret_cast<btTriangleIndexVertexArray*>(meshId);
btGImpactMeshShape* shape = new btGImpactMeshShape(array); btGImpactMeshShape* shape = new btGImpactMeshShape(array);
return (OBJ_PTR) shape; return reinterpret_cast<jlong>(shape);
} }
/* /*
@ -61,7 +61,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_GImpactCollisionShape_finalizeNative JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_GImpactCollisionShape_finalizeNative
(JNIEnv * env, jobject object, jlong meshId) { (JNIEnv * env, jobject object, jlong meshId) {
btTriangleIndexVertexArray* array = (btTriangleIndexVertexArray*) meshId; btTriangleIndexVertexArray* array = reinterpret_cast<btTriangleIndexVertexArray*> (meshId);
delete(array); delete(array);
} }

@ -51,7 +51,7 @@ extern "C" {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
void* data = env->GetDirectBufferAddress(heightfieldData); void* data = env->GetDirectBufferAddress(heightfieldData);
btHeightfieldTerrainShape* shape=new btHeightfieldTerrainShape(heightStickWidth, heightStickLength, data, heightScale, minHeight, maxHeight, upAxis, PHY_FLOAT, flipQuadEdges); btHeightfieldTerrainShape* shape=new btHeightfieldTerrainShape(heightStickWidth, heightStickLength, data, heightScale, minHeight, maxHeight, upAxis, PHY_FLOAT, flipQuadEdges);
return (OBJ_PTR)shape; return reinterpret_cast<jlong>(shape);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -61,7 +61,7 @@ extern "C" {
shape->addPoint(vect); shape->addPoint(vect);
} }
return (OBJ_PTR) shape; return reinterpret_cast<jlong>(shape);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -49,9 +49,9 @@ extern "C" {
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_createShape JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_createShape
(JNIEnv * env, jobject object, jlong arrayId) { (JNIEnv * env, jobject object, jlong arrayId) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btTriangleIndexVertexArray* array = (btTriangleIndexVertexArray*) arrayId; btTriangleIndexVertexArray* array = reinterpret_cast<btTriangleIndexVertexArray*>(arrayId);
btBvhTriangleMeshShape* shape = new btBvhTriangleMeshShape(array, true, true); btBvhTriangleMeshShape* shape = new btBvhTriangleMeshShape(array, true, true);
return (OBJ_PTR) shape; return reinterpret_cast<jlong>(shape);
} }
/* /*
@ -61,7 +61,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_finalizeNative JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_finalizeNative
(JNIEnv * env, jobject object, jlong arrayId){ (JNIEnv * env, jobject object, jlong arrayId){
btTriangleIndexVertexArray* array = (btTriangleIndexVertexArray*) arrayId; btTriangleIndexVertexArray* array = reinterpret_cast<btTriangleIndexVertexArray*>(arrayId);
delete(array); delete(array);
} }

@ -52,7 +52,7 @@ extern "C" {
btVector3 norm = btVector3(); btVector3 norm = btVector3();
jmeBulletUtil::convert(env, normal, &norm); jmeBulletUtil::convert(env, normal, &norm);
btStaticPlaneShape* shape = new btStaticPlaneShape(norm, constant); btStaticPlaneShape* shape = new btStaticPlaneShape(norm, constant);
return (OBJ_PTR)shape; return reinterpret_cast<jlong>(shape);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -51,7 +51,7 @@ extern "C" {
btVector3 vec1 = btVector3(); btVector3 vec1 = btVector3();
jmeBulletUtil::convert(env, vector1, &vec1); jmeBulletUtil::convert(env, vector1, &vec1);
btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1); btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1);
return (OBJ_PTR) simplexShape; return reinterpret_cast<jlong>(simplexShape);
} }
/* /*
@ -67,7 +67,7 @@ extern "C" {
btVector3 vec2 = btVector3(); btVector3 vec2 = btVector3();
jmeBulletUtil::convert(env, vector2, &vec2); jmeBulletUtil::convert(env, vector2, &vec2);
btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2); btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2);
return (OBJ_PTR) simplexShape; return reinterpret_cast<jlong>(simplexShape);
} }
/* /*
* Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape * Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape
@ -84,7 +84,7 @@ extern "C" {
btVector3 vec3 = btVector3(); btVector3 vec3 = btVector3();
jmeBulletUtil::convert(env, vector3, &vec3); jmeBulletUtil::convert(env, vector3, &vec3);
btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2, vec3); btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2, vec3);
return (OBJ_PTR) simplexShape; return reinterpret_cast<jlong>(simplexShape);
} }
/* /*
* Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape * Class: com_jme3_bullet_collision_shapes_SimplexCollisionShape
@ -103,7 +103,7 @@ extern "C" {
btVector3 vec4 = btVector3(); btVector3 vec4 = btVector3();
jmeBulletUtil::convert(env, vector4, &vec4); jmeBulletUtil::convert(env, vector4, &vec4);
btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2, vec3, vec4); btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2, vec3, vec4);
return (OBJ_PTR) simplexShape; return reinterpret_cast<jlong>(simplexShape);
} }
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -49,7 +49,7 @@ extern "C" {
(JNIEnv *env, jobject object, jfloat radius) { (JNIEnv *env, jobject object, jfloat radius) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btSphereShape* shape=new btSphereShape(radius); btSphereShape* shape=new btSphereShape(radius);
return (OBJ_PTR)shape; return reinterpret_cast<jlong>(shape);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -47,7 +47,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_ConeJoint_setLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_ConeJoint_setLimit
(JNIEnv * env, jobject object, jlong jointId, jfloat swingSpan1, jfloat swingSpan2, jfloat twistSpan) { (JNIEnv * env, jobject object, jlong jointId, jfloat swingSpan1, jfloat swingSpan2, jfloat twistSpan) {
btConeTwistConstraint* joint = (btConeTwistConstraint*) jointId; btConeTwistConstraint* joint = reinterpret_cast<btConeTwistConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -64,7 +64,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_ConeJoint_setAngularOnly JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_ConeJoint_setAngularOnly
(JNIEnv * env, jobject object, jlong jointId, jboolean angularOnly) { (JNIEnv * env, jobject object, jlong jointId, jboolean angularOnly) {
btConeTwistConstraint* joint = (btConeTwistConstraint*) jointId; btConeTwistConstraint* joint = reinterpret_cast<btConeTwistConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -81,8 +81,8 @@ extern "C" {
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_ConeJoint_createJoint JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_ConeJoint_createJoint
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB) { (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btRigidBody* bodyA = (btRigidBody*) bodyIdA; btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
btRigidBody* bodyB = (btRigidBody*) bodyIdB; btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
btMatrix3x3 mtx1 = btMatrix3x3(); btMatrix3x3 mtx1 = btMatrix3x3();
btMatrix3x3 mtx2 = btMatrix3x3(); btMatrix3x3 mtx2 = btMatrix3x3();
btTransform transA = btTransform(mtx1); btTransform transA = btTransform(mtx1);
@ -92,7 +92,7 @@ extern "C" {
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin()); jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
jmeBulletUtil::convert(env, rotB, &transB.getBasis()); jmeBulletUtil::convert(env, rotB, &transB.getBasis());
btConeTwistConstraint* joint = new btConeTwistConstraint(*bodyA, *bodyB, transA, transB); btConeTwistConstraint* joint = new btConeTwistConstraint(*bodyA, *bodyB, transA, transB);
return (OBJ_PTR) joint; return reinterpret_cast<jlong>(joint);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -47,7 +47,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_enableMotor JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_enableMotor
(JNIEnv * env, jobject object, jlong jointId, jboolean enable, jfloat targetVelocity, jfloat maxMotorImpulse) { (JNIEnv * env, jobject object, jlong jointId, jboolean enable, jfloat targetVelocity, jfloat maxMotorImpulse) {
btHingeConstraint* joint = (btHingeConstraint*) jointId; btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -63,7 +63,7 @@ extern "C" {
*/ */
JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_HingeJoint_getEnableAngularMotor JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_HingeJoint_getEnableAngularMotor
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btHingeConstraint* joint = (btHingeConstraint*) jointId; btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -79,7 +79,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getMotorTargetVelocity JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getMotorTargetVelocity
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btHingeConstraint* joint = (btHingeConstraint*) jointId; btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -95,7 +95,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getMaxMotorImpulse JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getMaxMotorImpulse
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btHingeConstraint* joint = (btHingeConstraint*) jointId; btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -111,7 +111,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setLimit__JFF JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setLimit__JFF
(JNIEnv * env, jobject object, jlong jointId, jfloat low, jfloat high) { (JNIEnv * env, jobject object, jlong jointId, jfloat low, jfloat high) {
btHingeConstraint* joint = (btHingeConstraint*) jointId; btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -127,7 +127,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setLimit__JFFFFF JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setLimit__JFFFFF
(JNIEnv * env, jobject object, jlong jointId, jfloat low, jfloat high, jfloat softness, jfloat biasFactor, jfloat relaxationFactor) { (JNIEnv * env, jobject object, jlong jointId, jfloat low, jfloat high, jfloat softness, jfloat biasFactor, jfloat relaxationFactor) {
btHingeConstraint* joint = (btHingeConstraint*) jointId; btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -143,7 +143,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getUpperLimit JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getUpperLimit
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btHingeConstraint* joint = (btHingeConstraint*) jointId; btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -159,7 +159,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getLowerLimit JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getLowerLimit
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btHingeConstraint* joint = (btHingeConstraint*) jointId; btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -175,7 +175,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setAngularOnly JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setAngularOnly
(JNIEnv * env, jobject object, jlong jointId, jboolean angular) { (JNIEnv * env, jobject object, jlong jointId, jboolean angular) {
btHingeConstraint* joint = (btHingeConstraint*) jointId; btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -191,7 +191,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getHingeAngle JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getHingeAngle
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btHingeConstraint* joint = (btHingeConstraint*) jointId; btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -208,8 +208,8 @@ extern "C" {
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_HingeJoint_createJoint JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_HingeJoint_createJoint
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject axisA, jobject pivotB, jobject axisB) { (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject axisA, jobject pivotB, jobject axisB) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btRigidBody* bodyA = (btRigidBody*) bodyIdA; btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
btRigidBody* bodyB = (btRigidBody*) bodyIdB; btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
btVector3 vec1 = btVector3(); btVector3 vec1 = btVector3();
btVector3 vec2 = btVector3(); btVector3 vec2 = btVector3();
btVector3 vec3 = btVector3(); btVector3 vec3 = btVector3();
@ -219,7 +219,7 @@ extern "C" {
jmeBulletUtil::convert(env, axisA, &vec3); jmeBulletUtil::convert(env, axisA, &vec3);
jmeBulletUtil::convert(env, axisB, &vec4); jmeBulletUtil::convert(env, axisB, &vec4);
btHingeConstraint* joint = new btHingeConstraint(*bodyA, *bodyB, vec1, vec2, vec3, vec4); btHingeConstraint* joint = new btHingeConstraint(*bodyA, *bodyB, vec1, vec2, vec3, vec4);
return (OBJ_PTR) joint; return reinterpret_cast<jlong>(joint);
} }
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -47,7 +47,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_PhysicsJoint_getAppliedImpulse JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_PhysicsJoint_getAppliedImpulse
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btTypedConstraint* joint = (btTypedConstraint*) jointId; btTypedConstraint* joint = reinterpret_cast<btTypedConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -47,7 +47,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setDamping JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setDamping
(JNIEnv * env, jobject object, jlong jointId, jfloat damping) { (JNIEnv * env, jobject object, jlong jointId, jfloat damping) {
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId; btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -63,7 +63,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setImpulseClamp JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setImpulseClamp
(JNIEnv * env, jobject object, jlong jointId, jfloat clamp) { (JNIEnv * env, jobject object, jlong jointId, jfloat clamp) {
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId; btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -79,7 +79,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setTau JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setTau
(JNIEnv * env, jobject object, jlong jointId, jfloat tau) { (JNIEnv * env, jobject object, jlong jointId, jfloat tau) {
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId; btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -95,7 +95,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getDamping JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getDamping
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId; btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -111,7 +111,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getImpulseClamp JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getImpulseClamp
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId; btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -127,7 +127,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getTau JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getTau
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId; btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -144,8 +144,8 @@ extern "C" {
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_createJoint JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_createJoint
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject pivotB) { (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject pivotB) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btRigidBody* bodyA = (btRigidBody*) bodyIdA; btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
btRigidBody* bodyB = (btRigidBody*) bodyIdB; btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
//TODO: matrix not needed? //TODO: matrix not needed?
btMatrix3x3 mtx1 = btMatrix3x3(); btMatrix3x3 mtx1 = btMatrix3x3();
btMatrix3x3 mtx2 = btMatrix3x3(); btMatrix3x3 mtx2 = btMatrix3x3();
@ -154,7 +154,7 @@ extern "C" {
btTransform transB = btTransform(mtx2); btTransform transB = btTransform(mtx2);
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin()); jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
btHingeConstraint* joint = new btHingeConstraint(*bodyA, *bodyB, transA, transB); btHingeConstraint* joint = new btHingeConstraint(*bodyA, *bodyB, transA, transB);
return (OBJ_PTR) joint; return reinterpret_cast<jlong>(joint);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -47,13 +47,13 @@ extern "C" {
*/ */
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getRotationalLimitMotor JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getRotationalLimitMotor
(JNIEnv * env, jobject object, jlong jointId, jint index) { (JNIEnv * env, jobject object, jlong jointId, jint index) {
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId; btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
return 0; return 0;
} }
return (OBJ_PTR) joint->getRotationalLimitMotor(index); return reinterpret_cast<jlong>(joint->getRotationalLimitMotor(index));
} }
/* /*
@ -63,13 +63,13 @@ extern "C" {
*/ */
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getTranslationalLimitMotor JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getTranslationalLimitMotor
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId; btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
return 0; return 0;
} }
return (OBJ_PTR) joint->getTranslationalLimitMotor(); return reinterpret_cast<jlong>(joint->getTranslationalLimitMotor());
} }
/* /*
@ -79,7 +79,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearUpperLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearUpperLimit
(JNIEnv * env, jobject object, jlong jointId, jobject vector) { (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId; btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -97,7 +97,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearLowerLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearLowerLimit
(JNIEnv * env, jobject object, jlong jointId, jobject vector) { (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId; btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -115,7 +115,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularUpperLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularUpperLimit
(JNIEnv * env, jobject object, jlong jointId, jobject vector) { (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId; btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -133,7 +133,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularLowerLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularLowerLimit
(JNIEnv * env, jobject object, jlong jointId, jobject vector) { (JNIEnv * env, jobject object, jlong jointId, jobject vector) {
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId; btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -152,8 +152,8 @@ extern "C" {
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_createJoint JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_createJoint
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) { (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btRigidBody* bodyA = (btRigidBody*) bodyIdA; btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
btRigidBody* bodyB = (btRigidBody*) bodyIdB; btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
btMatrix3x3 mtx1 = btMatrix3x3(); btMatrix3x3 mtx1 = btMatrix3x3();
btMatrix3x3 mtx2 = btMatrix3x3(); btMatrix3x3 mtx2 = btMatrix3x3();
btTransform transA = btTransform(mtx1); btTransform transA = btTransform(mtx1);
@ -163,7 +163,7 @@ extern "C" {
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin()); jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
jmeBulletUtil::convert(env, rotB, &transB.getBasis()); jmeBulletUtil::convert(env, rotB, &transB.getBasis());
btGeneric6DofConstraint* joint = new btGeneric6DofConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA); btGeneric6DofConstraint* joint = new btGeneric6DofConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA);
return (OBJ_PTR) joint; return reinterpret_cast<jlong>(joint);
} }
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -16,7 +16,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_enableSpring JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_enableSpring
(JNIEnv *env, jobject object, jlong jointId, jint index, jboolean onOff) { (JNIEnv *env, jobject object, jlong jointId, jint index, jboolean onOff) {
btGeneric6DofSpringConstraint* joint = (btGeneric6DofSpringConstraint*) jointId; btGeneric6DofSpringConstraint* joint = reinterpret_cast<btGeneric6DofSpringConstraint*>(jointId);
joint -> enableSpring(index, onOff); joint -> enableSpring(index, onOff);
} }
@ -28,7 +28,7 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_enableSprin
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setStiffness JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setStiffness
(JNIEnv *env, jobject object, jlong jointId, jint index, jfloat stiffness) { (JNIEnv *env, jobject object, jlong jointId, jint index, jfloat stiffness) {
btGeneric6DofSpringConstraint* joint = (btGeneric6DofSpringConstraint*) jointId; btGeneric6DofSpringConstraint* joint = reinterpret_cast<btGeneric6DofSpringConstraint*>(jointId);
joint -> setStiffness(index, stiffness); joint -> setStiffness(index, stiffness);
} }
@ -39,7 +39,7 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setStiffnes
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setDamping JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setDamping
(JNIEnv *env, jobject object, jlong jointId, jint index, jfloat damping) { (JNIEnv *env, jobject object, jlong jointId, jint index, jfloat damping) {
btGeneric6DofSpringConstraint* joint = (btGeneric6DofSpringConstraint*) jointId; btGeneric6DofSpringConstraint* joint = reinterpret_cast<btGeneric6DofSpringConstraint*>(jointId);
joint -> setDamping(index, damping); joint -> setDamping(index, damping);
} }
@ -50,7 +50,7 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setDamping
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibriumPoint__J JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibriumPoint__J
(JNIEnv *env, jobject object, jlong jointId) { (JNIEnv *env, jobject object, jlong jointId) {
btGeneric6DofSpringConstraint* joint = (btGeneric6DofSpringConstraint*) jointId; btGeneric6DofSpringConstraint* joint = reinterpret_cast<btGeneric6DofSpringConstraint*>(jointId);
joint -> setEquilibriumPoint(); joint -> setEquilibriumPoint();
} }
@ -61,7 +61,7 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibr
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibriumPoint__JI JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibriumPoint__JI
(JNIEnv *env, jobject object, jlong jointId, jint index) { (JNIEnv *env, jobject object, jlong jointId, jint index) {
btGeneric6DofSpringConstraint* joint = (btGeneric6DofSpringConstraint*) jointId; btGeneric6DofSpringConstraint* joint = reinterpret_cast<btGeneric6DofSpringConstraint*>(jointId);
joint -> setEquilibriumPoint(index); joint -> setEquilibriumPoint(index);
} }
@ -76,8 +76,8 @@ JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibr
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_createJoint JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_createJoint
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) { (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btRigidBody* bodyA = (btRigidBody*) bodyIdA; btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
btRigidBody* bodyB = (btRigidBody*) bodyIdB; btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
btTransform transA; btTransform transA;
jmeBulletUtil::convert(env, pivotA, &transA.getOrigin()); jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
jmeBulletUtil::convert(env, rotA, &transA.getBasis()); jmeBulletUtil::convert(env, rotA, &transA.getBasis());
@ -86,7 +86,7 @@ JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_createJoin
jmeBulletUtil::convert(env, rotB, &transB.getBasis()); jmeBulletUtil::convert(env, rotB, &transB.getBasis());
btGeneric6DofSpringConstraint* joint = new btGeneric6DofSpringConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA); btGeneric6DofSpringConstraint* joint = new btGeneric6DofSpringConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA);
return (OBJ_PTR)joint; return reinterpret_cast<jlong>(joint);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -47,7 +47,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getLowerLinLimit JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getLowerLinLimit
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -63,7 +63,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setLowerLinLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setLowerLinLimit
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -79,7 +79,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getUpperLinLimit JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getUpperLinLimit
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -95,7 +95,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setUpperLinLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setUpperLinLimit
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -111,7 +111,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getLowerAngLimit JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getLowerAngLimit
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -127,7 +127,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setLowerAngLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setLowerAngLimit
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -143,7 +143,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getUpperAngLimit JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getUpperAngLimit
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -159,7 +159,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setUpperAngLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setUpperAngLimit
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -175,7 +175,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessDirLin JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessDirLin
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -191,7 +191,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessDirLin JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessDirLin
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -207,7 +207,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionDirLin JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionDirLin
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -223,7 +223,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionDirLin JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionDirLin
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -239,7 +239,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingDirLin JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingDirLin
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -255,7 +255,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingDirLin JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingDirLin
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -271,7 +271,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessDirAng JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessDirAng
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -287,7 +287,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessDirAng JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessDirAng
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -303,7 +303,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionDirAng JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionDirAng
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -319,7 +319,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionDirAng JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionDirAng
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -335,7 +335,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingDirAng JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingDirAng
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -351,7 +351,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingDirAng JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingDirAng
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -367,7 +367,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessLimLin JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessLimLin
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -383,7 +383,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessLimLin JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessLimLin
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -399,7 +399,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionLimLin JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionLimLin
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -415,7 +415,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionLimLin JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionLimLin
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -431,7 +431,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingLimLin JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingLimLin
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -447,7 +447,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingLimLin JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingLimLin
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -463,7 +463,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessLimAng JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessLimAng
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -479,7 +479,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessLimAng JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessLimAng
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -495,7 +495,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionLimAng JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionLimAng
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -511,7 +511,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionLimAng JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionLimAng
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -527,7 +527,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingLimAng JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingLimAng
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -543,7 +543,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingLimAng JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingLimAng
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -559,7 +559,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessOrthoLin JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessOrthoLin
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -575,7 +575,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessOrthoLin JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessOrthoLin
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -591,7 +591,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionOrthoLin JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionOrthoLin
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -607,7 +607,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionOrthoLin JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionOrthoLin
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -623,7 +623,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingOrthoLin JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingOrthoLin
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -639,7 +639,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingOrthoLin JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingOrthoLin
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -655,7 +655,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessOrthoAng JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessOrthoAng
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -671,7 +671,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessOrthoAng JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessOrthoAng
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -687,7 +687,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionOrthoAng JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionOrthoAng
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -703,7 +703,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionOrthoAng JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionOrthoAng
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -719,7 +719,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingOrthoAng JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingOrthoAng
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -735,7 +735,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingOrthoAng JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingOrthoAng
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -751,7 +751,7 @@ extern "C" {
*/ */
JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_SliderJoint_isPoweredLinMotor JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_SliderJoint_isPoweredLinMotor
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -767,7 +767,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setPoweredLinMotor JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setPoweredLinMotor
(JNIEnv * env, jobject object, jlong jointId, jboolean value) { (JNIEnv * env, jobject object, jlong jointId, jboolean value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -783,7 +783,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getTargetLinMotorVelocity JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getTargetLinMotorVelocity
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -799,7 +799,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setTargetLinMotorVelocity JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setTargetLinMotorVelocity
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -815,7 +815,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getMaxLinMotorForce JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getMaxLinMotorForce
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -831,7 +831,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setMaxLinMotorForce JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setMaxLinMotorForce
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -847,7 +847,7 @@ extern "C" {
*/ */
JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_SliderJoint_isPoweredAngMotor JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_SliderJoint_isPoweredAngMotor
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -863,7 +863,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setPoweredAngMotor JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setPoweredAngMotor
(JNIEnv * env, jobject object, jlong jointId, jboolean value) { (JNIEnv * env, jobject object, jlong jointId, jboolean value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -879,7 +879,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getTargetAngMotorVelocity JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getTargetAngMotorVelocity
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -895,7 +895,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setTargetAngMotorVelocity JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setTargetAngMotorVelocity
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -911,7 +911,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getMaxAngMotorForce JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getMaxAngMotorForce
(JNIEnv * env, jobject object, jlong jointId) { (JNIEnv * env, jobject object, jlong jointId) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -927,7 +927,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setMaxAngMotorForce JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setMaxAngMotorForce
(JNIEnv * env, jobject object, jlong jointId, jfloat value) { (JNIEnv * env, jobject object, jlong jointId, jfloat value) {
btSliderConstraint* joint = (btSliderConstraint*) jointId; btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
if (joint == NULL) { if (joint == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -944,8 +944,8 @@ extern "C" {
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SliderJoint_createJoint JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SliderJoint_createJoint
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) { (JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btRigidBody* bodyA = (btRigidBody*) bodyIdA; btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
btRigidBody* bodyB = (btRigidBody*) bodyIdB; btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
btMatrix3x3 mtx1 = btMatrix3x3(); btMatrix3x3 mtx1 = btMatrix3x3();
btMatrix3x3 mtx2 = btMatrix3x3(); btMatrix3x3 mtx2 = btMatrix3x3();
btTransform transA = btTransform(mtx1); btTransform transA = btTransform(mtx1);
@ -955,7 +955,7 @@ extern "C" {
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin()); jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
jmeBulletUtil::convert(env, rotB, &transB.getBasis()); jmeBulletUtil::convert(env, rotB, &transB.getBasis());
btSliderConstraint* joint = new btSliderConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA); btSliderConstraint* joint = new btSliderConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA);
return (OBJ_PTR) joint; return reinterpret_cast<jlong>(joint);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -47,7 +47,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getLoLimit JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getLoLimit
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -63,7 +63,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setLoLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setLoLimit
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -79,7 +79,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getHiLimit JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getHiLimit
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -95,7 +95,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setHiLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setHiLimit
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -111,7 +111,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getTargetVelocity JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getTargetVelocity
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -127,7 +127,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setTargetVelocity JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setTargetVelocity
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -143,7 +143,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getMaxMotorForce JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getMaxMotorForce
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -159,7 +159,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setMaxMotorForce JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setMaxMotorForce
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -175,7 +175,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getMaxLimitForce JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getMaxLimitForce
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -191,7 +191,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setMaxLimitForce JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setMaxLimitForce
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -207,7 +207,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getDamping JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getDamping
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -223,7 +223,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setDamping JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setDamping
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -239,7 +239,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getLimitSoftness JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getLimitSoftness
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -255,7 +255,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setLimitSoftness JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setLimitSoftness
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -271,7 +271,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getERP JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getERP
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -287,7 +287,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setERP JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setERP
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -303,7 +303,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getBounce JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getBounce
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -319,7 +319,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setBounce JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setBounce
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -335,7 +335,7 @@ extern "C" {
*/ */
JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_isEnableMotor JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_isEnableMotor
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -351,7 +351,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setEnableMotor JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setEnableMotor
(JNIEnv *env, jobject object, jlong motorId, jboolean value) { (JNIEnv *env, jobject object, jlong motorId, jboolean value) {
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId; btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -47,7 +47,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getLowerLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getLowerLimit
(JNIEnv *env, jobject object, jlong motorId, jobject vector) { (JNIEnv *env, jobject object, jlong motorId, jobject vector) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -63,7 +63,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setLowerLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setLowerLimit
(JNIEnv *env, jobject object, jlong motorId, jobject vector) { (JNIEnv *env, jobject object, jlong motorId, jobject vector) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -79,7 +79,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getUpperLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getUpperLimit
(JNIEnv *env, jobject object, jlong motorId, jobject vector) { (JNIEnv *env, jobject object, jlong motorId, jobject vector) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -95,7 +95,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setUpperLimit JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setUpperLimit
(JNIEnv *env, jobject object, jlong motorId, jobject vector) { (JNIEnv *env, jobject object, jlong motorId, jobject vector) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -111,7 +111,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getAccumulatedImpulse JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getAccumulatedImpulse
(JNIEnv *env, jobject object, jlong motorId, jobject vector) { (JNIEnv *env, jobject object, jlong motorId, jobject vector) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -127,7 +127,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setAccumulatedImpulse JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setAccumulatedImpulse
(JNIEnv *env, jobject object, jlong motorId, jobject vector) { (JNIEnv *env, jobject object, jlong motorId, jobject vector) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -143,7 +143,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getLetLimitSoftness JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getLetLimitSoftness
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -159,7 +159,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setLimitSoftness JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setLimitSoftness
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -175,7 +175,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getDamping JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getDamping
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -191,7 +191,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setDamping JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setDamping
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -207,7 +207,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getRestitution JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getRestitution
(JNIEnv *env, jobject object, jlong motorId) { (JNIEnv *env, jobject object, jlong motorId) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -223,7 +223,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setRestitution JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setRestitution
(JNIEnv *env, jobject object, jlong motorId, jfloat value) { (JNIEnv *env, jobject object, jlong motorId, jfloat value) {
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId; btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
if (motor == NULL) { if (motor == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -52,7 +52,7 @@ extern "C" {
(JNIEnv * env, jobject object) { (JNIEnv * env, jobject object) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btPairCachingGhostObject* ghost = new btPairCachingGhostObject(); btPairCachingGhostObject* ghost = new btPairCachingGhostObject();
return (OBJ_PTR) ghost; return reinterpret_cast<jlong>(ghost);
} }
/* /*
@ -62,7 +62,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setCharacterFlags JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setCharacterFlags
(JNIEnv *env, jobject object, jlong ghostId) { (JNIEnv *env, jobject object, jlong ghostId) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) ghostId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(ghostId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -79,16 +79,16 @@ extern "C" {
*/ */
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_createCharacterObject JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_createCharacterObject
(JNIEnv *env, jobject object, jlong objectId, jlong shapeId, jfloat stepHeight) { (JNIEnv *env, jobject object, jlong objectId, jlong shapeId, jfloat stepHeight) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
return 0; return 0;
} }
//TODO: check convexshape! //TODO: check convexshape!
btConvexShape* shape = (btConvexShape*) shapeId; btConvexShape* shape = reinterpret_cast<btConvexShape*>(shapeId);
btKinematicCharacterController* character = new btKinematicCharacterController(ghost, shape, stepHeight); btKinematicCharacterController* character = new btKinematicCharacterController(ghost, shape, stepHeight);
return (OBJ_PTR) character; return reinterpret_cast<jlong>(character);
} }
/* /*
@ -98,7 +98,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_warp JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_warp
(JNIEnv *env, jobject object, jlong objectId, jobject vector) { (JNIEnv *env, jobject object, jlong objectId, jobject vector) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -116,7 +116,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setWalkDirection JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setWalkDirection
(JNIEnv *env, jobject object, jlong objectId, jobject vector) { (JNIEnv *env, jobject object, jlong objectId, jobject vector) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -134,7 +134,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setUpAxis JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setUpAxis
(JNIEnv *env, jobject object, jlong objectId, jint value) { (JNIEnv *env, jobject object, jlong objectId, jint value) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -150,7 +150,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setFallSpeed JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setFallSpeed
(JNIEnv *env, jobject object, jlong objectId, jfloat value) { (JNIEnv *env, jobject object, jlong objectId, jfloat value) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -166,7 +166,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setJumpSpeed JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setJumpSpeed
(JNIEnv *env, jobject object, jlong objectId, jfloat value) { (JNIEnv *env, jobject object, jlong objectId, jfloat value) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -182,7 +182,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setGravity JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setGravity
(JNIEnv *env, jobject object, jlong objectId, jfloat value) { (JNIEnv *env, jobject object, jlong objectId, jfloat value) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -198,7 +198,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getGravity JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getGravity
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -214,7 +214,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setMaxSlope JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setMaxSlope
(JNIEnv *env, jobject object, jlong objectId, jfloat value) { (JNIEnv *env, jobject object, jlong objectId, jfloat value) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -230,7 +230,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getMaxSlope JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getMaxSlope
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -246,7 +246,7 @@ extern "C" {
*/ */
JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_onGround JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_onGround
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -262,7 +262,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_jump JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_jump
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -278,7 +278,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getPhysicsLocation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getPhysicsLocation
(JNIEnv *env, jobject object, jlong objectId, jobject value) { (JNIEnv *env, jobject object, jlong objectId, jobject value) {
btGhostObject* ghost = (btGhostObject*) objectId; btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -294,7 +294,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setCcdSweptSphereRadius JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setCcdSweptSphereRadius
(JNIEnv *env, jobject object, jlong objectId, jfloat value) { (JNIEnv *env, jobject object, jlong objectId, jfloat value) {
btGhostObject* ghost = (btGhostObject*) objectId; btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -310,7 +310,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setCcdMotionThreshold JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setCcdMotionThreshold
(JNIEnv *env, jobject object, jlong objectId, jfloat value) { (JNIEnv *env, jobject object, jlong objectId, jfloat value) {
btGhostObject* ghost = (btGhostObject*) objectId; btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -326,7 +326,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getCcdSweptSphereRadius JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getCcdSweptSphereRadius
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btGhostObject* ghost = (btGhostObject*) objectId; btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -342,7 +342,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getCcdMotionThreshold JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getCcdMotionThreshold
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btGhostObject* ghost = (btGhostObject*) objectId; btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -358,7 +358,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getCcdSquareMotionThreshold JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getCcdSquareMotionThreshold
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btGhostObject* ghost = (btGhostObject*) objectId; btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -374,7 +374,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_finalizeNativeCharacter JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_finalizeNativeCharacter
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId; btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
if (character == NULL) { if (character == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -54,7 +54,7 @@ extern "C" {
(JNIEnv * env, jobject object) { (JNIEnv * env, jobject object) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btPairCachingGhostObject* ghost = new btPairCachingGhostObject(); btPairCachingGhostObject* ghost = new btPairCachingGhostObject();
return (OBJ_PTR) ghost; return reinterpret_cast<jlong>(ghost);
} }
/* /*
@ -64,7 +64,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setGhostFlags JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setGhostFlags
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -80,7 +80,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setPhysicsLocation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setPhysicsLocation
(JNIEnv *env, jobject object, jlong objectId, jobject value) { (JNIEnv *env, jobject object, jlong objectId, jobject value) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -96,7 +96,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setPhysicsRotation__JLcom_jme3_math_Matrix3f_2 JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setPhysicsRotation__JLcom_jme3_math_Matrix3f_2
(JNIEnv *env, jobject object, jlong objectId, jobject value) { (JNIEnv *env, jobject object, jlong objectId, jobject value) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -112,7 +112,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setPhysicsRotation__JLcom_jme3_math_Quaternion_2 JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setPhysicsRotation__JLcom_jme3_math_Quaternion_2
(JNIEnv *env, jobject object, jlong objectId, jobject value) { (JNIEnv *env, jobject object, jlong objectId, jobject value) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -128,7 +128,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getPhysicsLocation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getPhysicsLocation
(JNIEnv *env, jobject object, jlong objectId, jobject value) { (JNIEnv *env, jobject object, jlong objectId, jobject value) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -144,7 +144,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getPhysicsRotation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getPhysicsRotation
(JNIEnv *env, jobject object, jlong objectId, jobject value) { (JNIEnv *env, jobject object, jlong objectId, jobject value) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -160,7 +160,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getPhysicsRotationMatrix JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getPhysicsRotationMatrix
(JNIEnv *env, jobject object, jlong objectId, jobject value) { (JNIEnv *env, jobject object, jlong objectId, jobject value) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -202,7 +202,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getOverlappingObjects JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getOverlappingObjects
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -219,7 +219,7 @@ extern "C" {
*/ */
JNIEXPORT jint JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getOverlappingCount JNIEXPORT jint JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getOverlappingCount
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -235,7 +235,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setCcdSweptSphereRadius JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setCcdSweptSphereRadius
(JNIEnv *env, jobject object, jlong objectId, jfloat value) { (JNIEnv *env, jobject object, jlong objectId, jfloat value) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -251,7 +251,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setCcdMotionThreshold JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setCcdMotionThreshold
(JNIEnv *env, jobject object, jlong objectId, jfloat value) { (JNIEnv *env, jobject object, jlong objectId, jfloat value) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -267,7 +267,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getCcdSweptSphereRadius JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getCcdSweptSphereRadius
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -283,7 +283,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getCcdMotionThreshold JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getCcdMotionThreshold
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -299,7 +299,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getCcdSquareMotionThreshold JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getCcdSquareMotionThreshold
(JNIEnv *env, jobject object, jlong objectId) { (JNIEnv *env, jobject object, jlong objectId) {
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId; btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
if (ghost == NULL) { if (ghost == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -49,13 +49,13 @@ extern "C" {
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_createRigidBody JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_createRigidBody
(JNIEnv *env, jobject object, jfloat mass, jlong motionstatId, jlong shapeId) { (JNIEnv *env, jobject object, jfloat mass, jlong motionstatId, jlong shapeId) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btMotionState* motionState = (btMotionState*) motionstatId; btMotionState* motionState = reinterpret_cast<btMotionState*>(motionstatId);
btCollisionShape* shape = (btCollisionShape*) shapeId; btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
btVector3 localInertia = btVector3(); btVector3 localInertia = btVector3();
shape->calculateLocalInertia(mass, localInertia); shape->calculateLocalInertia(mass, localInertia);
btRigidBody* body = new btRigidBody(mass, motionState, shape, localInertia); btRigidBody* body = new btRigidBody(mass, motionState, shape, localInertia);
body->setUserPointer(NULL); body->setUserPointer(NULL);
return (OBJ_PTR) body; return reinterpret_cast<jlong>(body);
} }
/* /*
@ -65,7 +65,7 @@ extern "C" {
*/ */
JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_isInWorld JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_isInWorld
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -81,7 +81,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setPhysicsLocation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setPhysicsLocation
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -106,7 +106,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setPhysicsRotation__JLcom_jme3_math_Matrix3f_2 JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setPhysicsRotation__JLcom_jme3_math_Matrix3f_2
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -131,7 +131,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setPhysicsRotation__JLcom_jme3_math_Quaternion_2 JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setPhysicsRotation__JLcom_jme3_math_Quaternion_2
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -156,7 +156,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getPhysicsLocation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getPhysicsLocation
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -172,7 +172,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getPhysicsRotation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getPhysicsRotation
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -188,7 +188,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getPhysicsRotationMatrix JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getPhysicsRotationMatrix
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -204,7 +204,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setKinematic JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setKinematic
(JNIEnv *env, jobject object, jlong bodyId, jboolean value) { (JNIEnv *env, jobject object, jlong bodyId, jboolean value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -226,7 +226,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setCcdSweptSphereRadius JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setCcdSweptSphereRadius
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) { (JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -242,7 +242,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setCcdMotionThreshold JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setCcdMotionThreshold
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) { (JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -258,7 +258,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getCcdSweptSphereRadius JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getCcdSweptSphereRadius
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -274,7 +274,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getCcdMotionThreshold JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getCcdMotionThreshold
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -290,7 +290,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getCcdSquareMotionThreshold JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getCcdSquareMotionThreshold
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -306,7 +306,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setStatic JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setStatic
(JNIEnv *env, jobject object, jlong bodyId, jboolean value) { (JNIEnv *env, jobject object, jlong bodyId, jboolean value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -326,17 +326,17 @@ extern "C" {
*/ */
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_updateMassProps JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_updateMassProps
(JNIEnv *env, jobject object, jlong bodyId, jlong shapeId, jfloat mass) { (JNIEnv *env, jobject object, jlong bodyId, jlong shapeId, jfloat mass) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
return 0; return 0;
} }
btCollisionShape* shape = (btCollisionShape*) shapeId; btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
btVector3 localInertia = btVector3(); btVector3 localInertia = btVector3();
shape->calculateLocalInertia(mass, localInertia); shape->calculateLocalInertia(mass, localInertia);
body->setMassProps(mass, localInertia); body->setMassProps(mass, localInertia);
return (OBJ_PTR) body; return reinterpret_cast<jlong>(body);
} }
/* /*
@ -346,7 +346,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getGravity JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getGravity
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -362,7 +362,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setGravity JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setGravity
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -380,7 +380,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getFriction JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getFriction
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -396,7 +396,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setFriction JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setFriction
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) { (JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -412,7 +412,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setDamping JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setDamping
(JNIEnv *env, jobject object, jlong bodyId, jfloat value1, jfloat value2) { (JNIEnv *env, jobject object, jlong bodyId, jfloat value1, jfloat value2) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -428,7 +428,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularDamping JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularDamping
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) { (JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -444,7 +444,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearDamping JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearDamping
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -460,7 +460,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularDamping JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularDamping
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -476,7 +476,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getRestitution JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getRestitution
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -492,7 +492,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setRestitution JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setRestitution
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) { (JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -508,7 +508,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularVelocity JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularVelocity
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -524,7 +524,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularVelocity JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularVelocity
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -542,7 +542,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearVelocity JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearVelocity
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -558,7 +558,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setLinearVelocity JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setLinearVelocity
(JNIEnv *env, jobject object, jlong bodyId, jobject value) { (JNIEnv *env, jobject object, jlong bodyId, jobject value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -576,7 +576,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyForce JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyForce
(JNIEnv *env, jobject object, jlong bodyId, jobject force, jobject location) { (JNIEnv *env, jobject object, jlong bodyId, jobject force, jobject location) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -596,7 +596,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyCentralForce JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyCentralForce
(JNIEnv *env, jobject object, jlong bodyId, jobject force) { (JNIEnv *env, jobject object, jlong bodyId, jobject force) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -614,7 +614,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyTorque JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyTorque
(JNIEnv *env, jobject object, jlong bodyId, jobject force) { (JNIEnv *env, jobject object, jlong bodyId, jobject force) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -632,7 +632,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyImpulse JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyImpulse
(JNIEnv *env, jobject object, jlong bodyId, jobject force, jobject location) { (JNIEnv *env, jobject object, jlong bodyId, jobject force, jobject location) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -652,7 +652,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyTorqueImpulse JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyTorqueImpulse
(JNIEnv *env, jobject object, jlong bodyId, jobject force) { (JNIEnv *env, jobject object, jlong bodyId, jobject force) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -670,7 +670,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_clearForces JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_clearForces
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -686,13 +686,13 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setCollisionShape JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setCollisionShape
(JNIEnv *env, jobject object, jlong bodyId, jlong shapeId) { (JNIEnv *env, jobject object, jlong bodyId, jlong shapeId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
return; return;
} }
btCollisionShape* shape = (btCollisionShape*) shapeId; btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
body->setCollisionShape(shape); body->setCollisionShape(shape);
} }
@ -703,7 +703,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_activate JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_activate
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -719,7 +719,7 @@ extern "C" {
*/ */
JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_isActive JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_isActive
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -735,7 +735,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setSleepingThresholds JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setSleepingThresholds
(JNIEnv *env, jobject object, jlong bodyId, jfloat linear, jfloat angular) { (JNIEnv *env, jobject object, jlong bodyId, jfloat linear, jfloat angular) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -751,7 +751,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setLinearSleepingThreshold JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setLinearSleepingThreshold
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) { (JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -767,7 +767,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularSleepingThreshold JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularSleepingThreshold
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) { (JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -783,7 +783,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearSleepingThreshold JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearSleepingThreshold
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -799,7 +799,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularSleepingThreshold JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularSleepingThreshold
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -815,7 +815,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularFactor JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularFactor
(JNIEnv *env, jobject object, jlong bodyId) { (JNIEnv *env, jobject object, jlong bodyId) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -831,7 +831,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularFactor JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularFactor
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) { (JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
btRigidBody* body = (btRigidBody*) bodyId; btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -50,7 +50,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_updateWheelTransform JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_updateWheelTransform
(JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jboolean interpolated) { (JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jboolean interpolated) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -66,16 +66,16 @@ extern "C" {
*/ */
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_createVehicleRaycaster JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_createVehicleRaycaster
(JNIEnv *env, jobject object, jlong bodyId, jlong spaceId) { (JNIEnv *env, jobject object, jlong bodyId, jlong spaceId) {
//btRigidBody* body = (btRigidBody*) bodyId; //btRigidBody* body = reinterpret_cast<btRigidBody*> bodyId;
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
jmePhysicsSpace *space = (jmePhysicsSpace *)spaceId; jmePhysicsSpace *space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
if (space == NULL) { if (space == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
return 0; return 0;
} }
btDefaultVehicleRaycaster* caster = new btDefaultVehicleRaycaster(space->getDynamicsWorld()); btDefaultVehicleRaycaster* caster = new btDefaultVehicleRaycaster(space->getDynamicsWorld());
return (OBJ_PTR) caster; return reinterpret_cast<jlong>(caster);
} }
/* /*
@ -86,14 +86,14 @@ extern "C" {
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_createRaycastVehicle JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_createRaycastVehicle
(JNIEnv *env, jobject object, jlong objectId, jlong casterId) { (JNIEnv *env, jobject object, jlong objectId, jlong casterId) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
btRigidBody* body = (btRigidBody*) objectId; btRigidBody* body = reinterpret_cast<btRigidBody*>(objectId);
if (body == NULL) { if (body == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
return 0; return 0;
} }
body->setActivationState(DISABLE_DEACTIVATION); body->setActivationState(DISABLE_DEACTIVATION);
btVehicleRaycaster* caster = (btDefaultVehicleRaycaster*) casterId; btVehicleRaycaster* caster = reinterpret_cast<btDefaultVehicleRaycaster*>(casterId);
if (caster == NULL) { if (caster == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -101,7 +101,7 @@ extern "C" {
} }
btRaycastVehicle::btVehicleTuning tuning; btRaycastVehicle::btVehicleTuning tuning;
btRaycastVehicle* vehicle = new btRaycastVehicle(tuning, body, caster); btRaycastVehicle* vehicle = new btRaycastVehicle(tuning, body, caster);
return (OBJ_PTR) vehicle; return reinterpret_cast<jlong>(vehicle);
} }
@ -112,7 +112,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_setCoordinateSystem JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_setCoordinateSystem
(JNIEnv *env, jobject object, jlong vehicleId, jint right, jint up, jint forward) { (JNIEnv *env, jobject object, jlong vehicleId, jint right, jint up, jint forward) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -128,7 +128,7 @@ extern "C" {
*/ */
JNIEXPORT jint JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_addWheel JNIEXPORT jint JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_addWheel
(JNIEnv *env, jobject object, jlong vehicleId, jobject location, jobject direction, jobject axle, jfloat restLength, jfloat radius, jobject tuning, jboolean frontWheel) { (JNIEnv *env, jobject object, jlong vehicleId, jobject location, jobject direction, jobject axle, jfloat restLength, jfloat radius, jobject tuning, jboolean frontWheel) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -153,7 +153,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_resetSuspension JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_resetSuspension
(JNIEnv *env, jobject object, jlong vehicleId) { (JNIEnv *env, jobject object, jlong vehicleId) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -169,7 +169,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_applyEngineForce JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_applyEngineForce
(JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jfloat force) { (JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jfloat force) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -185,7 +185,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_steer JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_steer
(JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jfloat value) { (JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jfloat value) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -201,7 +201,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_brake JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_brake
(JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jfloat value) { (JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jfloat value) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -217,7 +217,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_getCurrentVehicleSpeedKmHour JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_getCurrentVehicleSpeedKmHour
(JNIEnv *env, jobject object, jlong vehicleId) { (JNIEnv *env, jobject object, jlong vehicleId) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -233,7 +233,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_getForwardVector JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_getForwardVector
(JNIEnv *env, jobject object, jlong vehicleId, jobject out) { (JNIEnv *env, jobject object, jlong vehicleId, jobject out) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -250,8 +250,8 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_finalizeNative JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_finalizeNative
(JNIEnv *env, jobject object, jlong casterId, jlong vehicleId) { (JNIEnv *env, jobject object, jlong casterId, jlong vehicleId) {
btVehicleRaycaster* rayCaster = (btVehicleRaycaster*) casterId; btVehicleRaycaster* rayCaster = reinterpret_cast<btVehicleRaycaster*>(casterId);
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -48,7 +48,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getWheelLocation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getWheelLocation
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) { (JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -64,7 +64,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getWheelRotation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getWheelRotation
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) { (JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -80,7 +80,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_applyInfo JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_applyInfo
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jfloat suspensionStiffness, jfloat wheelsDampingRelaxation, jfloat wheelsDampingCompression, jfloat frictionSlip, jfloat rollInfluence, jfloat maxSuspensionTravelCm, jfloat maxSuspensionForce, jfloat radius, jboolean frontWheel, jfloat restLength) { (JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jfloat suspensionStiffness, jfloat wheelsDampingRelaxation, jfloat wheelsDampingCompression, jfloat frictionSlip, jfloat rollInfluence, jfloat maxSuspensionTravelCm, jfloat maxSuspensionForce, jfloat radius, jboolean frontWheel, jfloat restLength) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
vehicle->getWheelInfo(wheelIndex).m_suspensionStiffness = suspensionStiffness; vehicle->getWheelInfo(wheelIndex).m_suspensionStiffness = suspensionStiffness;
vehicle->getWheelInfo(wheelIndex).m_wheelsDampingRelaxation = wheelsDampingRelaxation; vehicle->getWheelInfo(wheelIndex).m_wheelsDampingRelaxation = wheelsDampingRelaxation;
vehicle->getWheelInfo(wheelIndex).m_wheelsDampingCompression = wheelsDampingCompression; vehicle->getWheelInfo(wheelIndex).m_wheelsDampingCompression = wheelsDampingCompression;
@ -101,7 +101,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getCollisionLocation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getCollisionLocation
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) { (JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -117,7 +117,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getCollisionNormal JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getCollisionNormal
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) { (JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -133,7 +133,7 @@ extern "C" {
*/ */
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getSkidInfo JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getSkidInfo
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex) { (JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -144,7 +144,7 @@ extern "C" {
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_finalizeNative JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_finalizeNative
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex) { (JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex) {
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId; btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
if (vehicle == NULL) { if (vehicle == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -50,7 +50,7 @@ extern "C" {
(JNIEnv *env, jobject object) { (JNIEnv *env, jobject object) {
jmeClasses::initJavaClasses(env); jmeClasses::initJavaClasses(env);
jmeMotionState* motionState = new jmeMotionState(); jmeMotionState* motionState = new jmeMotionState();
return (OBJ_PTR) motionState; return reinterpret_cast<jlong>(motionState);
} }
/* /*
@ -60,7 +60,7 @@ extern "C" {
*/ */
JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_applyTransform JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_applyTransform
(JNIEnv *env, jobject object, jlong stateId, jobject location, jobject rotation) { (JNIEnv *env, jobject object, jlong stateId, jobject location, jobject rotation) {
jmeMotionState* motionState = (jmeMotionState*) stateId; jmeMotionState* motionState = reinterpret_cast<jmeMotionState*>(stateId);
if (motionState == NULL) { if (motionState == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -76,7 +76,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_getWorldLocation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_getWorldLocation
(JNIEnv *env, jobject object, jlong stateId, jobject value) { (JNIEnv *env, jobject object, jlong stateId, jobject value) {
jmeMotionState* motionState = (jmeMotionState*) stateId; jmeMotionState* motionState = reinterpret_cast<jmeMotionState*>(stateId);
if (motionState == NULL) { if (motionState == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -92,7 +92,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_getWorldRotation JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_getWorldRotation
(JNIEnv *env, jobject object, jlong stateId, jobject value) { (JNIEnv *env, jobject object, jlong stateId, jobject value) {
jmeMotionState* motionState = (jmeMotionState*) stateId; jmeMotionState* motionState = reinterpret_cast<jmeMotionState*>(stateId);
if (motionState == NULL) { if (motionState == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -108,7 +108,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_getWorldRotationQuat JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_getWorldRotationQuat
(JNIEnv *env, jobject object, jlong stateId, jobject value) { (JNIEnv *env, jobject object, jlong stateId, jobject value) {
jmeMotionState* motionState = (jmeMotionState*) stateId; jmeMotionState* motionState = reinterpret_cast<jmeMotionState*>(stateId);
if (motionState == NULL) { if (motionState == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");
@ -124,7 +124,7 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_finalizeNative JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_finalizeNative
(JNIEnv *env, jobject object, jlong stateId) { (JNIEnv *env, jobject object, jlong stateId) {
jmeMotionState* motionState = (jmeMotionState*) stateId; jmeMotionState* motionState = reinterpret_cast<jmeMotionState*>(stateId);
if (motionState == NULL) { if (motionState == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException"); jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The native object does not exist."); env->ThrowNew(newExc, "The native object does not exist.");

@ -88,16 +88,16 @@ extern "C" {
*/ */
JNIEXPORT void JNICALL Java_com_jme3_bullet_util_DebugShapeFactory_getVertices JNIEXPORT void JNICALL Java_com_jme3_bullet_util_DebugShapeFactory_getVertices
(JNIEnv *env, jclass clazz, jlong shapeId, jobject callback) { (JNIEnv *env, jclass clazz, jlong shapeId, jobject callback) {
btCollisionShape* shape = (btCollisionShape*) shapeId; btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
if (shape->isConcave()) { if (shape->isConcave()) {
btConcaveShape* concave = (btConcaveShape*) shape; btConcaveShape* concave = reinterpret_cast<btConcaveShape*>(shape);
DebugCallback* clb = new DebugCallback(env, callback); DebugCallback* clb = new DebugCallback(env, callback);
btVector3 min = btVector3(-1e30, -1e30, -1e30); btVector3 min = btVector3(-1e30, -1e30, -1e30);
btVector3 max = btVector3(1e30, 1e30, 1e30); btVector3 max = btVector3(1e30, 1e30, 1e30);
concave->processAllTriangles(clb, min, max); concave->processAllTriangles(clb, min, max);
delete(clb); delete(clb);
} else if (shape->isConvex()) { } else if (shape->isConvex()) {
btConvexShape* convexShape = (btConvexShape*) shape; btConvexShape* convexShape = reinterpret_cast<btConvexShape*>(shape);
// Check there is a hull shape to render // Check there is a hull shape to render
if (convexShape->getUserPointer() == NULL) { if (convexShape->getUserPointer() == NULL) {
// create a hull approximation // create a hull approximation

@ -51,7 +51,7 @@ extern "C" {
int* triangles = (int*) env->GetDirectBufferAddress(triangleIndexBase); int* triangles = (int*) env->GetDirectBufferAddress(triangleIndexBase);
float* vertices = (float*) env->GetDirectBufferAddress(vertexIndexBase); float* vertices = (float*) env->GetDirectBufferAddress(vertexIndexBase);
btTriangleIndexVertexArray* array = new btTriangleIndexVertexArray(numTriangles, triangles, triangleIndexStride, numVertices, vertices, vertexStride); btTriangleIndexVertexArray* array = new btTriangleIndexVertexArray(numTriangles, triangles, triangleIndexStride, numVertices, vertices, vertexStride);
return (OBJ_PTR) array; return reinterpret_cast<jlong>(array);
} }
#ifdef __cplusplus #ifdef __cplusplus

@ -34,14 +34,6 @@
#include "btBulletCollisionCommon.h" #include "btBulletCollisionCommon.h"
#include "LinearMath/btVector3.h" #include "LinearMath/btVector3.h"
#ifdef _WIN32
typedef jlong OBJ_PTR;
#elif _WIN64
typedef jlong OBJ_PTR;
#else
typedef jlong OBJ_PTR;
#endif
/** /**
* Author: Normen Hansen * Author: Normen Hansen
*/ */

Loading…
Cancel
Save