- 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
This commit is contained in:
parent
6ce4cc012e
commit
b768d45016
@ -55,7 +55,7 @@ extern "C" {
|
||||
return 0;
|
||||
}
|
||||
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
|
||||
(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) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -81,8 +81,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCollisionObject
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btCollisionObject* collisionObject = (btCollisionObject*) objectId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -106,8 +106,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCollisionObject
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btCollisionObject* collisionObject = (btCollisionObject*) objectId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -130,8 +130,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addRigidBody
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong rigidBodyId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btRigidBody* collisionObject = (btRigidBody*) rigidBodyId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btRigidBody* collisionObject = reinterpret_cast<btRigidBody*>(rigidBodyId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -154,8 +154,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeRigidBody
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong rigidBodyId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btRigidBody* collisionObject = (btRigidBody*) rigidBodyId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btRigidBody* collisionObject = reinterpret_cast<btRigidBody*>(rigidBodyId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -178,8 +178,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCharacterObject
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btCollisionObject* collisionObject = (btCollisionObject*) objectId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -205,8 +205,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCharacterObject
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btCollisionObject* collisionObject = (btCollisionObject*) objectId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -229,8 +229,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addAction
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btActionInterface* actionObject = (btActionInterface*) objectId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btActionInterface* actionObject = reinterpret_cast<btActionInterface*>(objectId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -251,8 +251,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeAction
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btActionInterface* actionObject = (btActionInterface*) objectId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btActionInterface* actionObject = reinterpret_cast<btActionInterface*>(objectId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -273,8 +273,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addVehicle
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btActionInterface* actionObject = (btActionInterface*) objectId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btActionInterface* actionObject = reinterpret_cast<btActionInterface*>(objectId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -295,8 +295,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeVehicle
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btActionInterface* actionObject = (btActionInterface*) objectId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btActionInterface* actionObject = reinterpret_cast<btActionInterface*>(objectId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -317,8 +317,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addConstraint
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btTypedConstraint* constraint = (btTypedConstraint*) objectId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btTypedConstraint* constraint = reinterpret_cast<btTypedConstraint*>(objectId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -339,8 +339,8 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeConstraint
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
btTypedConstraint* constraint = (btTypedConstraint*) objectId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
btTypedConstraint* constraint = reinterpret_cast<btTypedConstraint*>(objectId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -361,7 +361,7 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_setGravity
|
||||
(JNIEnv * env, jobject object, jlong spaceId, jobject vector) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The physics space does not exist.");
|
||||
@ -389,7 +389,7 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_finalizeNative
|
||||
(JNIEnv * env, jobject object, jlong spaceId) {
|
||||
jmePhysicsSpace* space = (jmePhysicsSpace*) spaceId;
|
||||
jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
if (space == NULL) {
|
||||
return;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulse
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject lateralFrictionDir1) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject lateralFrictionDir2) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject localPointA) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject localPointB) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject normalWorldOnB) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject positionWorldOnA) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject positionWorldOnB) {
|
||||
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
|
||||
btManifoldPoint* mp = reinterpret_cast<btManifoldPoint*>(manifoldPointObjectId);
|
||||
if (mp == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
|
||||
|
@ -49,13 +49,13 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_attachCollisionShape
|
||||
(JNIEnv * env, jobject object, jlong objectId, jlong shapeId) {
|
||||
btCollisionObject* collisionObject = (btCollisionObject*) objectId;
|
||||
btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
|
||||
if (collisionObject == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/IllegalStateException");
|
||||
env->ThrowNew(newExc, "The collision object does not exist.");
|
||||
return;
|
||||
}
|
||||
btCollisionShape* collisionShape = (btCollisionShape*) shapeId;
|
||||
btCollisionShape* collisionShape = reinterpret_cast<btCollisionShape*>(shapeId);
|
||||
if (collisionShape == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/IllegalStateException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong objectId) {
|
||||
btCollisionObject* collisionObject = (btCollisionObject*) objectId;
|
||||
btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
|
||||
if (collisionObject == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jint group, jint groups) {
|
||||
btCollisionObject* collisionObject = (btCollisionObject*) objectId;
|
||||
btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
|
||||
if (collisionObject == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jint group) {
|
||||
btCollisionObject* collisionObject = (btCollisionObject*) objectId;
|
||||
btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
|
||||
if (collisionObject == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jint groups) {
|
||||
btCollisionObject* collisionObject = (btCollisionObject*) objectId;
|
||||
btCollisionObject* collisionObject = reinterpret_cast<btCollisionObject*>(objectId);
|
||||
if (collisionObject == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
||||
btVector3 extents = btVector3();
|
||||
jmeBulletUtil::convert(env, halfExtents, &extents);
|
||||
btBoxShape* shape = new btBoxShape(extents);
|
||||
return (OBJ_PTR)shape;
|
||||
return reinterpret_cast<jlong>(shape);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -60,7 +60,7 @@ extern "C" {
|
||||
shape = new btCapsuleShapeZ(radius, height);
|
||||
break;
|
||||
}
|
||||
return (OBJ_PTR) shape;
|
||||
return reinterpret_cast<jlong>(shape);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -47,7 +47,7 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_getMargin
|
||||
(JNIEnv * env, jobject object, jlong shapeId) {
|
||||
btCollisionShape* shape = (btCollisionShape*) shapeId;
|
||||
btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
|
||||
if (shape == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong shapeId, jobject scale) {
|
||||
btCollisionShape* shape = (btCollisionShape*) shapeId;
|
||||
btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
|
||||
if (shape == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong shapeId, jfloat newMargin) {
|
||||
btCollisionShape* shape = (btCollisionShape*) shapeId;
|
||||
btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
|
||||
if (shape == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong shapeId) {
|
||||
btCollisionShape* shape = (btCollisionShape*) shapeId;
|
||||
btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
|
||||
if (shape == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
|
@ -49,7 +49,7 @@ extern "C" {
|
||||
(JNIEnv *env, jobject object) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
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
|
||||
(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) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
return 0;
|
||||
}
|
||||
btCollisionShape* child = (btCollisionShape*) childId;
|
||||
btCollisionShape* child = reinterpret_cast<btCollisionShape*>(childId);
|
||||
if (shape == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong compoundId, jlong childId) {
|
||||
btCompoundShape* shape = (btCompoundShape*) compoundId;
|
||||
btCompoundShape* shape = reinterpret_cast<btCompoundShape*>(compoundId);
|
||||
if (shape == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
return 0;
|
||||
}
|
||||
btCollisionShape* child = (btCollisionShape*) childId;
|
||||
btCollisionShape* child = reinterpret_cast<btCollisionShape*>(childId);
|
||||
if (shape == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
|
@ -60,7 +60,7 @@ extern "C" {
|
||||
shape = new btConeShapeZ(radius, height);
|
||||
break;
|
||||
}
|
||||
return (OBJ_PTR) shape;
|
||||
return reinterpret_cast<jlong>(shape);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -62,7 +62,7 @@ extern "C" {
|
||||
shape = new btCylinderShapeZ(extents);
|
||||
break;
|
||||
}
|
||||
return (OBJ_PTR) shape;
|
||||
return reinterpret_cast<jlong>(shape);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -49,9 +49,9 @@ extern "C" {
|
||||
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_GImpactCollisionShape_createShape
|
||||
(JNIEnv * env, jobject object, jlong meshId) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
btTriangleIndexVertexArray* array = (btTriangleIndexVertexArray*) meshId;
|
||||
btTriangleIndexVertexArray* array = reinterpret_cast<btTriangleIndexVertexArray*>(meshId);
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong meshId) {
|
||||
btTriangleIndexVertexArray* array = (btTriangleIndexVertexArray*) meshId;
|
||||
btTriangleIndexVertexArray* array = reinterpret_cast<btTriangleIndexVertexArray*> (meshId);
|
||||
delete(array);
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
void* data = env->GetDirectBufferAddress(heightfieldData);
|
||||
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
|
||||
|
@ -61,7 +61,7 @@ extern "C" {
|
||||
shape->addPoint(vect);
|
||||
}
|
||||
|
||||
return (OBJ_PTR) shape;
|
||||
return reinterpret_cast<jlong>(shape);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -49,9 +49,9 @@ extern "C" {
|
||||
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_createShape
|
||||
(JNIEnv * env, jobject object, jlong arrayId) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
btTriangleIndexVertexArray* array = (btTriangleIndexVertexArray*) arrayId;
|
||||
btTriangleIndexVertexArray* array = reinterpret_cast<btTriangleIndexVertexArray*>(arrayId);
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong arrayId){
|
||||
btTriangleIndexVertexArray* array = (btTriangleIndexVertexArray*) arrayId;
|
||||
btTriangleIndexVertexArray* array = reinterpret_cast<btTriangleIndexVertexArray*>(arrayId);
|
||||
delete(array);
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ extern "C" {
|
||||
btVector3 norm = btVector3();
|
||||
jmeBulletUtil::convert(env, normal, &norm);
|
||||
btStaticPlaneShape* shape = new btStaticPlaneShape(norm, constant);
|
||||
return (OBJ_PTR)shape;
|
||||
return reinterpret_cast<jlong>(shape);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
||||
btVector3 vec1 = btVector3();
|
||||
jmeBulletUtil::convert(env, vector1, &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();
|
||||
jmeBulletUtil::convert(env, vector2, &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
|
||||
@ -84,7 +84,7 @@ extern "C" {
|
||||
btVector3 vec3 = btVector3();
|
||||
jmeBulletUtil::convert(env, vector3, &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
|
||||
@ -103,7 +103,7 @@ extern "C" {
|
||||
btVector3 vec4 = btVector3();
|
||||
jmeBulletUtil::convert(env, vector4, &vec4);
|
||||
btBU_Simplex1to4* simplexShape = new btBU_Simplex1to4(vec1, vec2, vec3, vec4);
|
||||
return (OBJ_PTR) simplexShape;
|
||||
return reinterpret_cast<jlong>(simplexShape);
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ extern "C" {
|
||||
(JNIEnv *env, jobject object, jfloat radius) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
btSphereShape* shape=new btSphereShape(radius);
|
||||
return (OBJ_PTR)shape;
|
||||
return reinterpret_cast<jlong>(shape);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -47,7 +47,7 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_ConeJoint_setLimit
|
||||
(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) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jboolean angularOnly) {
|
||||
btConeTwistConstraint* joint = (btConeTwistConstraint*) jointId;
|
||||
btConeTwistConstraint* joint = reinterpret_cast<btConeTwistConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
btRigidBody* bodyA = (btRigidBody*) bodyIdA;
|
||||
btRigidBody* bodyB = (btRigidBody*) bodyIdB;
|
||||
btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
|
||||
btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
|
||||
btMatrix3x3 mtx1 = btMatrix3x3();
|
||||
btMatrix3x3 mtx2 = btMatrix3x3();
|
||||
btTransform transA = btTransform(mtx1);
|
||||
@ -92,7 +92,7 @@ extern "C" {
|
||||
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
|
||||
jmeBulletUtil::convert(env, rotB, &transB.getBasis());
|
||||
btConeTwistConstraint* joint = new btConeTwistConstraint(*bodyA, *bodyB, transA, transB);
|
||||
return (OBJ_PTR) joint;
|
||||
return reinterpret_cast<jlong>(joint);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -47,7 +47,7 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_enableMotor
|
||||
(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) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btHingeConstraint* joint = (btHingeConstraint*) jointId;
|
||||
btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btHingeConstraint* joint = (btHingeConstraint*) jointId;
|
||||
btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btHingeConstraint* joint = (btHingeConstraint*) jointId;
|
||||
btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat low, jfloat high) {
|
||||
btHingeConstraint* joint = (btHingeConstraint*) jointId;
|
||||
btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(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) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btHingeConstraint* joint = (btHingeConstraint*) jointId;
|
||||
btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btHingeConstraint* joint = (btHingeConstraint*) jointId;
|
||||
btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jboolean angular) {
|
||||
btHingeConstraint* joint = (btHingeConstraint*) jointId;
|
||||
btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btHingeConstraint* joint = (btHingeConstraint*) jointId;
|
||||
btHingeConstraint* joint = reinterpret_cast<btHingeConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject axisA, jobject pivotB, jobject axisB) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
btRigidBody* bodyA = (btRigidBody*) bodyIdA;
|
||||
btRigidBody* bodyB = (btRigidBody*) bodyIdB;
|
||||
btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
|
||||
btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
|
||||
btVector3 vec1 = btVector3();
|
||||
btVector3 vec2 = btVector3();
|
||||
btVector3 vec3 = btVector3();
|
||||
@ -219,7 +219,7 @@ extern "C" {
|
||||
jmeBulletUtil::convert(env, axisA, &vec3);
|
||||
jmeBulletUtil::convert(env, axisB, &vec4);
|
||||
btHingeConstraint* joint = new btHingeConstraint(*bodyA, *bodyB, vec1, vec2, vec3, vec4);
|
||||
return (OBJ_PTR) joint;
|
||||
return reinterpret_cast<jlong>(joint);
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_PhysicsJoint_getAppliedImpulse
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btTypedConstraint* joint = (btTypedConstraint*) jointId;
|
||||
btTypedConstraint* joint = reinterpret_cast<btTypedConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat damping) {
|
||||
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId;
|
||||
btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat clamp) {
|
||||
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId;
|
||||
btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat tau) {
|
||||
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId;
|
||||
btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId;
|
||||
btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId;
|
||||
btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btPoint2PointConstraint* joint = (btPoint2PointConstraint*) jointId;
|
||||
btPoint2PointConstraint* joint = reinterpret_cast<btPoint2PointConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject pivotB) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
btRigidBody* bodyA = (btRigidBody*) bodyIdA;
|
||||
btRigidBody* bodyB = (btRigidBody*) bodyIdB;
|
||||
btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
|
||||
btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
|
||||
//TODO: matrix not needed?
|
||||
btMatrix3x3 mtx1 = btMatrix3x3();
|
||||
btMatrix3x3 mtx2 = btMatrix3x3();
|
||||
@ -154,7 +154,7 @@ extern "C" {
|
||||
btTransform transB = btTransform(mtx2);
|
||||
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
|
||||
btHingeConstraint* joint = new btHingeConstraint(*bodyA, *bodyB, transA, transB);
|
||||
return (OBJ_PTR) joint;
|
||||
return reinterpret_cast<jlong>(joint);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -47,13 +47,13 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getRotationalLimitMotor
|
||||
(JNIEnv * env, jobject object, jlong jointId, jint index) {
|
||||
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId;
|
||||
btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId;
|
||||
btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jobject vector) {
|
||||
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId;
|
||||
btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jobject vector) {
|
||||
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId;
|
||||
btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jobject vector) {
|
||||
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId;
|
||||
btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jobject vector) {
|
||||
btGeneric6DofConstraint* joint = (btGeneric6DofConstraint*) jointId;
|
||||
btGeneric6DofConstraint* joint = reinterpret_cast<btGeneric6DofConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
btRigidBody* bodyA = (btRigidBody*) bodyIdA;
|
||||
btRigidBody* bodyB = (btRigidBody*) bodyIdB;
|
||||
btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
|
||||
btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
|
||||
btMatrix3x3 mtx1 = btMatrix3x3();
|
||||
btMatrix3x3 mtx2 = btMatrix3x3();
|
||||
btTransform transA = btTransform(mtx1);
|
||||
@ -163,7 +163,7 @@ extern "C" {
|
||||
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
|
||||
jmeBulletUtil::convert(env, rotB, &transB.getBasis());
|
||||
btGeneric6DofConstraint* joint = new btGeneric6DofConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA);
|
||||
return (OBJ_PTR) joint;
|
||||
return reinterpret_cast<jlong>(joint);
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_enableSpring
|
||||
(JNIEnv *env, jobject object, jlong jointId, jint index, jboolean onOff) {
|
||||
btGeneric6DofSpringConstraint* joint = (btGeneric6DofSpringConstraint*) jointId;
|
||||
btGeneric6DofSpringConstraint* joint = reinterpret_cast<btGeneric6DofSpringConstraint*>(jointId);
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong jointId, jint index, jfloat stiffness) {
|
||||
btGeneric6DofSpringConstraint* joint = (btGeneric6DofSpringConstraint*) jointId;
|
||||
btGeneric6DofSpringConstraint* joint = reinterpret_cast<btGeneric6DofSpringConstraint*>(jointId);
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong jointId, jint index, jfloat damping) {
|
||||
btGeneric6DofSpringConstraint* joint = (btGeneric6DofSpringConstraint*) jointId;
|
||||
btGeneric6DofSpringConstraint* joint = reinterpret_cast<btGeneric6DofSpringConstraint*>(jointId);
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong jointId) {
|
||||
btGeneric6DofSpringConstraint* joint = (btGeneric6DofSpringConstraint*) jointId;
|
||||
btGeneric6DofSpringConstraint* joint = reinterpret_cast<btGeneric6DofSpringConstraint*>(jointId);
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong jointId, jint index) {
|
||||
btGeneric6DofSpringConstraint* joint = (btGeneric6DofSpringConstraint*) jointId;
|
||||
btGeneric6DofSpringConstraint* joint = reinterpret_cast<btGeneric6DofSpringConstraint*>(jointId);
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
btRigidBody* bodyA = (btRigidBody*) bodyIdA;
|
||||
btRigidBody* bodyB = (btRigidBody*) bodyIdB;
|
||||
btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
|
||||
btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
|
||||
btTransform transA;
|
||||
jmeBulletUtil::convert(env, pivotA, &transA.getOrigin());
|
||||
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());
|
||||
|
||||
btGeneric6DofSpringConstraint* joint = new btGeneric6DofSpringConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA);
|
||||
return (OBJ_PTR)joint;
|
||||
return reinterpret_cast<jlong>(joint);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -47,7 +47,7 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getLowerLinLimit
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jboolean value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jboolean value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong jointId, jfloat value) {
|
||||
btSliderConstraint* joint = (btSliderConstraint*) jointId;
|
||||
btSliderConstraint* joint = reinterpret_cast<btSliderConstraint*>(jointId);
|
||||
if (joint == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv * env, jobject object, jlong bodyIdA, jlong bodyIdB, jobject pivotA, jobject rotA, jobject pivotB, jobject rotB, jboolean useLinearReferenceFrameA) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
btRigidBody* bodyA = (btRigidBody*) bodyIdA;
|
||||
btRigidBody* bodyB = (btRigidBody*) bodyIdB;
|
||||
btRigidBody* bodyA = reinterpret_cast<btRigidBody*>(bodyIdA);
|
||||
btRigidBody* bodyB = reinterpret_cast<btRigidBody*>(bodyIdB);
|
||||
btMatrix3x3 mtx1 = btMatrix3x3();
|
||||
btMatrix3x3 mtx2 = btMatrix3x3();
|
||||
btTransform transA = btTransform(mtx1);
|
||||
@ -955,7 +955,7 @@ extern "C" {
|
||||
jmeBulletUtil::convert(env, pivotB, &transB.getOrigin());
|
||||
jmeBulletUtil::convert(env, rotB, &transB.getBasis());
|
||||
btSliderConstraint* joint = new btSliderConstraint(*bodyA, *bodyB, transA, transB, useLinearReferenceFrameA);
|
||||
return (OBJ_PTR) joint;
|
||||
return reinterpret_cast<jlong>(joint);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -47,7 +47,7 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getLoLimit
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jboolean value) {
|
||||
btRotationalLimitMotor* motor = (btRotationalLimitMotor*) motorId;
|
||||
btRotationalLimitMotor* motor = reinterpret_cast<btRotationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jobject vector) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jobject vector) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jobject vector) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jobject vector) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jobject vector) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jobject vector) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong motorId, jfloat value) {
|
||||
btTranslationalLimitMotor* motor = (btTranslationalLimitMotor*) motorId;
|
||||
btTranslationalLimitMotor* motor = reinterpret_cast<btTranslationalLimitMotor*>(motorId);
|
||||
if (motor == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
|
@ -52,7 +52,7 @@ extern "C" {
|
||||
(JNIEnv * env, jobject object) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong ghostId) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) ghostId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(ghostId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jlong shapeId, jfloat stepHeight) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
return 0;
|
||||
}
|
||||
//TODO: check convexshape!
|
||||
btConvexShape* shape = (btConvexShape*) shapeId;
|
||||
btConvexShape* shape = reinterpret_cast<btConvexShape*>(shapeId);
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jobject vector) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jobject vector) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jint value) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jfloat value) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jfloat value) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jfloat value) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jfloat value) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jobject value) {
|
||||
btGhostObject* ghost = (btGhostObject*) objectId;
|
||||
btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jfloat value) {
|
||||
btGhostObject* ghost = (btGhostObject*) objectId;
|
||||
btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jfloat value) {
|
||||
btGhostObject* ghost = (btGhostObject*) objectId;
|
||||
btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btGhostObject* ghost = (btGhostObject*) objectId;
|
||||
btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btGhostObject* ghost = (btGhostObject*) objectId;
|
||||
btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btGhostObject* ghost = (btGhostObject*) objectId;
|
||||
btGhostObject* ghost = reinterpret_cast<btGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btKinematicCharacterController* character = (btKinematicCharacterController*) objectId;
|
||||
btKinematicCharacterController* character = reinterpret_cast<btKinematicCharacterController*>(objectId);
|
||||
if (character == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
|
@ -54,7 +54,7 @@ extern "C" {
|
||||
(JNIEnv * env, jobject object) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jobject value) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jobject value) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jobject value) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jobject value) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jobject value) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jobject value) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jfloat value) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jfloat value) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId) {
|
||||
btPairCachingGhostObject* ghost = (btPairCachingGhostObject*) objectId;
|
||||
btPairCachingGhostObject* ghost = reinterpret_cast<btPairCachingGhostObject*>(objectId);
|
||||
if (ghost == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jfloat mass, jlong motionstatId, jlong shapeId) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
btMotionState* motionState = (btMotionState*) motionstatId;
|
||||
btCollisionShape* shape = (btCollisionShape*) shapeId;
|
||||
btMotionState* motionState = reinterpret_cast<btMotionState*>(motionstatId);
|
||||
btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
|
||||
btVector3 localInertia = btVector3();
|
||||
shape->calculateLocalInertia(mass, localInertia);
|
||||
btRigidBody* body = new btRigidBody(mass, motionState, shape, localInertia);
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jboolean value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jboolean value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jlong shapeId, jfloat mass) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
return 0;
|
||||
}
|
||||
btCollisionShape* shape = (btCollisionShape*) shapeId;
|
||||
btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
|
||||
btVector3 localInertia = btVector3();
|
||||
shape->calculateLocalInertia(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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jfloat value1, jfloat value2) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject force, jobject location) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject force) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject force) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject force, jobject location) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jobject force) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jlong shapeId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
return;
|
||||
}
|
||||
btCollisionShape* shape = (btCollisionShape*) shapeId;
|
||||
btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
|
||||
body->setCollisionShape(shape);
|
||||
}
|
||||
|
||||
@ -703,7 +703,7 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_activate
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jfloat linear, jfloat angular) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jfloat value) {
|
||||
btRigidBody* body = (btRigidBody*) bodyId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(bodyId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jboolean interpolated) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong bodyId, jlong spaceId) {
|
||||
//btRigidBody* body = (btRigidBody*) bodyId;
|
||||
//btRigidBody* body = reinterpret_cast<btRigidBody*> bodyId;
|
||||
jmeClasses::initJavaClasses(env);
|
||||
jmePhysicsSpace *space = (jmePhysicsSpace *)spaceId;
|
||||
jmePhysicsSpace *space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
|
||||
if (space == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
return 0;
|
||||
}
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong objectId, jlong casterId) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
btRigidBody* body = (btRigidBody*) objectId;
|
||||
btRigidBody* body = reinterpret_cast<btRigidBody*>(objectId);
|
||||
if (body == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
return 0;
|
||||
}
|
||||
body->setActivationState(DISABLE_DEACTIVATION);
|
||||
btVehicleRaycaster* caster = (btDefaultVehicleRaycaster*) casterId;
|
||||
btVehicleRaycaster* caster = reinterpret_cast<btDefaultVehicleRaycaster*>(casterId);
|
||||
if (caster == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
@ -101,7 +101,7 @@ extern "C" {
|
||||
}
|
||||
btRaycastVehicle::btVehicleTuning tuning;
|
||||
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
|
||||
(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) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(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) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jfloat force) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jfloat value) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId, jint wheel, jfloat value) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId, jobject out) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong casterId, jlong vehicleId) {
|
||||
btVehicleRaycaster* rayCaster = (btVehicleRaycaster*) casterId;
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btVehicleRaycaster* rayCaster = reinterpret_cast<btVehicleRaycaster*>(casterId);
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(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_wheelsDampingRelaxation = wheelsDampingRelaxation;
|
||||
vehicle->getWheelInfo(wheelIndex).m_wheelsDampingCompression = wheelsDampingCompression;
|
||||
@ -101,7 +101,7 @@ extern "C" {
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getCollisionLocation
|
||||
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex, jobject out) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex) {
|
||||
btRaycastVehicle* vehicle = (btRaycastVehicle*) vehicleId;
|
||||
btRaycastVehicle* vehicle = reinterpret_cast<btRaycastVehicle*>(vehicleId);
|
||||
if (vehicle == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
env->ThrowNew(newExc, "The native object does not exist.");
|
||||
|
@ -50,7 +50,7 @@ extern "C" {
|
||||
(JNIEnv *env, jobject object) {
|
||||
jmeClasses::initJavaClasses(env);
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong stateId, jobject location, jobject rotation) {
|
||||
jmeMotionState* motionState = (jmeMotionState*) stateId;
|
||||
jmeMotionState* motionState = reinterpret_cast<jmeMotionState*>(stateId);
|
||||
if (motionState == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong stateId, jobject value) {
|
||||
jmeMotionState* motionState = (jmeMotionState*) stateId;
|
||||
jmeMotionState* motionState = reinterpret_cast<jmeMotionState*>(stateId);
|
||||
if (motionState == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong stateId, jobject value) {
|
||||
jmeMotionState* motionState = (jmeMotionState*) stateId;
|
||||
jmeMotionState* motionState = reinterpret_cast<jmeMotionState*>(stateId);
|
||||
if (motionState == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong stateId, jobject value) {
|
||||
jmeMotionState* motionState = (jmeMotionState*) stateId;
|
||||
jmeMotionState* motionState = reinterpret_cast<jmeMotionState*>(stateId);
|
||||
if (motionState == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jobject object, jlong stateId) {
|
||||
jmeMotionState* motionState = (jmeMotionState*) stateId;
|
||||
jmeMotionState* motionState = reinterpret_cast<jmeMotionState*>(stateId);
|
||||
if (motionState == NULL) {
|
||||
jclass newExc = env->FindClass("java/lang/NullPointerException");
|
||||
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
|
||||
(JNIEnv *env, jclass clazz, jlong shapeId, jobject callback) {
|
||||
btCollisionShape* shape = (btCollisionShape*) shapeId;
|
||||
btCollisionShape* shape = reinterpret_cast<btCollisionShape*>(shapeId);
|
||||
if (shape->isConcave()) {
|
||||
btConcaveShape* concave = (btConcaveShape*) shape;
|
||||
btConcaveShape* concave = reinterpret_cast<btConcaveShape*>(shape);
|
||||
DebugCallback* clb = new DebugCallback(env, callback);
|
||||
btVector3 min = btVector3(-1e30, -1e30, -1e30);
|
||||
btVector3 max = btVector3(1e30, 1e30, 1e30);
|
||||
concave->processAllTriangles(clb, min, max);
|
||||
delete(clb);
|
||||
} else if (shape->isConvex()) {
|
||||
btConvexShape* convexShape = (btConvexShape*) shape;
|
||||
btConvexShape* convexShape = reinterpret_cast<btConvexShape*>(shape);
|
||||
// Check there is a hull shape to render
|
||||
if (convexShape->getUserPointer() == NULL) {
|
||||
// create a hull approximation
|
||||
|
@ -51,7 +51,7 @@ extern "C" {
|
||||
int* triangles = (int*) env->GetDirectBufferAddress(triangleIndexBase);
|
||||
float* vertices = (float*) env->GetDirectBufferAddress(vertexIndexBase);
|
||||
btTriangleIndexVertexArray* array = new btTriangleIndexVertexArray(numTriangles, triangles, triangleIndexStride, numVertices, vertices, vertexStride);
|
||||
return (OBJ_PTR) array;
|
||||
return reinterpret_cast<jlong>(array);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -34,14 +34,6 @@
|
||||
#include "btBulletCollisionCommon.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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user