- add missing PhysicsCollisionEvent

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8396 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 5bfd3bd68c
commit 06f329611b
  1. 308
      engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionEvent.cpp
  2. 173
      engine/src/bullet/native/com_jme3_bullet_collision_PhysicsCollisionEvent.h

@ -0,0 +1,308 @@
#include "jmeBulletUtil.h"
#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h"
#include "com_jme3_bullet_collision_PhysicsCollisionEvent.h"
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getAppliedImpulse
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulse
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_appliedImpulse;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getAppliedImpulseLateral1
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral1
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_appliedImpulseLateral1;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getAppliedImpulseLateral2
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral2
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_appliedImpulseLateral2;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getCombinedFriction
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedFriction
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_combinedFriction;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getCombinedRestitution
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedRestitution
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_combinedRestitution;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getDistance1
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getDistance1
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_distance1;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getIndex0
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex0
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_index0;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getIndex1
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex1
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_index1;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getLateralFrictionDir1
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir1
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject lateralFrictionDir1) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return;
}
jmeBulletUtil::convert(env, &mp -> m_lateralFrictionDir1, lateralFrictionDir1);
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getLateralFrictionDir2
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir2
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject lateralFrictionDir2) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return;
}
jmeBulletUtil::convert(env, &mp -> m_lateralFrictionDir2, lateralFrictionDir2);
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: isLateralFrictionInitialized
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_isLateralFrictionInitialized
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_lateralFrictionInitialized;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getLifeTime
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLifeTime
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_lifeTime;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getLocalPointA
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointA
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject localPointA) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return;
}
jmeBulletUtil::convert(env, &mp -> m_localPointA, localPointA);
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getLocalPointB
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointB
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject localPointB) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return;
}
jmeBulletUtil::convert(env, &mp -> m_localPointB, localPointB);
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getNormalWorldOnB
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getNormalWorldOnB
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject normalWorldOnB) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return;
}
jmeBulletUtil::convert(env, &mp -> m_normalWorldOnB, normalWorldOnB);
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getPartId0
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId0
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_partId0;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getPartId1
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId1
(JNIEnv * env, jobject object, jlong manifoldPointObjectId) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return 0;
}
return mp -> m_partId1;
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getPositionWorldOnA
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnA
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject positionWorldOnA) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return;
}
jmeBulletUtil::convert(env, &mp -> m_positionWorldOnA, positionWorldOnA);
}
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getPositionWorldOnB
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnB
(JNIEnv * env, jobject object, jlong manifoldPointObjectId, jobject positionWorldOnB) {
btManifoldPoint* mp = (btManifoldPoint*) manifoldPointObjectId;
if (mp == NULL) {
jclass newExc = env->FindClass("java/lang/NullPointerException");
env->ThrowNew(newExc, "The manifoldPoint does not exist.");
return;
}
jmeBulletUtil::convert(env, &mp -> m_positionWorldOnB, positionWorldOnB);
}

@ -0,0 +1,173 @@
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_jme3_bullet_collision_PhysicsCollisionEvent */
#ifndef _Included_com_jme3_bullet_collision_PhysicsCollisionEvent
#define _Included_com_jme3_bullet_collision_PhysicsCollisionEvent
#ifdef __cplusplus
extern "C" {
#endif
#undef com_jme3_bullet_collision_PhysicsCollisionEvent_serialVersionUID
#define com_jme3_bullet_collision_PhysicsCollisionEvent_serialVersionUID 5516075349620653480LL
#undef com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_ADDED
#define com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_ADDED 0L
#undef com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_PROCESSED
#define com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_PROCESSED 1L
#undef com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_DESTROYED
#define com_jme3_bullet_collision_PhysicsCollisionEvent_TYPE_DESTROYED 2L
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getAppliedImpulse
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulse
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getAppliedImpulseLateral1
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral1
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getAppliedImpulseLateral2
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getAppliedImpulseLateral2
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getCombinedFriction
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedFriction
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getCombinedRestitution
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getCombinedRestitution
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getDistance1
* Signature: (J)F
*/
JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getDistance1
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getIndex0
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex0
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getIndex1
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getIndex1
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getLateralFrictionDir1
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir1
(JNIEnv *, jobject, jlong, jobject);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getLateralFrictionDir2
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLateralFrictionDir2
(JNIEnv *, jobject, jlong, jobject);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: isLateralFrictionInitialized
* Signature: (J)Z
*/
JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_isLateralFrictionInitialized
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getLifeTime
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLifeTime
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getLocalPointA
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointA
(JNIEnv *, jobject, jlong, jobject);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getLocalPointB
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getLocalPointB
(JNIEnv *, jobject, jlong, jobject);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getNormalWorldOnB
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getNormalWorldOnB
(JNIEnv *, jobject, jlong, jobject);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getPartId0
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId0
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getPartId1
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPartId1
(JNIEnv *, jobject, jlong);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getPositionWorldOnA
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnA
(JNIEnv *, jobject, jlong, jobject);
/*
* Class: com_jme3_bullet_collision_PhysicsCollisionEvent
* Method: getPositionWorldOnB
* Signature: (JLcom/jme3/math/Vector3f;)V
*/
JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionEvent_getPositionWorldOnB
(JNIEnv *, jobject, jlong, jobject);
#ifdef __cplusplus
}
#endif
#endif
Loading…
Cancel
Save