소스 검색

Merge pull request #1 from jMonkeyEngine/master

merge
mitm001 6 년 전
부모
커밋
8a10738097
100개의 변경된 파일1658개의 추가작업 그리고 3904개의 파일을 삭제
  1. 3 3
      .gitignore
  2. 4 3
      .travis.yml
  3. 1 1
      CONTRIBUTING.md
  4. 1 1
      README.md
  5. 6 1
      appveyor.yml
  6. 9 12
      build.gradle
  7. 3 0
      common.gradle
  8. 7 6
      gradle.properties
  9. BIN
      gradle/wrapper/gradle-wrapper.jar
  10. 5 6
      gradle/wrapper/gradle-wrapper.properties
  11. 17 9
      gradlew
  12. 0 6
      gradlew.bat
  13. 1 1
      jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/MainActivity.java
  14. 1 1
      jme3-android/build.gradle
  15. 4 4
      jme3-android/src/main/java/com/jme3/input/android/AndroidSensorJoyInput.java
  16. 2 2
      jme3-android/src/main/java/com/jme3/system/android/OGLESContext.java
  17. 5 5
      jme3-blender/src/main/java/com/jme3/asset/BlenderKey.java
  18. 1 1
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/constraints/SimulationNode.java
  19. 7 7
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/curves/CurvesTemporalMesh.java
  20. 3 3
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/file/DnaBlockData.java
  21. 3 3
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/file/DynamicArray.java
  22. 3 3
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/file/Structure.java
  23. 23 13
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/materials/MaterialContext.java
  24. 9 9
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/math/Vector3d.java
  25. 20 17
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/meshes/MeshHelper.java
  26. 2 2
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/modifiers/SubdivisionSurfaceModifier.java
  27. 67 66
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/textures/ImageLoader.java
  28. 2 2
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/textures/ImageUtils.java
  29. 26 6
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/textures/TextureHelper.java
  30. 11 1
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/textures/blending/TextureBlenderAWT.java
  31. 2 1
      jme3-bullet-native-android/build.gradle
  32. BIN
      jme3-bullet-native-android/libs/arm64-v8a/libbulletjme.so
  33. BIN
      jme3-bullet-native-android/libs/armeabi-v7a/libbulletjme.so
  34. BIN
      jme3-bullet-native-android/libs/armeabi/libbulletjme.so
  35. BIN
      jme3-bullet-native-android/libs/mips/libbulletjme.so
  36. BIN
      jme3-bullet-native-android/libs/mips64/libbulletjme.so
  37. BIN
      jme3-bullet-native-android/libs/x86/libbulletjme.so
  38. BIN
      jme3-bullet-native-android/libs/x86_64/libbulletjme.so
  39. 13 2
      jme3-bullet-native-android/src/native/android/Android.mk
  40. 4 1
      jme3-bullet-native-android/src/native/android/Application.mk
  41. 28 2
      jme3-bullet-native/build.gradle
  42. BIN
      jme3-bullet-native/libs/native/linux/x86/libbulletjme.so
  43. BIN
      jme3-bullet-native/libs/native/linux/x86_64/libbulletjme.so
  44. BIN
      jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib
  45. BIN
      jme3-bullet-native/libs/native/osx/x86_64/libbulletjme.dylib
  46. BIN
      jme3-bullet-native/libs/native/windows/x86/bulletjme.dll
  47. BIN
      jme3-bullet-native/libs/native/windows/x86_64/bulletjme.dll
  48. 62 57
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace.cpp
  49. 0 187
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace.h
  50. 0 13
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace_BroadphaseType.h
  51. 0 173
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionEvent.h
  52. 37 1
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionObject.cpp
  53. 0 87
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionObject.h
  54. 0 21
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_BoxCollisionShape.h
  55. 0 21
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.h
  56. 0 45
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CollisionShape.h
  57. 0 37
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CompoundCollisionShape.h
  58. 0 21
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_ConeCollisionShape.h
  59. 0 21
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CylinderCollisionShape.h
  60. 0 29
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_GImpactCollisionShape.h
  61. 0 21
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.h
  62. 0 21
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_HullCollisionShape.h
  63. 0 45
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_MeshCollisionShape.h
  64. 0 21
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_PlaneCollisionShape.h
  65. 0 45
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_SimplexCollisionShape.h
  66. 0 21
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_SphereCollisionShape.h
  67. 0 37
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_ConeJoint.h
  68. 1 1
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_HingeJoint.cpp
  69. 0 101
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_HingeJoint.h
  70. 17 1
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_PhysicsJoint.cpp
  71. 0 29
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_PhysicsJoint.h
  72. 4 4
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_Point2PointJoint.cpp
  73. 0 69
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_Point2PointJoint.h
  74. 0 69
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofJoint.h
  75. 0 61
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofSpringJoint.h
  76. 0 469
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SliderJoint.h
  77. 0 173
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_RotationalLimitMotor.h
  78. 2 2
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_TranslationalLimitMotor.cpp
  79. 0 109
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_TranslationalLimitMotor.h
  80. 0 331
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsCharacter.h
  81. 0 167
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsGhostObject.h
  82. 2 2
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp
  83. 0 447
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h
  84. 0 143
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsVehicle.h
  85. 0 69
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_VehicleWheel.h
  86. 0 61
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_infos_RigidBodyMotionState.h
  87. 0 21
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_util_DebugShapeFactory.h
  88. 0 21
      jme3-bullet-native/src/native/cpp/com_jme3_bullet_util_NativeMeshUtil.h
  89. 236 35
      jme3-bullet/src/common/java/com/jme3/bullet/BulletAppState.java
  90. 15 8
      jme3-bullet/src/common/java/com/jme3/bullet/PhysicsTickListener.java
  91. 14 7
      jme3-bullet/src/common/java/com/jme3/bullet/collision/PhysicsCollisionGroupListener.java
  92. 14 6
      jme3-bullet/src/common/java/com/jme3/bullet/collision/PhysicsCollisionListener.java
  93. 12 1
      jme3-bullet/src/common/java/com/jme3/bullet/collision/RagdollCollisionListener.java
  94. 39 1
      jme3-bullet/src/common/java/com/jme3/bullet/collision/shapes/infos/ChildCollisionShape.java
  95. 146 43
      jme3-bullet/src/common/java/com/jme3/bullet/control/AbstractPhysicsControl.java
  96. 174 129
      jme3-bullet/src/common/java/com/jme3/bullet/control/BetterCharacterControl.java
  97. 28 28
      jme3-bullet/src/common/java/com/jme3/bullet/control/CharacterControl.java
  98. 155 28
      jme3-bullet/src/common/java/com/jme3/bullet/control/GhostControl.java
  99. 381 134
      jme3-bullet/src/common/java/com/jme3/bullet/control/KinematicRagdollControl.java
  100. 26 10
      jme3-bullet/src/common/java/com/jme3/bullet/control/PhysicsControl.java

+ 3 - 3
.gitignore

@@ -2,6 +2,7 @@
 **/.classpath
 **/.settings
 **/.project
+**/out/
 /.gradle/
 /.nb-gradle/
 /.idea/
@@ -21,10 +22,9 @@
 .DS_Store
 /jme3-core/src/main/resources/com/jme3/system/version.properties
 /jme3-*/build/
-/jme3-bullet-native/bullet.zip
 /jme3-bullet-native/bullet3.zip
-/jme3-bullet-native/bullet-2.82-r2704/
-/jme3-bullet-native/bullet3-2.83.7/
+/jme3-bullet-native/bullet3-2.87/
+/jme3-bullet-native/src/native/cpp/com_jme3_bullet_*.h
 /jme3-android-native/openal-soft/
 /jme3-android-native/OpenALSoft.zip
 /jme3-android-native/src/native/jme_decode/STBI/

+ 4 - 3
.travis.yml

@@ -1,11 +1,10 @@
 language: java
-sudo: false
-dist: precise
+sudo: true
 
 branches:
   only:
   - master
-  - v3.1
+  - v3.2
 
 matrix:
   include:
@@ -14,7 +13,9 @@ matrix:
     env: UPLOAD=true UPLOAD_NATIVE=true
   - os: linux
     jdk: openjdk7
+    dist: precise
   - os: osx
+    osx_image: xcode9.3
     env: UPLOAD_NATIVE=true
 
 addons:

+ 1 - 1
CONTRIBUTING.md

@@ -55,5 +55,5 @@ We generally abide by the standard Java Code Conventions. Besides that, just mak
 
 ## Documentation
 
-- How to edit the wiki - WIP
+- How to edit the [wiki](https://github.com/jMonkeyEngine/wiki).
 - How to edit JavaDocs - WIP

+ 1 - 1
README.md

@@ -3,7 +3,7 @@ jMonkeyEngine
 
 [![Build Status](https://travis-ci.org/jMonkeyEngine/jmonkeyengine.svg?branch=master)](https://travis-ci.org/jMonkeyEngine/jmonkeyengine)
 
-jMonkeyEngine is a 3D game engine for adventurous Java developers. It’s open-source, cross-platform, and cutting-edge. 3.1.0 is the latest stable version of the jMonkeyEngine 3 SDK, a complete game development suite. We'll release 3.1.x updates until the major 3.2 release arrives.
+jMonkeyEngine is a 3D game engine for adventurous Java developers. It’s open-source, cross-platform, and cutting-edge. 3.2.0 is the latest stable version of the jMonkeyEngine 3 SDK, a complete game development suite. We'll release 3.2.x updates until the major 3.3 release arrives.
 
 The engine is used by several commercial game studios and computer-science courses. Here's a taste:
 

+ 6 - 1
appveyor.yml

@@ -3,10 +3,13 @@ version: 1.0.{build}.{branch}
 branches:
   only:
   - master
+  - v3.2
 
 only_commits:
   files:
     - jme3-bullet-native/
+    - appveyor.yml
+    - gradle.properties
 
 skip_tags: true
 
@@ -34,13 +37,15 @@ build_script:
 cache:
 - C:\Users\appveyor\.gradle\caches
 - C:\Users\appveyor\.gradle\wrapper
-- jme3-bullet-native\bullet3.zip
+- jme3-bullet-native\bullet3.zip -> gradle.properties
 
 test: off
 deploy: off
 
 on_success:
 - cmd: >-
+    if not defined encrypted_f0a0b284e2e8_key appveyor exit
+
     openssl aes-256-cbc -K %encrypted_f0a0b284e2e8_key% -iv %encrypted_f0a0b284e2e8_iv% -in private\key.enc -out c:\users\appveyor\.ssh\id_rsa -d
 
     git config --global user.email "appveyor"

+ 9 - 12
build.gradle

@@ -1,10 +1,11 @@
 buildscript {
     repositories {
+        google()
         jcenter()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.1.0'
-        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.5'
+        classpath 'com.android.tools.build:gradle:3.1.4'
+        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
     }
 }
 
@@ -15,7 +16,7 @@ apply from: file('version.gradle')
 subprojects {
     if(!project.name.equals('jme3-android-examples')) {
         apply from: rootProject.file('common.gradle')
-        if (!['jme3-testdata', 'sdk'].contains(project.name)) {
+        if (!project.name.equals('jme3-testdata')) {
             apply from: rootProject.file('bintray.gradle')
         }
     } else {
@@ -66,9 +67,9 @@ task createZipDistribution(type:Zip,dependsOn:["dist","libDist"], description:"P
     archiveName "jME" + jmeFullVersion + ".zip"
     into("/") {
          from {"./dist"}
-    }            
+    }
     into("/sources") {
-        from {"$buildDir/libDist/sources"}     
+        from {"$buildDir/libDist/sources"}
     }
 }
 
@@ -88,14 +89,14 @@ task dist(dependsOn: [':jme3-examples:dist', 'mergedJavadoc']){
 task mergedJavadoc(type: Javadoc, description: 'Creates Javadoc from all the projects.') {
     title = 'jMonkeyEngine3'
     destinationDir = mkdir("dist/javadoc")
-    
+
     options.encoding = 'UTF-8'
 
     // Allows Javadoc to be generated on Java 8 despite doclint errors.
     if (JavaVersion.current().isJava8Compatible()) {
         options.addStringOption('Xdoclint:none', '-quiet')
     }
-    
+
     options.overview = file("javadoc-overview.html")
     // Note: The closures below are executed lazily.
     source subprojects.collect {project ->
@@ -115,10 +116,6 @@ task mergedSource(type: Copy){
 
 }
 
-task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper to the current directory.') {
-    gradleVersion = '3.2.1'
-}
-
 ext {
     ndkCommandPath  = ""
     ndkExists       = false
@@ -137,7 +134,7 @@ task configureAndroidNDK {
     if (System.env.ANDROID_NDK != null) {
         ndkBuildPath = System.env.ANDROID_NDK + File.separator + ndkBuildFile
     }
-    
+
     if (new File(ndkBuildPath).exists()) {
         ndkExists = true
         ndkCommandPath = ndkBuildPath

+ 3 - 0
common.gradle

@@ -16,6 +16,9 @@ repositories {
     maven {
         url "http://nifty-gui.sourceforge.net/nifty-maven-repo"
     }
+    flatDir {
+        dirs rootProject.file('lib')
+    }
 }
 
 dependencies {

+ 7 - 6
gradle.properties

@@ -1,14 +1,14 @@
 # Version number used for plugins, only 3 numbers (e.g. 3.1.3)
-jmeVersion = 3.2.0
+jmeVersion = 3.3.0
 # Version used for application and settings folder, no spaces!
-jmeMainVersion = 3.2
+jmeMainVersion = 3.3
 # Version addition pre-alpha-svn, Stable, Beta
 jmeVersionTag = SNAPSHOT
 # Increment this each time jmeVersionTag changes but jmeVersion stays the same
 jmeVersionTagID = 0
 
 # specify if JavaDoc should be built
-buildJavaDoc = false
+buildJavaDoc = true
 
 # specify if SDK and Native libraries get built
 buildNativeProjects = false
@@ -16,11 +16,11 @@ buildAndroidExamples = false
 
 # Path to android NDK for building native libraries
 #ndkPath=/Users/normenhansen/Documents/Code-Import/android-ndk-r7
-ndkPath = /opt/android-ndk-r10c
+ndkPath = /opt/android-ndk-r16b
 
 # Path for downloading native Bullet
-bulletUrl = https://github.com/bulletphysics/bullet3/archive/2.86.1.zip
-bulletFolder = bullet3-2.86.1
+bulletUrl = https://github.com/bulletphysics/bullet3/archive/2.87.zip
+bulletFolder = bullet3-2.87
 bulletZipFile = bullet3.zip
 
 # POM settings
@@ -38,3 +38,4 @@ POM_INCEPTION_YEAR=2009
 # Bintray settings to override in $HOME/.gradle/gradle.properties or ENV or commandline
 bintray_user=
 bintray_api_key=
+

BIN
gradle/wrapper/gradle-wrapper.jar


+ 5 - 6
gradle/wrapper/gradle-wrapper.properties

@@ -1,6 +1,5 @@
-#Fri Nov 25 13:05:50 EST 2016
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip

+ 17 - 9
gradlew

@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
 
 ##############################################################################
 ##
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
 # Use the maximum available, or set MAX_FD != -1 to use that value.
 MAX_FD="maximum"
 
-warn ( ) {
+warn () {
     echo "$*"
 }
 
-die ( ) {
+die () {
     echo
     echo "$*"
     echo
@@ -154,11 +154,19 @@ if $cygwin ; then
     esac
 fi
 
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
+# Escape application args
+save () {
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+    echo " "
 }
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+APP_ARGS=$(save "$@")
 
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+  cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"

+ 0 - 6
gradlew.bat

@@ -49,7 +49,6 @@ goto fail
 @rem Get command-line arguments, handling Windows variants
 
 if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
 
 :win9xME_args
 @rem Slurp the command line arguments.
@@ -60,11 +59,6 @@ set _SKIP=2
 if "x%~1" == "x" goto execute
 
 set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
 
 :execute
 @rem Setup the command line

+ 1 - 1
jme3-android-examples/src/main/java/org/jmonkeyengine/jme3androidexamples/MainActivity.java

@@ -214,7 +214,7 @@ public class MainActivity extends AppCompatActivity implements OnItemClickListen
 
     /**
      * User clicked a view on the screen.  Check for the OK and Cancel buttons
-     * and either start the applicaiton or exit.
+     * and either start the application or exit.
      * @param view
      */
     public void onClick(View view) {

+ 1 - 1
jme3-android/build.gradle

@@ -5,5 +5,5 @@ if (!hasProperty('mainClass')) {
 dependencies {
     compile project(':jme3-core')
     compile project(':jme3-plugins')
-    compile files('../lib/android.jar')
+    compileOnly 'android:android'
 }

+ 4 - 4
jme3-android/src/main/java/com/jme3/input/android/AndroidSensorJoyInput.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -59,7 +59,7 @@ import java.util.logging.Logger;
 /**
  * AndroidSensorJoyInput converts the Android Sensor system into Joystick events.
  * A single joystick is configured and includes data for all configured sensors
- * as seperate axes of the joystick.
+ * as separate axes of the joystick.
  *
  * Each axis is named according to the static strings in SensorJoystickAxis.
  * Refer to the strings defined in SensorJoystickAxis for a list of supported
@@ -285,8 +285,8 @@ public class AndroidSensorJoyInput implements SensorEventListener {
     }
 
     /**
-     * Calculates the device orientation based off the data recieved from the
-     * Acceleration Sensor and Mangetic Field sensor
+     * Calculates the device orientation based off the data received from the
+     * Acceleration Sensor and Magnetic Field sensor
      * Values are returned relative to the Earth.
      *
      * From the Android Doc

+ 2 - 2
jme3-android/src/main/java/com/jme3/system/android/OGLESContext.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -136,7 +136,7 @@ public class OGLESContext implements JmeContext, GLSurfaceView.Renderer, SoftTex
         // stops at the setFormat call without a crash.
         // We look at the user setting for alpha bits and set the surfaceview
         // PixelFormat to either Opaque, Transparent, or Translucent.
-        // ConfigChooser will do it's best to honor the alpha requested by the user
+        // ConfigChooser will do its best to honor the alpha requested by the user
         // For best rendering performance, use Opaque (alpha bits = 0).
         int curAlphaBits = settings.getAlphaBits();
         logger.log(Level.FINE, "curAlphaBits: {0}", curAlphaBits);

+ 5 - 5
jme3-blender/src/main/java/com/jme3/asset/BlenderKey.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -69,7 +69,7 @@ public class BlenderKey extends ModelKey {
      */
     protected String                   usedWorld;
     /**
-     * User's default material that is set fo objects that have no material definition in blender. The default value is
+     * User's default material that is set for objects that have no material definition in blender. The default value is
      * null. If the value is null the importer will use its own default material (gray color - like in blender).
      */
     protected Material                 defaultMaterial;
@@ -476,9 +476,9 @@ public class BlenderKey extends ModelKey {
     }
 
     /**
-     * This mehtod sets the name of the WORLD data block taht should be used during file loading. By default the name is
+     * This method sets the name of the WORLD data block that should be used during file loading. By default the name is
      * not set. If no name is set or the given name does not occur in the file - the first WORLD data block will be used
-     * during loading (assumin any exists in the file).
+     * during loading (assuming any exists in the file).
      * @param usedWorld
      *            the name of the WORLD block used during loading
      */
@@ -487,7 +487,7 @@ public class BlenderKey extends ModelKey {
     }
 
     /**
-     * This mehtod returns the name of the WORLD data block taht should be used during file loading.
+     * This method returns the name of the WORLD data block that should be used during file loading.
      * @return the name of the WORLD block used during loading
      */
     public String getUsedWorld() {

+ 1 - 1
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/constraints/SimulationNode.java

@@ -237,7 +237,7 @@ public class SimulationNode {
                         }
                     }
 
-                    // ... add virtual tracks if neccessary, for bones that were altered but had no tracks before ...
+                    // ... add virtual tracks if necessary, for bones that were altered but had no tracks before ...
                     for (Long boneOMA : alteredOmas) {
                         BoneContext boneContext = blenderContext.getBoneContext(boneOMA);
                         int boneIndex = skeleton.getBoneIndex(boneContext.getBone());

+ 7 - 7
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/curves/CurvesTemporalMesh.java

@@ -37,7 +37,7 @@ import com.jme3.util.BufferUtils;
 
 /**
  * A temporal mesh for curves and surfaces. It works in similar way as TemporalMesh for meshes.
- * It prepares all neccessary lines and faces and allows to apply modifiers just like in regular temporal mesh.
+ * It prepares all necessary lines and faces and allows to apply modifiers just like in regular temporal mesh.
  * 
  * @author Marcin Roguski (Kaelthas)
  */
@@ -210,7 +210,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
     }
 
     /**
-     * The method computes the value of a point at the certain relational distance from its beggining.
+     * The method computes the value of a point at the certain relational distance from its beginning.
      * @param alongRatio
      *            the relative distance along the curve; should be a value between 0 and 1 inclusive;
      *            if the value exceeds the boundaries it is truncated to them
@@ -369,7 +369,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
     }
 
     /**
-     * The method loads the bevel object that sould be applied to curve. It can either be another curve or a generated one
+     * The method loads the bevel object that should be applied to curve. It can either be another curve or a generated one
      * based on the bevel generating parameters in blender.
      * @param curveStructure
      *            the structure with the curve's data (the curve being loaded, NOT the bevel curve)
@@ -707,7 +707,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
 
     /**
      * the method applies scale for the given bevel points. The points table is
-     * being modified so expect ypur result there.
+     * being modified so expect your result there.
      * 
      * @param points
      *            the bevel points
@@ -726,7 +726,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
 
     /**
      * A helper class that represents a single bezier line. It consists of Edge's and allows to
-     * get a subline of a lentgh of the line.
+     * get a subline of a length of the line.
      * 
      * @author Marcin Roguski (Kaelthas)
      */
@@ -776,7 +776,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
             }
             if (cyclic) {
                 // if the first vertex is repeated at the end the distance will be = 0 so it won't affect the result, and if it is not repeated
-                // then it is neccessary to add the length between the last and the first vertex
+                // then it is necessary to add the length between the last and the first vertex
                 length += vertices[vertices.length - 1].distance(vertices[0]);
             }
         }
@@ -834,7 +834,7 @@ public class CurvesTemporalMesh extends TemporalMesh {
         }
 
         /**
-         * The method computes the value of a point at the certain relational distance from its beggining.
+         * The method computes the value of a point at the certain relational distance from its beginning.
          * @param alongRatio
          *            the relative distance along the curve; should be a value between 0 and 1 inclusive;
          *            if the value exceeds the boundaries it is truncated to them

+ 3 - 3
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/file/DnaBlockData.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -85,7 +85,7 @@ public class DnaBlockData {
             names[i] = inputStream.readString();
         }
 
-        // reding types
+        // reading types
         inputStream.alignPosition(4);
         identifier = inputStream.readByte() << 24 | inputStream.readByte() << 16 | inputStream.readByte() << 8 | inputStream.readByte();
         if (identifier != TYPE_ID) {
@@ -181,7 +181,7 @@ public class DnaBlockData {
     /**
      * This method converts the given identifier code to string.
      * @param code
-     *            the code taht is to be converted
+     *            the code that is to be converted
      * @return the string value of the identifier
      */
     private String toString(int code) {

+ 3 - 3
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/file/DynamicArray.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,7 +32,7 @@
 package com.jme3.scene.plugins.blender.file;
 
 /**
- * An array that can be dynamically modified/
+ * An array that can be dynamically modified
  * @author Marcin Roguski
  * @param <T>
  *            the type of stored data in the array
@@ -42,7 +42,7 @@ public class DynamicArray<T> implements Cloneable {
     /** An array object that holds the required data. */
     private T[]   array;
     /**
-     * This table holds the sizes of dimetions of the dynamic table. It's length specifies the table dimension or a
+     * This table holds the sizes of dimensions of the dynamic table. Its length specifies the table dimension or a
      * pointer level. For example: if tableSizes.length == 3 then it either specifies a dynamic table of fixed lengths:
      * dynTable[a][b][c], where a,b,c are stored in the tableSizes table.
      */

+ 3 - 3
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/file/Structure.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -169,7 +169,7 @@ public class Structure implements Cloneable {
     }
 
     /**
-     * This methos should be used on structures that are of a 'ListBase' type. It creates a List of structures that are
+     * This method should be used on structures that are of a 'ListBase' type. It creates a List of structures that are
      * held by this structure within the blend file.
      * @return a list of filled structures
      * @throws BlenderFileException
@@ -232,7 +232,7 @@ public class Structure implements Cloneable {
     }
 
     /**
-     * This method returns the address of the structure. The strucutre should be filled with data otherwise an exception
+     * This method returns the address of the structure. The structure should be filled with data otherwise an exception
      * is thrown.
      * @return the address of the feature stored in this structure
      */

+ 23 - 13
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/materials/MaterialContext.java

@@ -1,6 +1,7 @@
 package com.jme3.scene.plugins.blender.materials;
 
 import java.io.IOException;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -106,7 +107,7 @@ public final class MaterialContext implements Savable {
             boolean transparent = false;
             if (diffuseColor != null) {
                 transparent = diffuseColor.a < 1.0f;
-                if (loadedTextures.size() > 0) {// texutre covers the material color
+                if (loadedTextures.size() > 0) {// texture covers the material color
                     diffuseColor.set(1, 1, 1, 1);
                 }
             }
@@ -163,6 +164,12 @@ public final class MaterialContext implements Savable {
 
             material.setColor("Ambient", new ColorRGBA(ambientFactor, ambientFactor, ambientFactor, 1f));
         }
+        
+        // initializing unused "user-defined UV coords" to all available
+        Map<String, List<Vector2f>> unusedUserDefinedUVCoords = Collections.emptyMap();
+        if(userDefinedUVCoordinates != null && !userDefinedUVCoordinates.isEmpty()) {
+            unusedUserDefinedUVCoords = new HashMap<>(userDefinedUVCoordinates);
+        }
 
         // applying textures
         int textureIndex = 0;
@@ -175,16 +182,19 @@ public final class MaterialContext implements Savable {
                     String usedUserUVSet = combinedTexture.flatten(geometry, geometriesOMA, userDefinedUVCoordinates, blenderContext);
 
                     this.setTexture(material, combinedTexture.getMappingType(), combinedTexture.getResultTexture());
-                    List<Vector2f> uvs = combinedTexture.getResultUVS();
-                    if(uvs != null && uvs.size() > 0) {
-                        VertexBuffer uvCoordsBuffer = new VertexBuffer(TextureHelper.TEXCOORD_TYPES[textureIndex++]);
-                        uvCoordsBuffer.setupData(Usage.Static, 2, Format.Float, BufferUtils.createFloatBuffer(uvs.toArray(new Vector2f[uvs.size()])));
-                        geometry.getMesh().setBuffer(uvCoordsBuffer);
-                    }//uvs might be null if the user assigned non existing UV coordinates group name to the mesh (this should be fixed in blender file)
                     
-                    if(usedUserUVSet != null) {
-                    	userDefinedUVCoordinates = new HashMap<>(userDefinedUVCoordinates);
-                    	userDefinedUVCoordinates.remove(usedUserUVSet);
+                    if(usedUserUVSet == null || unusedUserDefinedUVCoords.containsKey(usedUserUVSet)) {
+                        List<Vector2f> uvs = combinedTexture.getResultUVS();
+                        if(uvs != null && uvs.size() > 0) {
+                            VertexBuffer uvCoordsBuffer = new VertexBuffer(TextureHelper.TEXCOORD_TYPES[textureIndex++]);
+                            uvCoordsBuffer.setupData(Usage.Static, 2, Format.Float, BufferUtils.createFloatBuffer(uvs.toArray(new Vector2f[uvs.size()])));
+                            geometry.getMesh().setBuffer(uvCoordsBuffer);
+                        }//uvs might be null if the user assigned non existing UV coordinates group name to the mesh (this should be fixed in blender file)
+
+                        // Remove used "user-defined UV coords" from the unused collection
+                        if(usedUserUVSet != null) {
+                	       unusedUserDefinedUVCoords.remove(usedUserUVSet);
+                        }
                     }
                 } else {
                     LOGGER.log(Level.WARNING, "The texture could not be applied because JME only supports up to {0} different UV's.", TextureHelper.TEXCOORD_TYPES.length);
@@ -192,12 +202,12 @@ public final class MaterialContext implements Savable {
             }
         }
 
-        if (userDefinedUVCoordinates != null && userDefinedUVCoordinates.size() > 0) {
+        if (unusedUserDefinedUVCoords != null && unusedUserDefinedUVCoords.size() > 0) {
             LOGGER.fine("Storing unused, user defined UV coordinates sets.");
-            if (userDefinedUVCoordinates.size() > TextureHelper.TEXCOORD_TYPES.length) {
+            if (unusedUserDefinedUVCoords.size() > TextureHelper.TEXCOORD_TYPES.length) {
                 LOGGER.log(Level.WARNING, "The blender file has defined more than {0} different UV coordinates for the mesh. JME supports only {0} UV coordinates buffers.", TextureHelper.TEXCOORD_TYPES.length);
             }
-            for (Entry<String, List<Vector2f>> entry : userDefinedUVCoordinates.entrySet()) {
+            for (Entry<String, List<Vector2f>> entry : unusedUserDefinedUVCoords.entrySet()) {
                 if (textureIndex < TextureHelper.TEXCOORD_TYPES.length) {
                     List<Vector2f> uvs = entry.getValue();
                     VertexBuffer uvCoordsBuffer = new VertexBuffer(TextureHelper.TEXCOORD_TYPES[textureIndex++]);

+ 9 - 9
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/math/Vector3d.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -324,7 +324,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
      *            the vector to take the cross product of with this.
      * @param result
      *            the vector to store the cross product result.
-     * @return result, after recieving the cross product vector.
+     * @return result, after receiving the cross product vector.
      */
     public Vector3d cross(Vector3d v, Vector3d result) {
         return this.cross(v.x, v.y, v.z, result);
@@ -342,7 +342,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
      *            z component of the vector to take the cross product of with this.
      * @param result
      *            the vector to store the cross product result.
-     * @return result, after recieving the cross product vector.
+     * @return result, after receiving the cross product vector.
      */
     public Vector3d cross(double otherX, double otherY, double otherZ, Vector3d result) {
         if (result == null) {
@@ -485,12 +485,12 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
     }
 
     /**
-     * <code>multLocal</code> multiplies a provided vector to this vector
+     * <code>multLocal</code> multiplies a provided vector by this vector
      * internally, and returns a handle to this vector for easy chaining of
      * calls. If the provided vector is null, null is returned.
      *
      * @param vec
-     *            the vector to mult to this vector.
+     *            the vector to multiply by this vector.
      * @return this
      */
     public Vector3d multLocal(Vector3d vec) {
@@ -522,7 +522,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
     }
 
     /**
-     * <code>multLocal</code> multiplies a provided vector to this vector
+     * <code>multLocal</code> multiplies a provided vector by this vector
      * internally, and returns a handle to this vector for easy chaining of
      * calls. If the provided vector is null, null is returned.
      *
@@ -539,7 +539,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
     }
 
     /**
-     * <code>multLocal</code> multiplies a provided vector to this vector
+     * <code>multLocal</code> multiplies a provided vector by this vector
      * internally, and returns a handle to this vector for easy chaining of
      * calls. If the provided vector is null, null is returned.
      *
@@ -657,7 +657,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
     }
 
     /**
-     * <code>subtractLocal</code> subtracts a provided vector to this vector
+     * <code>subtractLocal</code> subtracts a provided vector from this vector
      * internally, and returns a handle to this vector for easy chaining of
      * calls. If the provided vector is null, null is returned.
      *
@@ -825,7 +825,7 @@ public final class Vector3d implements Savable, Cloneable, Serializable {
 
     /**
      * <code>hashCode</code> returns a unique code for this vector object based
-     * on it's values. If two vectors are logically equivalent, they will return
+     * on its values. If two vectors are logically equivalent, they will return
      * the same hash code value.
      * @return the hash code value of this vector.
      */

+ 20 - 17
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/meshes/MeshHelper.java

@@ -291,27 +291,30 @@ public class MeshHelper extends AbstractBlenderHelper {
         	Structure defbase = (Structure) parent.getFieldValue("defbase");
             List<String> groupNames = new ArrayList<String>();
             List<Structure> defs = defbase.evaluateListBase();
-            for (Structure def : defs) {
-                groupNames.add(def.getFieldValue("name").toString());
-            }
+            
+            if(!defs.isEmpty()) {
+                for (Structure def : defs) {
+                    groupNames.add(def.getFieldValue("name").toString());
+                }
 
-            Pointer pDvert = (Pointer) meshStructure.getFieldValue("dvert");// dvert = DeformVERTices
-            if (pDvert.isNotNull()) {// assigning weights and bone indices
-                List<Structure> dverts = pDvert.fetchData();
-                for (Structure dvert : dverts) {
-                    Map<String, Float> weightsForVertex = new HashMap<String, Float>();
-                    Pointer pDW = (Pointer) dvert.getFieldValue("dw");
-                    if (pDW.isNotNull()) {
-                        List<Structure> dw = pDW.fetchData();
-                        for (Structure deformWeight : dw) {
-                            int groupIndex = ((Number) deformWeight.getFieldValue("def_nr")).intValue();
-                            float weight = ((Number) deformWeight.getFieldValue("weight")).floatValue();
-                            String groupName = groupNames.get(groupIndex);
+                Pointer pDvert = (Pointer) meshStructure.getFieldValue("dvert");// dvert = DeformVERTices
+                if (pDvert.isNotNull()) {// assigning weights and bone indices
+                    List<Structure> dverts = pDvert.fetchData();
+                    for (Structure dvert : dverts) {
+                        Map<String, Float> weightsForVertex = new HashMap<String, Float>();
+                        Pointer pDW = (Pointer) dvert.getFieldValue("dw");
+                        if (pDW.isNotNull()) {
+                            List<Structure> dw = pDW.fetchData();
+                            for (Structure deformWeight : dw) {
+                                int groupIndex = ((Number) deformWeight.getFieldValue("def_nr")).intValue();
+                                float weight = ((Number) deformWeight.getFieldValue("weight")).floatValue();
+                                String groupName = groupNames.get(groupIndex);
 
-                            weightsForVertex.put(groupName, weight);
+                                weightsForVertex.put(groupName, weight);
+                            }
                         }
+                        result.add(weightsForVertex);
                     }
-                    result.add(weightsForVertex);
                 }
             }
         }

+ 2 - 2
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/modifiers/SubdivisionSurfaceModifier.java

@@ -47,7 +47,7 @@ public class SubdivisionSurfaceModifier extends Modifier {
     private Set<Integer>        verticesOnOriginalEdges = new HashSet<Integer>();
 
     /**
-     * Constructor loads all neccessary modifier data.
+     * Constructor loads all necessary modifier data.
      * @param modifierStructure
      *            the modifier structure
      * @param blenderContext
@@ -193,7 +193,7 @@ public class SubdivisionSurfaceModifier extends Modifier {
                 // moving the vertex
                 v.addLocal(t);
 
-                // applying crease weight if neccessary
+                // applying crease weight if necessary
                 CreasePoint creasePoint = creasePoints.get(i);
                 if (creasePoint.getTarget() != null && creasePoint.getWeight() != 0) {
                     t = creasePoint.getTarget().subtractLocal(v).multLocal(creasePoint.getWeight());

+ 67 - 66
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/textures/ImageLoader.java

@@ -31,12 +31,14 @@
  */
 package com.jme3.scene.plugins.blender.textures;
 
+import com.jme3.asset.AssetManager;
+import com.jme3.asset.TextureKey;
 import com.jme3.scene.plugins.blender.file.BlenderInputStream;
 import com.jme3.texture.Image;
+import com.jme3.texture.Texture;
 import com.jme3.texture.plugins.AWTLoader;
-import com.jme3.texture.plugins.DDSLoader;
-import com.jme3.texture.plugins.TGALoader;
-import java.io.InputStream;
+import com.jme3.texture.plugins.HDRLoader;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /**
@@ -47,11 +49,29 @@ import java.util.logging.Logger;
  */
 /* package */class ImageLoader extends AWTLoader {
     private static final Logger LOGGER    = Logger.getLogger(ImageLoader.class.getName());
-
-    protected DDSLoader         ddsLoader = new DDSLoader();                              // DirectX image loader
+    private static final Logger hdrLogger = Logger.getLogger(HDRLoader.class.getName()); // Used to silence HDR Errors
+    
+    /**
+     * List of Blender-Supported Texture Extensions (we have to guess them, so
+     * the AssetLoader can find them. Not good, but better than nothing.
+     * Source: https://docs.blender.org/manual/en/dev/data_system/files/media/image_formats.html
+     */
+    private static final String[] extensions = new String[]
+        { /* Windows Bitmap */".bmp",
+          /* Iris */ ".sgi", ".rgb", ".bw",
+          /* PNG */ ".png",
+          /* JPEG */ ".jpg", ".jpeg",
+          /* JPEG 2000 */ ".jp2", ".j2c",
+          /* Targa */".tga",
+          /* Cineon & DPX */".cin", ".dpx",
+          /* OpenEXR */ ".exr",
+          /* Radiance HDR */ ".hdr",
+          /* TIFF */ ".tif", ".tiff",
+          /* DDS (Direct X) */ ".dds" };
 
     /**
-     * This method loads the image from the blender file itself. It tries each loader to load the image.
+     * This method loads a image which is packed into the blender file.
+     * It makes use of all the registered AssetLoaders
      * 
      * @param inputStream
      *            blender input stream
@@ -60,76 +80,57 @@ import java.util.logging.Logger;
      * @param flipY
      *            if the image should be flipped (does not work with DirectX image)
      * @return loaded image or null if it could not be loaded
+     * @deprecated This method has only been left in for API compability.
+     * Use loadTexture instead
      */
-    public Image loadImage(BlenderInputStream inputStream, int startPosition, boolean flipY) {
-        // loading using AWT loader
-        inputStream.setPosition(startPosition);
-        Image result = this.loadImage(inputStream, ImageType.AWT, flipY);
-        // loading using TGA loader
-        if (result == null) {
-            inputStream.setPosition(startPosition);
-            result = this.loadImage(inputStream, ImageType.TGA, flipY);
-        }
-        // loading using DDS loader
-        if (result == null) {
-            inputStream.setPosition(startPosition);
-            result = this.loadImage(inputStream, ImageType.DDS, flipY);
+    public Image loadImage(AssetManager assetManager, BlenderInputStream inputStream, int startPosition, boolean flipY) {
+        Texture tex = loadTexture(assetManager, inputStream, startPosition, flipY);
+        
+        if (tex == null) {
+            return null;
+        } else {
+            return tex.getImage();
         }
-
-        if (result == null) {
-            LOGGER.warning("Image could not be loaded by none of available loaders!");
-        }
-
-        return result;
     }
-
+    
     /**
-     * This method loads an image of a specified type from the given input stream.
+     * This method loads a texture which is packed into the blender file.
+     * It makes use of all the registered AssetLoaders
      * 
      * @param inputStream
-     *            the input stream we read the image from
-     * @param imageType
-     *            the type of the image {@link ImageType}
+     *            blender input stream
+     * @param startPosition
+     *            position in the stream where the image data starts
      * @param flipY
      *            if the image should be flipped (does not work with DirectX image)
-     * @return loaded image or null if it could not be loaded
+     * @return loaded texture or null if it could not be loaded
      */
-    public Image loadImage(InputStream inputStream, ImageType imageType, boolean flipY) {
-        Image result = null;
-        switch (imageType) {
-            case AWT:
-                try {
-                    result = this.load(inputStream, flipY);
-                } catch (Exception e) {
-                    LOGGER.warning("Unable to load image using AWT loader!");
-                }
-                break;
-            case DDS:
-                try {
-                    result = ddsLoader.load(inputStream);
-                } catch (Exception e) {
-                    LOGGER.warning("Unable to load image using DDS loader!");
-                }
-                break;
-            case TGA:
-                try {
-                    result = TGALoader.load(inputStream, flipY);
-                } catch (Exception e) {
-                    LOGGER.warning("Unable to load image using TGA loader!");
-                }
-                break;
-            default:
-                throw new IllegalStateException("Unknown image type: " + imageType);
+    public Texture loadTexture(AssetManager assetManager, BlenderInputStream inputStream, int startPosition, boolean flipY) {
+        inputStream.setPosition(startPosition);
+        TextureKey tKey;
+        Texture result = null;
+        
+        hdrLogger.setLevel(Level.SEVERE); // When we bruteforce try HDR on a non hdr file, it prints unreadable chars
+        
+        for (String ext: extensions) {
+            tKey = new TextureKey("dummy" + ext, flipY);
+            try {
+                result = assetManager.loadAssetFromStream(tKey, inputStream);
+            } catch (Exception e) {
+                continue;
+            }
+            
+            if (result != null) {
+                break; // Could locate a possible asset
+            }
+        }
+        
+        if (result == null) {
+            LOGGER.warning("Texture could not be loaded by any of the available loaders!\n"
+                    + "Since the file has been packed into the blender file, there is no"
+                    + "way for us to tell you which texture it was.");
         }
+        
         return result;
     }
-
-    /**
-     * Image types that can be loaded. AWT: png, jpg, jped or bmp TGA: tga DDS: DirectX image files
-     * 
-     * @author Marcin Roguski (Kaelthas)
-     */
-    private static enum ImageType {
-        AWT, TGA, DDS;
-    }
 }

+ 2 - 2
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/textures/ImageUtils.java

@@ -206,7 +206,7 @@ public final class ImageUtils {
                 N.z = 1;
                 N.divideLocal(den);
 
-                // setting thge pixel in the result image
+                // setting the pixel in the result image
                 bumpMap.setRGB(x, y, ImageUtils.vectorToColor(N.x, N.y, N.z));
             }
         }
@@ -422,7 +422,7 @@ public final class ImageUtils {
      *            pixel's X coordinate
      * @param y
      *            pixel's Y coordinate
-     * @return height reprezented by the given texture in the specified location
+     * @return height represented by the given texture in the specified location
      */
     private static int getHeight(BufferedImage image, int x, int y) {
         if (x < 0) {

+ 26 - 6
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/textures/TextureHelper.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -72,6 +72,7 @@ import com.jme3.texture.Texture.WrapMode;
 import com.jme3.texture.Texture2D;
 import com.jme3.texture.image.ColorSpace;
 import com.jme3.util.BufferUtils;
+import com.jme3.util.PlaceholderAssets;
 
 /**
  * A class that is used in texture calculations.
@@ -251,7 +252,11 @@ public class TextureHelper extends AbstractBlenderHelper {
                     blenderContext.getInputStream().setPosition(dataFileBlock.getBlockPosition());
 
                     // Should the texture be flipped? It works for sinbad ..
-                    result = new Texture2D(new ImageLoader().loadImage(blenderContext.getInputStream(), dataFileBlock.getBlockPosition(), true));
+                    result = new ImageLoader().loadTexture(blenderContext.getAssetManager(), blenderContext.getInputStream(), dataFileBlock.getBlockPosition(), true);
+                    if (result == null) {
+                        result = new Texture2D(PlaceholderAssets.getPlaceholderImage(blenderContext.getAssetManager()));
+                        LOGGER.fine("ImageLoader returned null. It probably failed to load the packed texture, using placeholder asset");
+                    }
                 }
             }
         //} else {
@@ -310,7 +315,7 @@ public class TextureHelper extends AbstractBlenderHelper {
      * @param pos
      *            the relative position (value of range <0, 1> (both inclusive))
      * @param size
-     *            the size of the line the pixel lies on (width, heigth or
+     *            the size of the line the pixel lies on (width, height or
      *            depth)
      * @return the integer index of the pixel on the line of the specified width
      */
@@ -429,10 +434,10 @@ public class TextureHelper extends AbstractBlenderHelper {
     }
 
     /**
-     * This method loads the textre from outside the blend file using the
+     * This method loads the texture from outside the blend file using the
      * AssetManager that the blend file was loaded with. It returns a texture
      * with a full assetKey that references the original texture so it later
-     * doesn't need to ba packed when the model data is serialized. It searches
+     * doesn't need to be packed when the model data is serialized. It searches
      * the AssetManager for the full path if the model file is a relative path
      * and will attempt to truncate the path if it is an absolute file path
      * until the path can be found in the AssetManager. If the texture can not
@@ -614,8 +619,15 @@ public class TextureHelper extends AbstractBlenderHelper {
                     int texflag = ((Number) textureData.mtex.getFieldValue("texflag")).intValue();
                     boolean negateTexture = (texflag & 0x04) != 0;
 
+                    boolean colorSet = false;
                     for (int i = 0; i < mappings.length; ++i) {
                         if ((mappings[i] & mapto.intValue()) != 0) {
+                            if(mappings[i] == MaterialContext.MTEX_COL) {
+                                colorSet = true;
+                            } else if(colorSet && mappings[i] == MaterialContext.MTEX_ALPHA) {
+                                continue;
+                            }
+                            
                             CombinedTexture combinedTexture = new CombinedTexture(mappings[i], !skyTexture);
                             int blendType = ((Number) textureData.mtex.getFieldValue("blendtype")).intValue();
                             float[] color = new float[] { ((Number) textureData.mtex.getFieldValue("r")).floatValue(), ((Number) textureData.mtex.getFieldValue("g")).floatValue(), ((Number) textureData.mtex.getFieldValue("b")).floatValue() };
@@ -646,8 +658,16 @@ public class TextureHelper extends AbstractBlenderHelper {
         Map<Number, List<TextureData>> result = new HashMap<Number, List<TextureData>>();
         for (TextureData data : textures) {
             Number mapto = (Number) data.mtex.getFieldValue("mapto");
+            
+            boolean colorSet = false;
             for (int i = 0; i < mappings.length; ++i) {
                 if ((mappings[i] & mapto.intValue()) != 0) {
+                    if(mappings[i] == MaterialContext.MTEX_COL) {
+                        colorSet = true;
+                    } else if(colorSet && mappings[i] == MaterialContext.MTEX_ALPHA) {
+                        continue;
+                    }
+                    
                     List<TextureData> datas = result.get(mappings[i]);
                     if (datas == null) {
                         datas = new ArrayList<TextureData>();
@@ -668,4 +688,4 @@ public class TextureHelper extends AbstractBlenderHelper {
         /** The name of the user's UV coordinates that are used for this texture. */
         public String    uvCoordinatesName;
     }
-}
+}

+ 11 - 1
jme3-blender/src/main/java/com/jme3/scene/plugins/blender/textures/blending/TextureBlenderAWT.java

@@ -163,9 +163,19 @@ public class TextureBlenderAWT extends AbstractTextureBlender {
      *            the blender context
      */
     protected void blendPixel(float[] result, float[] materialColor, float[] pixelColor, BlenderContext blenderContext) {
+        // We calculate first the importance of the texture (colFactor * texAlphaValue)
         float blendFactor = this.blendFactor * pixelColor[3];
-        float oneMinusFactor = 1.0f - blendFactor, col;
+        // Then, we get the object material factor ((1 - texture importance) * matAlphaValue) 
+        float oneMinusFactor = (1f - blendFactor) * materialColor[3];
+        // Finally, we can get the final blendFactor, which is 1 - the material factor.
+        blendFactor = 1f - oneMinusFactor;
+        
+        // --- Compact method ---
+        // float blendFactor = this.blendFactor * (1f - ((1f - pixelColor[3]) * materialColor[3]));
+        // float oneMinusFactor = 1f - blendFactor;
 
+        float col;
+        
         switch (blendType) {
             case MTEX_BLEND:
                 result[0] = blendFactor * pixelColor[0] + oneMinusFactor * materialColor[0];

+ 2 - 1
jme3-bullet-native-android/build.gradle

@@ -104,7 +104,8 @@ task copyJmeAndroid(type: Copy) {
     into outputDir
 }
 
-task buildBulletNativeLib(type: Exec, dependsOn: [copyJmeAndroid, copyJmeCpp, copyBullet]) {
+//dependsOn ':jme3-bullet:generateNativeHeaders'
+task buildBulletNativeLib(type: Exec, dependsOn: [copyJmeAndroid, ':jme3-bullet:generateNativeHeaders', copyJmeCpp, copyBullet]) {
 //    args 'TARGET_PLATFORM=android-9'
 //    println "buildBulletNativeLib ndkWorkingPath: " + ndkWorkingPath
 //    println "buildBulletNativeLib rootProject.ndkCommandPath: " + rootProject.ndkCommandPath

BIN
jme3-bullet-native-android/libs/arm64-v8a/libbulletjme.so


BIN
jme3-bullet-native-android/libs/armeabi-v7a/libbulletjme.so


BIN
jme3-bullet-native-android/libs/armeabi/libbulletjme.so


BIN
jme3-bullet-native-android/libs/mips/libbulletjme.so


BIN
jme3-bullet-native-android/libs/mips64/libbulletjme.so


BIN
jme3-bullet-native-android/libs/x86/libbulletjme.so


BIN
jme3-bullet-native-android/libs/x86_64/libbulletjme.so


+ 13 - 2
jme3-bullet-native-android/src/native/android/Android.mk

@@ -54,12 +54,23 @@ LOCAL_C_INCLUDES := $(BULLET_PATH)/\
     $(BULLET_PATH)/vectormath/sse\
     $(BULLET_PATH)/vectormath/neon
 
-LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%)
+#ARM mode more performant than thumb for old armeabi
+ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI), armeabi))
+LOCAL_ARM_MODE := arm
+endif 
+
+#Enable neon for armv7
+ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI), armeabi-v7a))
+LOCAL_ARM_NEON := true
+endif
+
+LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%) 
 LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl -lm -llog
 
 FILE_LIST := $(wildcard $(LOCAL_PATH)/*.cpp)
 FILE_LIST += $(wildcard $(LOCAL_PATH)/**/*.cpp)
 FILE_LIST += $(wildcard $(LOCAL_PATH)/**/**/*.cpp)
+FILE_LIST := $(filter-out $(wildcard $(LOCAL_PATH)/Bullet3OpenCL/**/*.cpp), $(FILE_LIST))
 LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
 
-include $(BUILD_SHARED_LIBRARY)
+include $(BUILD_SHARED_LIBRARY)

+ 4 - 1
jme3-bullet-native-android/src/native/android/Application.mk

@@ -1,4 +1,7 @@
 APP_OPTIM := release
 APP_ABI := all
-#APP_ABI := armeabi-v7a
+APP_STL := stlport_static
+# gnustl_static or stlport_static
 APP_MODULES      := bulletjme
+APP_CFLAGS += -funroll-loops -Ofast
+

+ 28 - 2
jme3-bullet-native/build.gradle

@@ -11,6 +11,20 @@ if (!hasProperty('mainClass')) {
 dependencies {
     compile project(':jme3-bullet')
 }
+clean { dependsOn 'cleanHeaders', 'cleanUnzipped' }
+
+// clean up auto-generated C++ headers
+task cleanHeaders(type: Delete) {
+    delete fileTree(dir: 'src/native/cpp', include: 'com_jme3_bullet_*.h')
+}
+// clean up unzipped files
+task cleanUnzipped(type: Delete) {
+    delete bulletFolder
+}
+// clean up the downloaded archive
+task cleanZipFile(type: Delete) {
+    delete bulletZipFile
+}
 
 model {
     components {
@@ -27,13 +41,21 @@ model {
                     source {
                         srcDir 'src/native/cpp'
                         srcDir bulletSrcPath
+                        exclude 'Bullet3Collision/**'
+                        exclude 'Bullet3Dynamics/**'
+                        exclude 'Bullet3Geometry/**'
                         exclude 'Bullet3OpenCL/**'
+                        exclude 'Bullet3Serialize/**'
                         include '**/*.cpp'
                     }
                     exportedHeaders {
                         srcDir 'src/native/cpp'
                         srcDir bulletSrcPath
+                        exclude 'Bullet3Collision/**'
+                        exclude 'Bullet3Dynamics/**'
+                        exclude 'Bullet3Geometry/**'
                         exclude 'Bullet3OpenCL/**'
+                        exclude 'Bullet3Serialize/**'
                         include '**/*.h'
                     }
                 }
@@ -77,6 +99,7 @@ model {
                 return
             }
 
+            cppCompiler.define('BT_NO_PROFILE')
             if (toolChain in VisualCpp) {
                 cppCompiler.args "/I$javaHome\\include"
             } else{
@@ -115,7 +138,10 @@ model {
                 cppCompiler.define('WIN32')
             }
 
-            tasks.all { dependsOn unzipBulletIfNeeded }
+            tasks.all { 
+                dependsOn unzipBulletIfNeeded
+                dependsOn ':jme3-bullet:generateNativeHeaders'
+            }
 
             // Add output to jar file
             jar.into("native/${os}/${arch}") {
@@ -199,7 +225,7 @@ unzipBulletIfNeeded.dependsOn {
     }
 }
 
-// Helper class to wrap ant dowload task
+// Helper class to wrap ant download task
 class MyDownload extends DefaultTask {
     @Input
     String sourceUrl

BIN
jme3-bullet-native/libs/native/linux/x86/libbulletjme.so


BIN
jme3-bullet-native/libs/native/linux/x86_64/libbulletjme.so


BIN
jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib


BIN
jme3-bullet-native/libs/native/osx/x86_64/libbulletjme.dylib


BIN
jme3-bullet-native/libs/native/windows/x86/bulletjme.dll


BIN
jme3-bullet-native/libs/native/windows/x86_64/bulletjme.dll


+ 62 - 57
jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace.cpp

@@ -46,16 +46,21 @@ extern "C" {
      * Signature: (FFFFFFI)J
      */
     JNIEXPORT jlong JNICALL Java_com_jme3_bullet_PhysicsSpace_createPhysicsSpace
-    (JNIEnv * env, jobject object, jfloat minX, jfloat minY, jfloat minZ, jfloat maxX, jfloat maxY, jfloat maxZ, jint broadphase, jboolean threading) {
+    (JNIEnv * env, jobject object, jfloat minX, jfloat minY, jfloat minZ,
+            jfloat maxX, jfloat maxY, jfloat maxZ, jint broadphase,
+            jboolean threading) {
         jmeClasses::initJavaClasses(env);
+
         jmePhysicsSpace* space = new jmePhysicsSpace(env, object);
         if (space == NULL) {
             jclass newExc = env->FindClass("java/lang/NullPointerException");
             env->ThrowNew(newExc, "The physics space has not been created.");
             return 0;
         }
-        space->createPhysicsSpace(minX, minY, minZ, maxX, maxY, maxZ, broadphase, threading);
-        return reinterpret_cast<jlong>(space);
+
+        space->createPhysicsSpace(minX, minY, minZ, maxX, maxY, maxZ,
+                broadphase, threading);
+        return reinterpret_cast<jlong> (space);
     }
 
     /*
@@ -64,8 +69,9 @@ extern "C" {
      * Signature: (JFIF)V
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_stepSimulation
-    (JNIEnv * env, jobject object, jlong spaceId, jfloat tpf, jint maxSteps, jfloat accuracy) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
+    (JNIEnv * env, jobject object, jlong spaceId, jfloat tpf, jint maxSteps,
+            jfloat accuracy) {
+        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 +87,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCollisionObject
     (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btCollisionObject* collisionObject = reinterpret_cast<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.");
@@ -93,7 +99,7 @@ extern "C" {
             env->ThrowNew(newExc, "The collision object does not exist.");
             return;
         }
-        jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
+        jmeUserPointer *userPointer = (jmeUserPointer*) collisionObject->getUserPointer();
         userPointer -> space = space;
 
         space->getDynamicsWorld()->addCollisionObject(collisionObject);
@@ -106,8 +112,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCollisionObject
     (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btCollisionObject* collisionObject = reinterpret_cast<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.");
@@ -119,7 +125,7 @@ extern "C" {
             return;
         }
         space->getDynamicsWorld()->removeCollisionObject(collisionObject);
-        jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
+        jmeUserPointer *userPointer = (jmeUserPointer*) collisionObject->getUserPointer();
         userPointer -> space = NULL;
     }
 
@@ -130,8 +136,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addRigidBody
     (JNIEnv * env, jobject object, jlong spaceId, jlong rigidBodyId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btRigidBody* collisionObject = reinterpret_cast<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.");
@@ -142,7 +148,7 @@ extern "C" {
             env->ThrowNew(newExc, "The collision object does not exist.");
             return;
         }
-        jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
+        jmeUserPointer *userPointer = (jmeUserPointer*) collisionObject->getUserPointer();
         userPointer -> space = space;
         space->getDynamicsWorld()->addRigidBody(collisionObject);
     }
@@ -154,8 +160,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeRigidBody
     (JNIEnv * env, jobject object, jlong spaceId, jlong rigidBodyId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btRigidBody* collisionObject = reinterpret_cast<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.");
@@ -166,7 +172,7 @@ extern "C" {
             env->ThrowNew(newExc, "The collision object does not exist.");
             return;
         }
-        jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
+        jmeUserPointer *userPointer = (jmeUserPointer*) collisionObject->getUserPointer();
         userPointer -> space = NULL;
         space->getDynamicsWorld()->removeRigidBody(collisionObject);
     }
@@ -178,8 +184,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCharacterObject
     (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btCollisionObject* collisionObject = reinterpret_cast<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.");
@@ -190,12 +196,12 @@ extern "C" {
             env->ThrowNew(newExc, "The collision object does not exist.");
             return;
         }
-        jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
+        jmeUserPointer *userPointer = (jmeUserPointer*) collisionObject->getUserPointer();
         userPointer -> space = space;
         space->getDynamicsWorld()->addCollisionObject(collisionObject,
                 btBroadphaseProxy::CharacterFilter,
                 btBroadphaseProxy::StaticFilter | btBroadphaseProxy::DefaultFilter
-        );
+                );
     }
 
     /*
@@ -205,8 +211,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCharacterObject
     (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btCollisionObject* collisionObject = reinterpret_cast<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.");
@@ -217,7 +223,7 @@ extern "C" {
             env->ThrowNew(newExc, "The collision object does not exist.");
             return;
         }
-        jmeUserPointer *userPointer = (jmeUserPointer*)collisionObject->getUserPointer();
+        jmeUserPointer *userPointer = (jmeUserPointer*) collisionObject->getUserPointer();
         userPointer -> space = NULL;
         space->getDynamicsWorld()->removeCollisionObject(collisionObject);
     }
@@ -229,8 +235,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addAction
     (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btActionInterface* actionObject = reinterpret_cast<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 +257,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeAction
     (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btActionInterface* actionObject = reinterpret_cast<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 +279,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addVehicle
     (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btActionInterface* actionObject = reinterpret_cast<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 +301,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeVehicle
     (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btActionInterface* actionObject = reinterpret_cast<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 +323,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addConstraint
     (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btTypedConstraint* constraint = reinterpret_cast<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 +345,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addConstraintC
     (JNIEnv * env, jobject object, jlong spaceId, jlong objectId, jboolean collision) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btTypedConstraint* constraint = reinterpret_cast<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,8 +367,8 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeConstraint
     (JNIEnv * env, jobject object, jlong spaceId, jlong objectId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
-        btTypedConstraint* constraint = reinterpret_cast<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.");
@@ -383,7 +389,7 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_setGravity
     (JNIEnv * env, jobject object, jlong spaceId, jobject vector) {
-        jmePhysicsSpace* space = reinterpret_cast<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.");
@@ -391,6 +397,7 @@ extern "C" {
         }
         btVector3 gravity = btVector3();
         jmeBulletUtil::convert(env, vector, &gravity);
+
         space->getDynamicsWorld()->setGravity(gravity);
     }
 
@@ -411,13 +418,13 @@ extern "C" {
      */
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_finalizeNative
     (JNIEnv * env, jobject object, jlong spaceId) {
-        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*>(spaceId);
+        jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*> (spaceId);
         if (space == NULL) {
             return;
         }
         delete(space);
     }
-    
+
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_rayTest_1native
     (JNIEnv * env, jobject object, jobject from, jobject to, jlong spaceId, jobject resultlist, jint flags) {
 
@@ -465,13 +472,12 @@ extern "C" {
         resultCallback.resultlist = resultlist;
         resultCallback.m_flags = flags;
         space->getDynamicsWorld()->rayTest(native_from, native_to, resultCallback);
+
         return;
     }
 
-
-
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_sweepTest_1native
-        (JNIEnv * env, jobject object, jlong shapeId, jobject from, jobject to, jlong spaceId, jobject resultlist, jfloat allowedCcdPenetration) {
+    (JNIEnv * env, jobject object, jlong shapeId, jobject from, jobject to, jlong spaceId, jobject resultlist, jfloat allowedCcdPenetration) {
 
         jmePhysicsSpace* space = reinterpret_cast<jmePhysicsSpace*> (spaceId);
         if (space == NULL) {
@@ -489,7 +495,7 @@ extern "C" {
 
         struct AllConvexResultCallback : public btCollisionWorld::ConvexResultCallback {
 
-            AllConvexResultCallback(const btTransform& convexFromWorld, const  btTransform & convexToWorld) : m_convexFromWorld(convexFromWorld), m_convexToWorld(convexToWorld) {
+            AllConvexResultCallback(const btTransform& convexFromWorld, const btTransform & convexToWorld) : m_convexFromWorld(convexFromWorld), m_convexToWorld(convexToWorld) {
             }
             jobject resultlist;
             JNIEnv* env;
@@ -500,17 +506,16 @@ extern "C" {
             btVector3 m_hitPointWorld;
 
             virtual btScalar addSingleResult(btCollisionWorld::LocalConvexResult& convexResult, bool normalInWorldSpace) {
-                    if (normalInWorldSpace) {
-                            m_hitNormalWorld = convexResult.m_hitNormalLocal;
-                    }
-                    else {
-                            m_hitNormalWorld = convexResult.m_hitCollisionObject->getWorldTransform().getBasis() * convexResult.m_hitNormalLocal;
-                    }
-                    m_hitPointWorld.setInterpolate3(m_convexFromWorld.getBasis() * m_convexFromWorld.getOrigin(), m_convexToWorld.getBasis() * m_convexToWorld.getOrigin(), convexResult.m_hitFraction);
+                if (normalInWorldSpace) {
+                    m_hitNormalWorld = convexResult.m_hitNormalLocal;
+                } else {
+                    m_hitNormalWorld = convexResult.m_hitCollisionObject->getWorldTransform().getBasis() * convexResult.m_hitNormalLocal;
+                }
+                m_hitPointWorld.setInterpolate3(m_convexFromWorld.getBasis() * m_convexFromWorld.getOrigin(), m_convexToWorld.getBasis() * m_convexToWorld.getOrigin(), convexResult.m_hitFraction);
 
-                    jmeBulletUtil::addSweepResult(env, resultlist, &m_hitNormalWorld, &m_hitPointWorld, convexResult.m_hitFraction, convexResult.m_hitCollisionObject);
+                jmeBulletUtil::addSweepResult(env, resultlist, &m_hitNormalWorld, &m_hitPointWorld, convexResult.m_hitFraction, convexResult.m_hitCollisionObject);
 
-                    return 1.f;
+                return 1.f;
             }
         };
 
@@ -528,16 +533,16 @@ extern "C" {
         space->getDynamicsWorld()->convexSweepTest((btConvexShape *) shape, native_from, native_to, resultCallback, native_allowed_ccd_penetration);
         return;
     }
-    
+
     JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_setSolverNumIterations
     (JNIEnv *env, jobject object, jlong spaceId, jint value) {
-        jmePhysicsSpace* space = reinterpret_cast<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.");
             return;
         }
-        
+
         space->getDynamicsWorld()->getSolverInfo().m_numIterations = value;
     }
 

+ 0 - 187
jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace.h

@@ -1,187 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_PhysicsSpace */
-
-#ifndef _Included_com_jme3_bullet_PhysicsSpace
-#define _Included_com_jme3_bullet_PhysicsSpace
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef com_jme3_bullet_PhysicsSpace_AXIS_X
-#define com_jme3_bullet_PhysicsSpace_AXIS_X 0L
-#undef com_jme3_bullet_PhysicsSpace_AXIS_Y
-#define com_jme3_bullet_PhysicsSpace_AXIS_Y 1L
-#undef com_jme3_bullet_PhysicsSpace_AXIS_Z
-#define com_jme3_bullet_PhysicsSpace_AXIS_Z 2L
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    createPhysicsSpace
- * Signature: (FFFFFFIZ)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_PhysicsSpace_createPhysicsSpace
-  (JNIEnv *, jobject, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jint, jboolean);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    stepSimulation
- * Signature: (JFIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_stepSimulation
-  (JNIEnv *, jobject, jlong, jfloat, jint, jfloat);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    addCollisionObject
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCollisionObject
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    removeCollisionObject
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCollisionObject
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    addRigidBody
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addRigidBody
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    removeRigidBody
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeRigidBody
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    addCharacterObject
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addCharacterObject
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    removeCharacterObject
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeCharacterObject
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    addAction
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addAction
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    removeAction
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeAction
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    addVehicle
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addVehicle
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    removeVehicle
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeVehicle
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    addConstraint
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addConstraint
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    addConstraintC
- * Signature: (JJZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_addConstraintC
-  (JNIEnv *, jobject, jlong, jlong, jboolean);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    removeConstraint
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_removeConstraint
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    setGravity
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_setGravity
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    rayTest_native
- * Signature: (Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;JLjava/util/List;I)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_rayTest_1native
-  (JNIEnv *, jobject, jobject, jobject, jlong, jobject, jint);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    sweepTest_native
- * Signature: (JLcom/jme3/math/Transform;Lcom/jme3/math/Transform;JLjava/util/List;F)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_sweepTest_1native
-  (JNIEnv *, jobject, jlong, jobject, jobject, jlong, jobject, jfloat);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    setSolverNumIterations
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_setSolverNumIterations
-  (JNIEnv *, jobject, jlong, jint);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    initNativePhysics
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_initNativePhysics
-  (JNIEnv *, jclass);
-
-/*
- * Class:     com_jme3_bullet_PhysicsSpace
- * Method:    finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_PhysicsSpace_finalizeNative
-  (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 13
jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace_BroadphaseType.h

@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_PhysicsSpace_BroadphaseType */
-
-#ifndef _Included_com_jme3_bullet_PhysicsSpace_BroadphaseType
-#define _Included_com_jme3_bullet_PhysicsSpace_BroadphaseType
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 173
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionEvent.h

@@ -1,173 +0,0 @@
-/* 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

+ 37 - 1
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionObject.cpp

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -143,6 +143,42 @@ extern "C" {
         }
     }
 
+    /*
+     * Class:     com_jme3_bullet_collision_PhysicsCollisionObject
+     * Method:    getCollisionFlags
+     * Signature: (J)I
+     */
+    JNIEXPORT jint JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_getCollisionFlags
+    (JNIEnv *env, jobject object, jlong 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.");
+            return 0;
+        }
+
+        jint result = collisionObject->getCollisionFlags();
+        return result;
+    }
+
+    /*
+     * Class:     com_jme3_bullet_collision_PhysicsCollisionObject
+     * Method:    setCollisionFlags
+     * Signature: (JI)V
+     */
+    JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_setCollisionFlags
+    (JNIEnv *env, jobject object, jlong objectId, jint desiredFlags) {
+        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.");
+            return;
+        }
+
+        collisionObject->setCollisionFlags(desiredFlags);
+    }
+
+
 #ifdef __cplusplus
 }
 #endif

+ 0 - 87
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionObject.h

@@ -1,87 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_PhysicsCollisionObject */
-
-#ifndef _Included_com_jme3_bullet_collision_PhysicsCollisionObject
-#define _Included_com_jme3_bullet_collision_PhysicsCollisionObject
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_NONE
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_NONE 0L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_01
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_01 1L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_02
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_02 2L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_03
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_03 4L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_04
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_04 8L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_05
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_05 16L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_06
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_06 32L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_07
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_07 64L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_08
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_08 128L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_09
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_09 256L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_10
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_10 512L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_11
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_11 1024L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_12
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_12 2048L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_13
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_13 4096L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_14
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_14 8192L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_15
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_15 16384L
-#undef com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_16
-#define com_jme3_bullet_collision_PhysicsCollisionObject_COLLISION_GROUP_16 32768L
-/*
- * Class:     com_jme3_bullet_collision_PhysicsCollisionObject
- * Method:    initUserPointer
- * Signature: (JII)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_initUserPointer
-  (JNIEnv *, jobject, jlong, jint, jint);
-
-/*
- * Class:     com_jme3_bullet_collision_PhysicsCollisionObject
- * Method:    attachCollisionShape
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_attachCollisionShape
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_collision_PhysicsCollisionObject
- * Method:    setCollisionGroup
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_setCollisionGroup
-  (JNIEnv *, jobject, jlong, jint);
-
-/*
- * Class:     com_jme3_bullet_collision_PhysicsCollisionObject
- * Method:    setCollideWithGroups
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_setCollideWithGroups
-  (JNIEnv *, jobject, jlong, jint);
-
-/*
- * Class:     com_jme3_bullet_collision_PhysicsCollisionObject
- * Method:    finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_PhysicsCollisionObject_finalizeNative
-  (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 21
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_BoxCollisionShape.h

@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_BoxCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_BoxCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_BoxCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_BoxCollisionShape
- * Method:    createShape
- * Signature: (Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_BoxCollisionShape_createShape
-  (JNIEnv *, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 21
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.h

@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_CapsuleCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_CapsuleCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_CapsuleCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_CapsuleCollisionShape
- * Method:    createShape
- * Signature: (IFF)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CapsuleCollisionShape_createShape
-  (JNIEnv *, jobject, jint, jfloat, jfloat);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 45
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CollisionShape.h

@@ -1,45 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_CollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_CollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_CollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_CollisionShape
- * Method:    getMargin
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_getMargin
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_CollisionShape
- * Method:    setLocalScaling
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_setLocalScaling
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_CollisionShape
- * Method:    setMargin
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_setMargin
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_CollisionShape
- * Method:    finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_CollisionShape_finalizeNative
-  (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 37
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CompoundCollisionShape.h

@@ -1,37 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_CompoundCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_CompoundCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_CompoundCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_CompoundCollisionShape
- * Method:    createShape
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_createShape
-  (JNIEnv *, jobject);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_CompoundCollisionShape
- * Method:    addChildShape
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_addChildShape
-  (JNIEnv *, jobject, jlong, jlong, jobject, jobject);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_CompoundCollisionShape
- * Method:    removeChildShape
- * Signature: (JJ)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CompoundCollisionShape_removeChildShape
-  (JNIEnv *, jobject, jlong, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 21
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_ConeCollisionShape.h

@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_ConeCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_ConeCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_ConeCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_ConeCollisionShape
- * Method:    createShape
- * Signature: (IFF)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_ConeCollisionShape_createShape
-  (JNIEnv *, jobject, jint, jfloat, jfloat);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 21
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CylinderCollisionShape.h

@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_CylinderCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_CylinderCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_CylinderCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_CylinderCollisionShape
- * Method:    createShape
- * Signature: (ILcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_CylinderCollisionShape_createShape
-  (JNIEnv *, jobject, jint, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 29
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_GImpactCollisionShape.h

@@ -1,29 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_GImpactCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_GImpactCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_GImpactCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_GImpactCollisionShape
- * Method:    createShape
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_GImpactCollisionShape_createShape
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_GImpactCollisionShape
- * Method:    finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_GImpactCollisionShape_finalizeNative
-  (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 21
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.h

@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_HeightfieldCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_HeightfieldCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_HeightfieldCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_HeightfieldCollisionShape
- * Method:    createShape
- * Signature: (IILjava/nio/ByteBuffer;FFFIZ)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_HeightfieldCollisionShape_createShape
-  (JNIEnv *, jobject, jint, jint, jobject, jfloat, jfloat, jfloat, jint, jboolean);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 21
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_HullCollisionShape.h

@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_HullCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_HullCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_HullCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_HullCollisionShape
- * Method:    createShape
- * Signature: (Ljava/nio/ByteBuffer;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_HullCollisionShape_createShape
-  (JNIEnv *, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 45
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_MeshCollisionShape.h

@@ -1,45 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_MeshCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_MeshCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_MeshCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_MeshCollisionShape
- * Method:    setBVH
- * Signature: ([BJ)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_setBVH
-  (JNIEnv *, jobject, jbyteArray, jlong);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_MeshCollisionShape
- * Method:    saveBVH
- * Signature: (J)[B
- */
-JNIEXPORT jbyteArray JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_saveBVH
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_MeshCollisionShape
- * Method:    createShape
- * Signature: (ZZJ)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_createShape
-  (JNIEnv *, jobject, jboolean, jboolean, jlong);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_MeshCollisionShape
- * Method:    finalizeNative
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_collision_shapes_MeshCollisionShape_finalizeNative
-  (JNIEnv *, jobject, jlong, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 21
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_PlaneCollisionShape.h

@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_PlaneCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_PlaneCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_PlaneCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_PlaneCollisionShape
- * Method:    createShape
- * Signature: (Lcom/jme3/math/Vector3f;F)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_PlaneCollisionShape_createShape
-  (JNIEnv *, jobject, jobject, jfloat);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 45
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_SimplexCollisionShape.h

@@ -1,45 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_SimplexCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_SimplexCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_SimplexCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method:    createShape
- * Signature: (Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2
-  (JNIEnv *, jobject, jobject);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method:    createShape
- * Signature: (Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2
-  (JNIEnv *, jobject, jobject, jobject);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method:    createShape
- * Signature: (Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2
-  (JNIEnv *, jobject, jobject, jobject, jobject);
-
-/*
- * Class:     com_jme3_bullet_collision_shapes_SimplexCollisionShape
- * Method:    createShape
- * Signature: (Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SimplexCollisionShape_createShape__Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2Lcom_jme3_math_Vector3f_2
-  (JNIEnv *, jobject, jobject, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 21
jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_SphereCollisionShape.h

@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_collision_shapes_SphereCollisionShape */
-
-#ifndef _Included_com_jme3_bullet_collision_shapes_SphereCollisionShape
-#define _Included_com_jme3_bullet_collision_shapes_SphereCollisionShape
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_collision_shapes_SphereCollisionShape
- * Method:    createShape
- * Signature: (F)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_collision_shapes_SphereCollisionShape_createShape
-  (JNIEnv *, jobject, jfloat);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 37
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_ConeJoint.h

@@ -1,37 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_joints_ConeJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_ConeJoint
-#define _Included_com_jme3_bullet_joints_ConeJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_joints_ConeJoint
- * Method:    setLimit
- * Signature: (JFFF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_ConeJoint_setLimit
-  (JNIEnv *, jobject, jlong, jfloat, jfloat, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_ConeJoint
- * Method:    setAngularOnly
- * Signature: (JZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_ConeJoint_setAngularOnly
-  (JNIEnv *, jobject, jlong, jboolean);
-
-/*
- * Class:     com_jme3_bullet_joints_ConeJoint
- * Method:    createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_ConeJoint_createJoint
-  (JNIEnv *, jobject, jlong, jlong, jobject, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 1 - 1
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_HingeJoint.cpp

@@ -85,7 +85,7 @@ extern "C" {
             env->ThrowNew(newExc, "The native object does not exist.");
             return 0;
         }
-        return joint->getMotorTargetVelosity();
+        return joint->getMotorTargetVelocity();
     }
 
     /*

+ 0 - 101
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_HingeJoint.h

@@ -1,101 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_joints_HingeJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_HingeJoint
-#define _Included_com_jme3_bullet_joints_HingeJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_joints_HingeJoint
- * Method:    enableMotor
- * Signature: (JZFF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_enableMotor
-  (JNIEnv *, jobject, jlong, jboolean, jfloat, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_HingeJoint
- * Method:    getEnableAngularMotor
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_HingeJoint_getEnableAngularMotor
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_HingeJoint
- * Method:    getMotorTargetVelocity
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getMotorTargetVelocity
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_HingeJoint
- * Method:    getMaxMotorImpulse
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getMaxMotorImpulse
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_HingeJoint
- * Method:    setLimit
- * Signature: (JFF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setLimit__JFF
-  (JNIEnv *, jobject, jlong, jfloat, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_HingeJoint
- * Method:    setLimit
- * Signature: (JFFFFF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setLimit__JFFFFF
-  (JNIEnv *, jobject, jlong, jfloat, jfloat, jfloat, jfloat, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_HingeJoint
- * Method:    getUpperLimit
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getUpperLimit
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_HingeJoint
- * Method:    getLowerLimit
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getLowerLimit
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_HingeJoint
- * Method:    setAngularOnly
- * Signature: (JZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_HingeJoint_setAngularOnly
-  (JNIEnv *, jobject, jlong, jboolean);
-
-/*
- * Class:     com_jme3_bullet_joints_HingeJoint
- * Method:    getHingeAngle
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_HingeJoint_getHingeAngle
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_HingeJoint
- * Method:    createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_HingeJoint_createJoint
-  (JNIEnv *, jobject, jlong, jlong, jobject, jobject, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 17 - 1
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_PhysicsJoint.cpp

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -56,6 +56,22 @@ extern "C" {
         return joint->getAppliedImpulse();
     }
 
+    /*
+     * Class:     com_jme3_bullet_joints_PhysicsJoint
+     * Method:    finalizeNative
+     * Signature: (J)V
+     */
+    JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_PhysicsJoint_finalizeNative
+    (JNIEnv * env, jobject object, jlong 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.");
+            return;
+        }
+        delete(joint);
+    }
+
 #ifdef __cplusplus
 }
 #endif

+ 0 - 29
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_PhysicsJoint.h

@@ -1,29 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_joints_PhysicsJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_PhysicsJoint
-#define _Included_com_jme3_bullet_joints_PhysicsJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_joints_PhysicsJoint
- * Method:    getAppliedImpulse
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_PhysicsJoint_getAppliedImpulse
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_PhysicsJoint
- * Method:    finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_PhysicsJoint_finalizeNative
-  (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 4 - 4
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_Point2PointJoint.cpp

@@ -111,13 +111,13 @@ extern "C" {
      */
     JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getImpulseClamp
     (JNIEnv * env, jobject object, jlong jointId) {
-        btPoint2PointConstraint* joint = reinterpret_cast<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.");
             return 0;
         }
-        return joint->m_setting.m_damping;
+        return joint->m_setting.m_impulseClamp;
     }
 
     /*
@@ -127,13 +127,13 @@ extern "C" {
      */
     JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getTau
     (JNIEnv * env, jobject object, jlong jointId) {
-        btPoint2PointConstraint* joint = reinterpret_cast<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.");
             return 0;
         }
-        return joint->m_setting.m_damping;
+        return joint->m_setting.m_tau;
     }
 
     /*

+ 0 - 69
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_Point2PointJoint.h

@@ -1,69 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_joints_Point2PointJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_Point2PointJoint
-#define _Included_com_jme3_bullet_joints_Point2PointJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_joints_Point2PointJoint
- * Method:    setDamping
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setDamping
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_Point2PointJoint
- * Method:    setImpulseClamp
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setImpulseClamp
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_Point2PointJoint
- * Method:    setTau
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_setTau
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_Point2PointJoint
- * Method:    getDamping
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getDamping
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_Point2PointJoint
- * Method:    getImpulseClamp
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getImpulseClamp
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_Point2PointJoint
- * Method:    getTau
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_getTau
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_Point2PointJoint
- * Method:    createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_Point2PointJoint_createJoint
-  (JNIEnv *, jobject, jlong, jlong, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 69
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofJoint.h

@@ -1,69 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_joints_SixDofJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_SixDofJoint
-#define _Included_com_jme3_bullet_joints_SixDofJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_joints_SixDofJoint
- * Method:    getRotationalLimitMotor
- * Signature: (JI)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getRotationalLimitMotor
-  (JNIEnv *, jobject, jlong, jint);
-
-/*
- * Class:     com_jme3_bullet_joints_SixDofJoint
- * Method:    getTranslationalLimitMotor
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_getTranslationalLimitMotor
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SixDofJoint
- * Method:    setLinearUpperLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearUpperLimit
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_joints_SixDofJoint
- * Method:    setLinearLowerLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setLinearLowerLimit
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_joints_SixDofJoint
- * Method:    setAngularUpperLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularUpperLimit
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_joints_SixDofJoint
- * Method:    setAngularLowerLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofJoint_setAngularLowerLimit
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_joints_SixDofJoint
- * Method:    createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Z)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofJoint_createJoint
-  (JNIEnv *, jobject, jlong, jlong, jobject, jobject, jobject, jobject, jboolean);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 61
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofSpringJoint.h

@@ -1,61 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_joints_SixDofSpringJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_SixDofSpringJoint
-#define _Included_com_jme3_bullet_joints_SixDofSpringJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_joints_SixDofSpringJoint
- * Method:    enableSpring
- * Signature: (JIZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_enableSpring
-  (JNIEnv *, jobject, jlong, jint, jboolean);
-
-/*
- * Class:     com_jme3_bullet_joints_SixDofSpringJoint
- * Method:    setStiffness
- * Signature: (JIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setStiffness
-  (JNIEnv *, jobject, jlong, jint, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SixDofSpringJoint
- * Method:    setDamping
- * Signature: (JIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setDamping
-  (JNIEnv *, jobject, jlong, jint, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SixDofSpringJoint
- * Method:    setEquilibriumPoint
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibriumPoint__J
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SixDofSpringJoint
- * Method:    setEquilibriumPoint
- * Signature: (JI)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_setEquilibriumPoint__JI
-  (JNIEnv *, jobject, jlong, jint);
-
-/*
- * Class:     com_jme3_bullet_joints_SixDofSpringJoint
- * Method:    createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Z)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SixDofSpringJoint_createJoint
-  (JNIEnv *, jobject, jlong, jlong, jobject, jobject, jobject, jobject, jboolean);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 469
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SliderJoint.h

@@ -1,469 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_joints_SliderJoint */
-
-#ifndef _Included_com_jme3_bullet_joints_SliderJoint
-#define _Included_com_jme3_bullet_joints_SliderJoint
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getLowerLinLimit
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getLowerLinLimit
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setLowerLinLimit
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setLowerLinLimit
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getUpperLinLimit
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getUpperLinLimit
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setUpperLinLimit
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setUpperLinLimit
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getLowerAngLimit
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getLowerAngLimit
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setLowerAngLimit
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setLowerAngLimit
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getUpperAngLimit
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getUpperAngLimit
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setUpperAngLimit
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setUpperAngLimit
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getSoftnessDirLin
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessDirLin
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setSoftnessDirLin
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessDirLin
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getRestitutionDirLin
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionDirLin
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setRestitutionDirLin
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionDirLin
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getDampingDirLin
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingDirLin
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setDampingDirLin
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingDirLin
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getSoftnessDirAng
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessDirAng
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setSoftnessDirAng
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessDirAng
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getRestitutionDirAng
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionDirAng
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setRestitutionDirAng
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionDirAng
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getDampingDirAng
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingDirAng
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setDampingDirAng
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingDirAng
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getSoftnessLimLin
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessLimLin
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setSoftnessLimLin
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessLimLin
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getRestitutionLimLin
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionLimLin
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setRestitutionLimLin
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionLimLin
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getDampingLimLin
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingLimLin
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setDampingLimLin
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingLimLin
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getSoftnessLimAng
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessLimAng
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setSoftnessLimAng
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessLimAng
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getRestitutionLimAng
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionLimAng
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setRestitutionLimAng
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionLimAng
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getDampingLimAng
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingLimAng
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setDampingLimAng
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingLimAng
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getSoftnessOrthoLin
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessOrthoLin
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setSoftnessOrthoLin
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessOrthoLin
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getRestitutionOrthoLin
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionOrthoLin
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setRestitutionOrthoLin
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionOrthoLin
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getDampingOrthoLin
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingOrthoLin
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setDampingOrthoLin
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingOrthoLin
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getSoftnessOrthoAng
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getSoftnessOrthoAng
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setSoftnessOrthoAng
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setSoftnessOrthoAng
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getRestitutionOrthoAng
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getRestitutionOrthoAng
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setRestitutionOrthoAng
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setRestitutionOrthoAng
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getDampingOrthoAng
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getDampingOrthoAng
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setDampingOrthoAng
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setDampingOrthoAng
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    isPoweredLinMotor
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_SliderJoint_isPoweredLinMotor
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setPoweredLinMotor
- * Signature: (JZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setPoweredLinMotor
-  (JNIEnv *, jobject, jlong, jboolean);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getTargetLinMotorVelocity
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getTargetLinMotorVelocity
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setTargetLinMotorVelocity
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setTargetLinMotorVelocity
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getMaxLinMotorForce
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getMaxLinMotorForce
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setMaxLinMotorForce
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setMaxLinMotorForce
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    isPoweredAngMotor
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_SliderJoint_isPoweredAngMotor
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setPoweredAngMotor
- * Signature: (JZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setPoweredAngMotor
-  (JNIEnv *, jobject, jlong, jboolean);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getTargetAngMotorVelocity
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getTargetAngMotorVelocity
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setTargetAngMotorVelocity
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setTargetAngMotorVelocity
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    getMaxAngMotorForce
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_SliderJoint_getMaxAngMotorForce
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    setMaxAngMotorForce
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_SliderJoint_setMaxAngMotorForce
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_SliderJoint
- * Method:    createJoint
- * Signature: (JJLcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Matrix3f;Z)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_joints_SliderJoint_createJoint
-  (JNIEnv *, jobject, jlong, jlong, jobject, jobject, jobject, jobject, jboolean);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 173
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_RotationalLimitMotor.h

@@ -1,173 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_joints_motors_RotationalLimitMotor */
-
-#ifndef _Included_com_jme3_bullet_joints_motors_RotationalLimitMotor
-#define _Included_com_jme3_bullet_joints_motors_RotationalLimitMotor
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    getLoLimit
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getLoLimit
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    setLoLimit
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setLoLimit
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    getHiLimit
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getHiLimit
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    setHiLimit
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setHiLimit
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    getTargetVelocity
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getTargetVelocity
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    setTargetVelocity
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setTargetVelocity
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    getMaxMotorForce
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getMaxMotorForce
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    setMaxMotorForce
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setMaxMotorForce
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    getMaxLimitForce
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getMaxLimitForce
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    setMaxLimitForce
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setMaxLimitForce
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    getDamping
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getDamping
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    setDamping
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setDamping
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    getLimitSoftness
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getLimitSoftness
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    setLimitSoftness
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setLimitSoftness
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    getERP
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getERP
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    setERP
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setERP
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    getBounce
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_getBounce
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    setBounce
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setBounce
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    isEnableMotor
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_isEnableMotor
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_RotationalLimitMotor
- * Method:    setEnableMotor
- * Signature: (JZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_RotationalLimitMotor_setEnableMotor
-  (JNIEnv *, jobject, jlong, jboolean);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 2 - 2
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_TranslationalLimitMotor.cpp

@@ -141,9 +141,9 @@ extern "C" {
      * Method:    getLimitSoftness
      * Signature: (J)F
      */
-    JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getLetLimitSoftness
+    JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getLimitSoftness
     (JNIEnv *env, jobject object, jlong motorId) {
-        btTranslationalLimitMotor* motor = reinterpret_cast<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.");

+ 0 - 109
jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_TranslationalLimitMotor.h

@@ -1,109 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_joints_motors_TranslationalLimitMotor */
-
-#ifndef _Included_com_jme3_bullet_joints_motors_TranslationalLimitMotor
-#define _Included_com_jme3_bullet_joints_motors_TranslationalLimitMotor
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    getLowerLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getLowerLimit
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    setLowerLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setLowerLimit
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    getUpperLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getUpperLimit
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    setUpperLimit
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setUpperLimit
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    getAccumulatedImpulse
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getAccumulatedImpulse
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    setAccumulatedImpulse
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setAccumulatedImpulse
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    getLimitSoftness
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getLimitSoftness
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    setLimitSoftness
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setLimitSoftness
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    getDamping
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getDamping
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    setDamping
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setDamping
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    getRestitution
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_getRestitution
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_joints_motors_TranslationalLimitMotor
- * Method:    setRestitution
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_joints_motors_TranslationalLimitMotor_setRestitution
-  (JNIEnv *, jobject, jlong, jfloat);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 331
jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsCharacter.h

@@ -1,331 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_objects_PhysicsCharacter */
-
-#ifndef _Included_com_jme3_bullet_objects_PhysicsCharacter
-#define _Included_com_jme3_bullet_objects_PhysicsCharacter
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_NONE
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_NONE 0L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_01
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_01 1L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_02
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_02 2L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_03
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_03 4L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_04
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_04 8L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_05
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_05 16L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_06
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_06 32L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_07
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_07 64L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_08
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_08 128L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_09
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_09 256L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_10
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_10 512L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_11
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_11 1024L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_12
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_12 2048L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_13
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_13 4096L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_14
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_14 8192L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_15
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_15 16384L
-#undef com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_16
-#define com_jme3_bullet_objects_PhysicsCharacter_COLLISION_GROUP_16 32768L
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    createGhostObject
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_createGhostObject
-  (JNIEnv *, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    setCharacterFlags
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setCharacterFlags
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    createCharacterObject
- * Signature: (JJF)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_createCharacterObject
-  (JNIEnv *, jobject, jlong, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    warp
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_warp
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    setWalkDirection
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setWalkDirection
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    setUp
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setUp
-    (JNIEnv *, jobject , jlong , jobject );
-
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    setAngularVelocity
-  * Signature: (JLcom/jme3/math/Vector3f;)V
-  */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setAngularVelocity
-    (JNIEnv *, jobject , jlong , jobject ) ;
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    getAngularVelocity
-  * Signature: (JLcom/jme3/math/Vector3f;)V
-  */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getAngularVelocity
-   (JNIEnv *, jobject , jlong , jobject );
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    setLinearVelocity
-  * Signature: (JLcom/jme3/math/Vector3f;)V
-  */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setLinearVelocity
-    (JNIEnv *, jobject , jlong , jobject );
-
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    getLinearVelocity
-  * Signature: (JLcom/jme3/math/Vector3f;)V
-  */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getLinearVelocity
-   (JNIEnv *, jobject , jlong , jobject );
-
-
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    setFallSpeed
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setFallSpeed
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    setJumpSpeed
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setJumpSpeed
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    setGravity
- * Signature:  (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setGravity
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    getGravity
- * Signature:  (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getGravity
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    setLinearDamping
-  * Signature: (JF)V
-  */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setLinearDamping
-   (JNIEnv *, jobject , jlong ,jfloat );
-
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    getLinearDamping
-  * Signature: (J)F
-  */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getLinearDamping
-    (JNIEnv *, jobject , jlong );
-
-
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    setAngularDamping
-  * Signature: (JF)V
-  */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setAngularDamping
-    (JNIEnv *, jobject , jlong ,jfloat );
-
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    getAngularDamping
-  * Signature: (J)F
-  */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getAngularDamping
-    (JNIEnv *, jobject , jlong );
-
-  
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    setStepHeight
-  * Signature: (JF)V
-  */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setStepHeight
-    (JNIEnv *, jobject , jlong ,jfloat );
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    getStepHeight
-  * Signature: (J)F
-  */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getStepHeight
-    (JNIEnv *, jobject , jlong );
-
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    setMaxSlope
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setMaxSlope
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    getMaxSlope
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getMaxSlope
-  (JNIEnv *, jobject, jlong);
-
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    setMaxPenetrationDepth
-  * Signature: (JF)V
-  */
-  JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setMaxPenetrationDepth
-    (JNIEnv *, jobject , jlong , jfloat );
-
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    getMaxPenetrationDepth
-  * Signature: (J)F
-  */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getMaxPenetrationDepth
-    (JNIEnv *, jobject , jlong );
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    onGround
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_onGround
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    jump
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_jump
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
-  * Class:     com_jme3_bullet_objects_PhysicsCharacter
-  * Method:    applyImpulse
-  * Signature: (JLcom/jme3/math/Vector3f;)V
-  */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_applyImpulse
-    (JNIEnv *, jobject , jlong ,jobject );
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    getPhysicsLocation
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getPhysicsLocation
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    setCcdSweptSphereRadius
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setCcdSweptSphereRadius
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    setCcdMotionThreshold
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_setCcdMotionThreshold
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    getCcdSweptSphereRadius
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getCcdSweptSphereRadius
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    getCcdMotionThreshold
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getCcdMotionThreshold
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    getCcdSquareMotionThreshold
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_getCcdSquareMotionThreshold
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsCharacter
- * Method:    finalizeNativeCharacter
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsCharacter_finalizeNativeCharacter
-  (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 167
jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsGhostObject.h

@@ -1,167 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_objects_PhysicsGhostObject */
-
-#ifndef _Included_com_jme3_bullet_objects_PhysicsGhostObject
-#define _Included_com_jme3_bullet_objects_PhysicsGhostObject
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_NONE
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_NONE 0L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_01
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_01 1L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_02
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_02 2L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_03
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_03 4L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_04
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_04 8L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_05
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_05 16L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_06
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_06 32L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_07
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_07 64L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_08
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_08 128L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_09
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_09 256L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_10
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_10 512L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_11
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_11 1024L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_12
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_12 2048L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_13
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_13 4096L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_14
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_14 8192L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_15
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_15 16384L
-#undef com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_16
-#define com_jme3_bullet_objects_PhysicsGhostObject_COLLISION_GROUP_16 32768L
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    createGhostObject
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_createGhostObject
-  (JNIEnv *, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    setGhostFlags
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setGhostFlags
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    setPhysicsLocation
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setPhysicsLocation
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    setPhysicsRotation
- * Signature: (JLcom/jme3/math/Matrix3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setPhysicsRotation__JLcom_jme3_math_Matrix3f_2
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    setPhysicsRotation
- * Signature: (JLcom/jme3/math/Quaternion;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setPhysicsRotation__JLcom_jme3_math_Quaternion_2
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    getPhysicsLocation
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getPhysicsLocation
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    getPhysicsRotation
- * Signature: (JLcom/jme3/math/Quaternion;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getPhysicsRotation
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    getPhysicsRotationMatrix
- * Signature: (JLcom/jme3/math/Matrix3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getPhysicsRotationMatrix
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    getOverlappingObjects
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getOverlappingObjects
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    getOverlappingCount
- * Signature: (J)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getOverlappingCount
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    setCcdSweptSphereRadius
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setCcdSweptSphereRadius
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    setCcdMotionThreshold
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_setCcdMotionThreshold
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    getCcdSweptSphereRadius
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getCcdSweptSphereRadius
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    getCcdMotionThreshold
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getCcdMotionThreshold
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsGhostObject
- * Method:    getCcdSquareMotionThreshold
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsGhostObject_getCcdSquareMotionThreshold
-  (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 2 - 2
jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp

@@ -795,7 +795,7 @@ extern "C" {
             env->ThrowNew(newExc, "The native object does not exist.");
             return;
         }
-        body->setSleepingThresholds(value, body->getLinearSleepingThreshold());
+        body->setSleepingThresholds(value, body->getAngularSleepingThreshold());
     }
 
     /*
@@ -811,7 +811,7 @@ extern "C" {
             env->ThrowNew(newExc, "The native object does not exist.");
             return;
         }
-        body->setSleepingThresholds(body->getAngularSleepingThreshold(), value);
+        body->setSleepingThresholds(body->getLinearSleepingThreshold(), value);
     }
 
     /*

+ 0 - 447
jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h

@@ -1,447 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_objects_PhysicsRigidBody */
-
-#ifndef _Included_com_jme3_bullet_objects_PhysicsRigidBody
-#define _Included_com_jme3_bullet_objects_PhysicsRigidBody
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_NONE
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_NONE 0L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_01
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_01 1L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_02
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_02 2L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_03
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_03 4L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_04
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_04 8L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_05
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_05 16L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_06
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_06 32L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_07
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_07 64L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_08
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_08 128L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_09
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_09 256L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_10
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_10 512L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_11
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_11 1024L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_12
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_12 2048L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_13
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_13 4096L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_14
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_14 8192L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_15
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_15 16384L
-#undef com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_16
-#define com_jme3_bullet_objects_PhysicsRigidBody_COLLISION_GROUP_16 32768L
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    createRigidBody
- * Signature: (FJJ)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_createRigidBody
-  (JNIEnv *, jobject, jfloat, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    isInWorld
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_isInWorld
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setPhysicsLocation
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setPhysicsLocation
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setPhysicsRotation
- * Signature: (JLcom/jme3/math/Matrix3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setPhysicsRotation__JLcom_jme3_math_Matrix3f_2
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setPhysicsRotation
- * Signature: (JLcom/jme3/math/Quaternion;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setPhysicsRotation__JLcom_jme3_math_Quaternion_2
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getPhysicsLocation
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getPhysicsLocation
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setInverseInertiaLocal
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setInverseInertiaLocal
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getInverseInertiaLocal
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getInverseInertiaLocal
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getPhysicsRotation
- * Signature: (JLcom/jme3/math/Quaternion;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getPhysicsRotation
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getPhysicsRotationMatrix
- * Signature: (JLcom/jme3/math/Matrix3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getPhysicsRotationMatrix
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setKinematic
- * Signature: (JZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setKinematic
-  (JNIEnv *, jobject, jlong, jboolean);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setCcdSweptSphereRadius
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setCcdSweptSphereRadius
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setCcdMotionThreshold
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setCcdMotionThreshold
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getCcdSweptSphereRadius
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getCcdSweptSphereRadius
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getCcdMotionThreshold
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getCcdMotionThreshold
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getCcdSquareMotionThreshold
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getCcdSquareMotionThreshold
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setStatic
- * Signature: (JZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setStatic
-  (JNIEnv *, jobject, jlong, jboolean);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    updateMassProps
- * Signature: (JJF)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_updateMassProps
-  (JNIEnv *, jobject, jlong, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getGravity
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getGravity
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setGravity
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setGravity
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getFriction
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getFriction
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setFriction
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setFriction
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setDamping
- * Signature: (JFF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setDamping
-  (JNIEnv *, jobject, jlong, jfloat, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setAngularDamping
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularDamping
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getLinearDamping
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearDamping
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getAngularDamping
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularDamping
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getRestitution
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getRestitution
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setRestitution
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setRestitution
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getAngularVelocity
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularVelocity
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setAngularVelocity
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularVelocity
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getLinearVelocity
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearVelocity
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setLinearVelocity
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setLinearVelocity
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    applyForce
- * Signature: (JLcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyForce
-  (JNIEnv *, jobject, jlong, jobject, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    applyCentralForce
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyCentralForce
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    applyTorque
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyTorque
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    applyImpulse
- * Signature: (JLcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyImpulse
-  (JNIEnv *, jobject, jlong, jobject, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    applyTorqueImpulse
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_applyTorqueImpulse
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    clearForces
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_clearForces
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setCollisionShape
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setCollisionShape
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    activate
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_activate
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    isActive
- * Signature: (J)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_isActive
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setSleepingThresholds
- * Signature: (JFF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setSleepingThresholds
-  (JNIEnv *, jobject, jlong, jfloat, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setLinearSleepingThreshold
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setLinearSleepingThreshold
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setAngularSleepingThreshold
- * Signature: (JF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularSleepingThreshold
-  (JNIEnv *, jobject, jlong, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getLinearSleepingThreshold
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearSleepingThreshold
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getAngularSleepingThreshold
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularSleepingThreshold
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getAngularFactor
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getAngularFactor
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setAngularFactor
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setAngularFactor
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    getLinearFactor
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_getLinearFactor
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsRigidBody
- * Method:    setLinearFactor
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsRigidBody_setLinearFactor
-  (JNIEnv *, jobject, jlong, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 143
jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsVehicle.h

@@ -1,143 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_objects_PhysicsVehicle */
-
-#ifndef _Included_com_jme3_bullet_objects_PhysicsVehicle
-#define _Included_com_jme3_bullet_objects_PhysicsVehicle
-#ifdef __cplusplus
-extern "C" {
-#endif
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_NONE
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_NONE 0L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_01
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_01 1L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_02
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_02 2L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_03
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_03 4L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_04
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_04 8L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_05
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_05 16L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_06
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_06 32L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_07
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_07 64L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_08
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_08 128L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_09
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_09 256L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_10
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_10 512L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_11
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_11 1024L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_12
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_12 2048L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_13
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_13 4096L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_14
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_14 8192L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_15
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_15 16384L
-#undef com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_16
-#define com_jme3_bullet_objects_PhysicsVehicle_COLLISION_GROUP_16 32768L
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    updateWheelTransform
- * Signature: (JIZ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_updateWheelTransform
-  (JNIEnv *, jobject, jlong, jint, jboolean);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    createVehicleRaycaster
- * Signature: (JJ)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_createVehicleRaycaster
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    createRaycastVehicle
- * Signature: (JJ)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_createRaycastVehicle
-  (JNIEnv *, jobject, jlong, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    setCoordinateSystem
- * Signature: (JIII)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_setCoordinateSystem
-  (JNIEnv *, jobject, jlong, jint, jint, jint);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    addWheel
- * Signature: (JLcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;Lcom/jme3/math/Vector3f;FFLcom/jme3/bullet/objects/infos/VehicleTuning;Z)I
- */
-JNIEXPORT jint JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_addWheel
-  (JNIEnv *, jobject, jlong, jobject, jobject, jobject, jfloat, jfloat, jobject, jboolean);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    resetSuspension
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_resetSuspension
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    applyEngineForce
- * Signature: (JIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_applyEngineForce
-  (JNIEnv *, jobject, jlong, jint, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    steer
- * Signature: (JIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_steer
-  (JNIEnv *, jobject, jlong, jint, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    brake
- * Signature: (JIF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_brake
-  (JNIEnv *, jobject, jlong, jint, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    getCurrentVehicleSpeedKmHour
- * Signature: (J)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_getCurrentVehicleSpeedKmHour
-  (JNIEnv *, jobject, jlong);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    getForwardVector
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_getForwardVector
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_PhysicsVehicle
- * Method:    finalizeNative
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_PhysicsVehicle_finalizeNative
-  (JNIEnv *, jobject, jlong, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 69
jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_VehicleWheel.h

@@ -1,69 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_objects_VehicleWheel */
-
-#ifndef _Included_com_jme3_bullet_objects_VehicleWheel
-#define _Included_com_jme3_bullet_objects_VehicleWheel
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_objects_VehicleWheel
- * Method:    getWheelLocation
- * Signature: (JILcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getWheelLocation
-  (JNIEnv *, jobject, jlong, jint, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_VehicleWheel
- * Method:    getWheelRotation
- * Signature: (JILcom/jme3/math/Matrix3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getWheelRotation
-  (JNIEnv *, jobject, jlong, jint, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_VehicleWheel
- * Method:    applyInfo
- * Signature: (JIFFFFFFFFZF)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_applyInfo
-  (JNIEnv *, jobject, jlong, jint, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat, jboolean, jfloat);
-
-/*
- * Class:     com_jme3_bullet_objects_VehicleWheel
- * Method:    getCollisionLocation
- * Signature: (JILcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getCollisionLocation
-  (JNIEnv *, jobject, jlong, jint, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_VehicleWheel
- * Method:    getCollisionNormal
- * Signature: (JILcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getCollisionNormal
-  (JNIEnv *, jobject, jlong, jint, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_VehicleWheel
- * Method:    getSkidInfo
- * Signature: (JI)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getSkidInfo
-  (JNIEnv *, jobject, jlong, jint);
-
-/*
- * Class:     com_jme3_bullet_objects_VehicleWheel
- * Method:    getDeltaRotation
- * Signature: (JI)F
- */
-JNIEXPORT jfloat JNICALL Java_com_jme3_bullet_objects_VehicleWheel_getDeltaRotation
-  (JNIEnv *, jobject, jlong, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 61
jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_infos_RigidBodyMotionState.h

@@ -1,61 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_objects_infos_RigidBodyMotionState */
-
-#ifndef _Included_com_jme3_bullet_objects_infos_RigidBodyMotionState
-#define _Included_com_jme3_bullet_objects_infos_RigidBodyMotionState
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_objects_infos_RigidBodyMotionState
- * Method:    createMotionState
- * Signature: ()J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_createMotionState
-  (JNIEnv *, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_infos_RigidBodyMotionState
- * Method:    applyTransform
- * Signature: (JLcom/jme3/math/Vector3f;Lcom/jme3/math/Quaternion;)Z
- */
-JNIEXPORT jboolean JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_applyTransform
-  (JNIEnv *, jobject, jlong, jobject, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_infos_RigidBodyMotionState
- * Method:    getWorldLocation
- * Signature: (JLcom/jme3/math/Vector3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_getWorldLocation
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_infos_RigidBodyMotionState
- * Method:    getWorldRotation
- * Signature: (JLcom/jme3/math/Matrix3f;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_getWorldRotation
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_infos_RigidBodyMotionState
- * Method:    getWorldRotationQuat
- * Signature: (JLcom/jme3/math/Quaternion;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_getWorldRotationQuat
-  (JNIEnv *, jobject, jlong, jobject);
-
-/*
- * Class:     com_jme3_bullet_objects_infos_RigidBodyMotionState
- * Method:    finalizeNative
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_infos_RigidBodyMotionState_finalizeNative
-  (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 21
jme3-bullet-native/src/native/cpp/com_jme3_bullet_util_DebugShapeFactory.h

@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_util_DebugShapeFactory */
-
-#ifndef _Included_com_jme3_bullet_util_DebugShapeFactory
-#define _Included_com_jme3_bullet_util_DebugShapeFactory
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_util_DebugShapeFactory
- * Method:    getVertices
- * Signature: (JLcom/jme3/bullet/util/DebugMeshCallback;)V
- */
-JNIEXPORT void JNICALL Java_com_jme3_bullet_util_DebugShapeFactory_getVertices
-  (JNIEnv *, jclass, jlong, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 0 - 21
jme3-bullet-native/src/native/cpp/com_jme3_bullet_util_NativeMeshUtil.h

@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class com_jme3_bullet_util_NativeMeshUtil */
-
-#ifndef _Included_com_jme3_bullet_util_NativeMeshUtil
-#define _Included_com_jme3_bullet_util_NativeMeshUtil
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- * Class:     com_jme3_bullet_util_NativeMeshUtil
- * Method:    createTriangleIndexVertexArray
- * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;IIII)J
- */
-JNIEXPORT jlong JNICALL Java_com_jme3_bullet_util_NativeMeshUtil_createTriangleIndexVertexArray
-  (JNIEnv *, jclass, jobject, jobject, jint, jint, jint, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif

+ 236 - 35
jme3-bullet/src/common/java/com/jme3/bullet/BulletAppState.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -43,66 +43,136 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /**
- * <code>BulletAppState</code> allows using bullet physics in an Application.
+ * An app state to manage a single Bullet physics space.
+ * <p>
+ * This class is shared between JBullet and Native Bullet.
  *
  * @author normenhansen
  */
 public class BulletAppState implements AppState, PhysicsTickListener {
 
+    /**
+     * true if-and-only-if the physics simulation is running (started but not
+     * yet stopped)
+     */
     protected boolean initialized = false;
     protected Application app;
+    /**
+     * manager that manages this state, set during attach
+     */
     protected AppStateManager stateManager;
+    /**
+     * executor service for physics tasks, or null if parallel simulation is not
+     * running
+     */
     protected ScheduledThreadPoolExecutor executor;
+    /**
+     * physics space managed by this state, or null if no simulation running
+     */
     protected PhysicsSpace pSpace;
+    /**
+     * threading mode to use (not null)
+     */
     protected ThreadingType threadingType = ThreadingType.SEQUENTIAL;
+    /**
+     * broadphase collision-detection algorithm for the physics space to use
+     * (not null)
+     */
     protected BroadphaseType broadphaseType = BroadphaseType.DBVT;
+    /**
+     * minimum coordinate values for the physics space when using AXIS_SWEEP
+     * broadphase algorithms (not null)
+     */
     protected Vector3f worldMin = new Vector3f(-10000f, -10000f, -10000f);
+    /**
+     * maximum coordinate values for the physics space when using AXIS_SWEEP
+     * broadphase algorithms (not null)
+     */
     protected Vector3f worldMax = new Vector3f(10000f, 10000f, 10000f);
+    /**
+     * simulation speed multiplier (default=1, paused=0)
+     */
     protected float speed = 1;
+    /**
+     * true if-and-only-if this state is enabled
+     */
     protected boolean active = true;
+    /**
+     * true if-and-only-if debug visualization is enabled
+     */
     protected boolean debugEnabled = false;
+    /**
+     * app state to manage the debug visualization, or null if none
+     */
     protected BulletDebugAppState debugAppState;
+    /**
+     * time interval between frames (in seconds) from the most recent update
+     */
     protected float tpf;
+    /**
+     * current physics task, or null if none
+     */
     protected Future physicsFuture;
 
     /**
-     * Creates a new BulletAppState running a PhysicsSpace for physics
-     * simulation, use getStateManager().addState(bulletAppState) to enable
-     * physics for an Application.
+     * Instantiate an app state to manage a new PhysicsSpace with DBVT collision
+     * detection.
+     * <p>
+     * Use getStateManager().addState(bulletAppState) to start physics.
      */
     public BulletAppState() {
     }
 
     /**
-     * Creates a new BulletAppState running a PhysicsSpace for physics
-     * simulation, use getStateManager().addState(bulletAppState) to enable
-     * physics for an Application.
+     * Instantiate an app state to manage a new PhysicsSpace.
+     * <p>
+     * Use getStateManager().addState(bulletAppState) to start physics.
      *
-     * @param broadphaseType The type of broadphase collision detection,
-     * BroadphaseType.DVBT is the default
+     * @param broadphaseType which broadphase collision-detection algorithm to
+     * use (not null)
      */
     public BulletAppState(BroadphaseType broadphaseType) {
         this(new Vector3f(-10000f, -10000f, -10000f), new Vector3f(10000f, 10000f, 10000f), broadphaseType);
     }
 
     /**
-     * Creates a new BulletAppState running a PhysicsSpace for physics
-     * simulation, use getStateManager().addState(bulletAppState) to enable
-     * physics for an Application. An AxisSweep broadphase is used.
+     * Instantiate an app state to manage a new PhysicsSpace with AXIS_SWEEP_3
+     * collision detection.
+     * <p>
+     * Use getStateManager().addState(bulletAppState) to start physics.
      *
-     * @param worldMin The minimum world extent
-     * @param worldMax The maximum world extent
+     * @param worldMin the desired minimum coordinate values (not null,
+     * unaffected, default=-10k,-10k,-10k)
+     * @param worldMax the desired maximum coordinate values (not null,
+     * unaffected, default=10k,10k,10k)
      */
     public BulletAppState(Vector3f worldMin, Vector3f worldMax) {
         this(worldMin, worldMax, BroadphaseType.AXIS_SWEEP_3);
     }
 
+    /**
+     * Instantiate an app state to manage a new PhysicsSpace.
+     * <p>
+     * Use getStateManager().addState(bulletAppState) to enable physics.
+     *
+     * @param worldMin the desired minimum coordinate values (not null,
+     * unaffected, default=-10k,-10k,-10k)
+     * @param worldMax the desired maximum coordinate values (not null,
+     * unaffected, default=10k,10k,10k)
+     * @param broadphaseType which broadphase collision-detection algorithm to
+     * use (not null)
+     */
     public BulletAppState(Vector3f worldMin, Vector3f worldMax, BroadphaseType broadphaseType) {
         this.worldMin.set(worldMin);
         this.worldMax.set(worldMax);
         this.broadphaseType = broadphaseType;
     }
 
+    /**
+     * Allocate the physics space and start physics for ThreadingType.PARALLEL.
+     *
+     * @return true if successful, otherwise false
+     */
     private boolean startPhysicsOnExecutor() {
         if (executor != null) {
             executor.shutdown();
@@ -145,28 +215,49 @@ public class BulletAppState implements AppState, PhysicsTickListener {
         }
     };
 
+    /**
+     * Access the PhysicsSpace managed by this state. Normally there is none
+     * until the state is attached.
+     *
+     * @return the pre-existing instance, or null if no simulation running
+     */
     public PhysicsSpace getPhysicsSpace() {
         return pSpace;
     }
 
     /**
-     * The physics system is started automatically on attaching, if you want to
-     * start it before for some reason, you can use this method.
+     * Allocate a physics space and start physics.
+     * <p>
+     * Physics starts automatically after the state is attached. To start it
+     * sooner, invoke this method.
      */
     public void startPhysics() {
         if (initialized) {
             return;
         }
-        //start physics thread(pool)
-        if (threadingType == ThreadingType.PARALLEL) {
-            startPhysicsOnExecutor();
-        } else {
-            pSpace = new PhysicsSpace(worldMin, worldMax, broadphaseType);
+
+        switch (threadingType) {
+            case PARALLEL:
+                boolean success = startPhysicsOnExecutor();
+                assert success;
+                assert pSpace != null;
+                break;
+
+            case SEQUENTIAL:
+                pSpace = new PhysicsSpace(worldMin, worldMax, broadphaseType);
+                pSpace.addTickListener(this);
+                break;
+
+            default:
+                throw new IllegalStateException(threadingType.toString());
         }
-        pSpace.addTickListener(this);
+
         initialized = true;
     }
 
+    /**
+     * Stop physics after this state is detached.
+     */
     public void stopPhysics() {
         if(!initialized){
             return;
@@ -180,32 +271,72 @@ public class BulletAppState implements AppState, PhysicsTickListener {
         initialized = false;
     }
 
+    /**
+     * Initialize this state prior to its 1st update. Should be invoked only by
+     * a subclass or by the AppStateManager.
+     *
+     * @param stateManager the manager for this state (not null)
+     * @param app the application which owns this state (not null)
+     */
     public void initialize(AppStateManager stateManager, Application app) {
         this.app = app;
         this.stateManager = stateManager;
         startPhysics();
     }
 
+    /**
+     * Test whether the physics simulation is running (started but not yet
+     * stopped).
+     *
+     * @return true if running, otherwise false
+     */
     public boolean isInitialized() {
         return initialized;
     }
 
+    /**
+     * Enable or disable this state.
+     *
+     * @param enabled true &rarr; enable, false &rarr; disable
+     */
     public void setEnabled(boolean enabled) {
         this.active = enabled;
     }
 
+    /**
+     * Test whether this state is enabled.
+     *
+     * @return true if enabled, otherwise false
+     */
     public boolean isEnabled() {
         return active;
     }
 
+    /**
+     * Alter whether debug visualization is enabled.
+     *
+     * @param debugEnabled true &rarr; enable, false &rarr; disable
+     */
     public void setDebugEnabled(boolean debugEnabled) {
         this.debugEnabled = debugEnabled;
     }
 
+
+    /**
+     * Test whether debug visualization is enabled.
+     *
+     * @return true if enabled, otherwise false
+     */
     public boolean isDebugEnabled() {
         return debugEnabled;
     }
 
+    /**
+     * Transition this state from detached to initializing. Should be invoked
+     * only by a subclass or by the AppStateManager.
+     *
+     * @param stateManager (not null)
+     */
     public void stateAttached(AppStateManager stateManager) {
         if (!initialized) {
             startPhysics();
@@ -219,9 +350,22 @@ public class BulletAppState implements AppState, PhysicsTickListener {
         }
     }
 
+    /**
+     * Transition this state from running to terminating. Should be invoked only
+     * by a subclass or by the AppStateManager.
+     *
+     * @param stateManager (not null)
+     */
     public void stateDetached(AppStateManager stateManager) {
     }
 
+    /**
+     * Update this state prior to rendering. Should be invoked only by a
+     * subclass or by the AppStateManager. Invoked once per frame, provided the
+     * state is attached and enabled.
+     *
+     * @param tpf the time interval between frames (in seconds, &ge;0)
+     */
     public void update(float tpf) {
         if (debugEnabled && debugAppState == null && pSpace != null) {
             debugAppState = new BulletDebugAppState(pSpace);
@@ -237,6 +381,13 @@ public class BulletAppState implements AppState, PhysicsTickListener {
         this.tpf = tpf;
     }
 
+    /**
+     * Render this state. Should be invoked only by a subclass or by the
+     * AppStateManager. Invoked once per frame, provided the state is attached
+     * and enabled.
+     *
+     * @param rm the render manager (not null)
+     */
     public void render(RenderManager rm) {
         if (!active) {
             return;
@@ -249,6 +400,11 @@ public class BulletAppState implements AppState, PhysicsTickListener {
         }
     }
 
+    /**
+     * Update this state after all rendering commands are flushed. Should be
+     * invoked only by a subclass or by the AppStateManager. Invoked once per
+     * frame, provided the state is attached and enabled.
+     */
     public void postRender() {
         if (physicsFuture != null) {
             try {
@@ -262,6 +418,12 @@ public class BulletAppState implements AppState, PhysicsTickListener {
         }
     }
 
+    /**
+     * Transition this state from terminating to detached. Should be invoked
+     * only by a subclass or by the AppStateManager. Invoked once for each time
+     * {@link #initialize(com.jme3.app.state.AppStateManager, com.jme3.app.Application)}
+     * is invoked.
+     */
     public void cleanup() {
         if (debugAppState != null) {
             stateManager.detach(debugAppState);
@@ -271,67 +433,106 @@ public class BulletAppState implements AppState, PhysicsTickListener {
     }
 
     /**
-     * @return the threadingType
+     * Read which type of threading this app state uses.
+     *
+     * @return the threadingType (not null)
      */
     public ThreadingType getThreadingType() {
         return threadingType;
     }
 
     /**
-     * Use before attaching state
+     * Alter which type of threading this app state uses. Not allowed after
+     * attaching the app state.
      *
-     * @param threadingType the threadingType to set
+     * @param threadingType the desired type (not null, default=SEQUENTIAL)
      */
     public void setThreadingType(ThreadingType threadingType) {
         this.threadingType = threadingType;
     }
 
     /**
-     * Use before attaching state
+     * Alter the broadphase type the physics space will use. Not allowed after
+     * attaching the app state.
+     *
+     * @param broadphaseType an enum value (not null, default=DBVT)
      */
     public void setBroadphaseType(BroadphaseType broadphaseType) {
         this.broadphaseType = broadphaseType;
     }
 
     /**
-     * Use before attaching state
+     * Alter the coordinate range. Not allowed after attaching the app state.
+     *
+     * @param worldMin the desired minimum coordinate values when using
+     * AXIS_SWEEP broadphase algorithms (not null, alias created,
+     * default=-10k,-10k,-10k)
      */
     public void setWorldMin(Vector3f worldMin) {
         this.worldMin = worldMin;
     }
 
     /**
-     * Use before attaching state
+     * Alter the coordinate range. Not allowed after attaching the app state.
+     *
+     * @param worldMax the desired maximum coordinate values when using
+     * AXIS_SWEEP broadphase algorithms (not null, alias created,
+     * default=10k,10k,10k)
      */
     public void setWorldMax(Vector3f worldMax) {
         this.worldMax = worldMax;
     }
 
+    /**
+     * Read the simulation speed.
+     *
+     * @return speed (&ge;0, default=1)
+     */
     public float getSpeed() {
         return speed;
     }
 
+    /**
+     * Alter the simulation speed.
+     *
+     * @param speed the desired speed (&ge;0, default=1)
+     */
     public void setSpeed(float speed) {
         this.speed = speed;
     }
-
+    /**
+     * Callback from Bullet, invoked just before the physics is stepped. A good
+     * time to clear/apply forces.
+     *
+     * @param space the space that is about to be stepped (not null)
+     * @param f the time per physics step (in seconds, &ge;0)
+     */
     public void prePhysicsTick(PhysicsSpace space, float f) {
     }
 
+    /**
+     * Callback from Bullet, invoked just after the physics is stepped. A good
+     * time to clear/apply forces.
+     *
+     * @param space the space that is about to be stepped (not null)
+     * @param f the time per physics step (in seconds, &ge;0)
+     */
     public void physicsTick(PhysicsSpace space, float f) {
     }
 
+    /**
+     * Enumerate threading modes.
+     */
     public enum ThreadingType {
 
         /**
-         * Default mode; user update, physics update and rendering happen
-         * sequentially (single threaded)
+         * Default mode: user update, physics update, and rendering happen
+         * sequentially. (single threaded)
          */
         SEQUENTIAL,
         /**
-         * Parallel threaded mode; physics update and rendering are executed in
-         * parallel, update order is kept.<br/> Multiple BulletAppStates will
-         * execute in parallel in this mode.
+         * Parallel threaded mode: physics update and rendering are executed in
+         * parallel, update order is maintained.
          */
         PARALLEL,
     }

+ 15 - 8
jme3-bullet/src/common/java/com/jme3/bullet/PhysicsTickListener.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,22 +32,29 @@
 package com.jme3.bullet;
 
 /**
- * Implement this interface to be called from the physics thread on a physics update.
+ * Callback interface from the physics thread, used to clear/apply forces.
+ * <p>
+ * This interface is shared between JBullet and Native Bullet.
+ *
  * @author normenhansen
  */
 public interface PhysicsTickListener {
 
     /**
-     * Called before the physics is actually stepped, use to apply forces etc.
-     * @param space the physics space
-     * @param tpf the time per frame in seconds 
+     * Callback from Bullet, invoked just before the physics is stepped. A good
+     * time to clear/apply forces.
+     *
+     * @param space the space that is about to be stepped (not null)
+     * @param tpf the time per physics step (in seconds, &ge;0)
      */
     public void prePhysicsTick(PhysicsSpace space, float tpf);
 
     /**
-     * Called after the physics has been stepped, use to check for forces etc.
-     * @param space the physics space
-     * @param tpf the time per frame in seconds
+     * Callback from Bullet, invoked just after the physics has been stepped,
+     * use to check for forces etc.
+     *
+     * @param space the space that was just stepped (not null)
+     * @param tpf the time per physics step (in seconds, &ge;0)
      */
     public void physicsTick(PhysicsSpace space, float tpf);
 

+ 14 - 7
jme3-bullet/src/common/java/com/jme3/bullet/collision/PhysicsCollisionGroupListener.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,18 +32,25 @@
 package com.jme3.bullet.collision;
 
 /**
+ * Interface to receive notifications whenever an object in a particular
+ * collision group is about to collide.
+ * <p>
+ * This interface is shared between JBullet and Native Bullet.
  *
  * @author normenhansen
  */
 public interface PhysicsCollisionGroupListener {
 
     /**
-     * Called when two physics objects of the registered group are about to collide, <i>called from physics thread</i>.<br>
-     * This is only called when the collision will happen based on the collisionGroup and collideWithGroups
-     * settings in the PhysicsCollisionObject. That is the case when <b>one</b> of the partys has the
-     * collisionGroup of the other in its collideWithGroups set.<br>
-     * @param nodeA CollisionObject #1
-     * @param nodeB CollisionObject #2
+     * Invoked when two physics objects of the registered group are about to
+     * collide. <i>invoked on the physics thread</i>.<br>
+     * This is only invoked when the collision will happen based on the
+     * collisionGroup and collideWithGroups settings in the
+     * PhysicsCollisionObject. That is the case when <b>one</b> of the parties
+     * has the collisionGroup of the other in its collideWithGroups set.
+     *
+     * @param nodeA collision object #1
+     * @param nodeB collision object #2
      * @return true if the collision should happen, false otherwise
      */
     public boolean collide(PhysicsCollisionObject nodeA, PhysicsCollisionObject nodeB);

+ 14 - 6
jme3-bullet/src/common/java/com/jme3/bullet/collision/PhysicsCollisionListener.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,16 +32,24 @@
 package com.jme3.bullet.collision;
 
 /**
- * Interface for Objects that want to be informed about collision events in the physics space
+ * Interface to receive notifications whenever an object in a particular physics
+ * space collides.
+ * <p>
+ * This interface is shared between JBullet and Native Bullet.
+ *
  * @author normenhansen
  */
 public interface PhysicsCollisionListener {
 
     /**
-     * Called when a collision happened in the PhysicsSpace, <i>called from render thread</i>.
-     * 
-     * Do not store the event object as it will be cleared after the method has finished.
-     * @param event the CollisionEvent
+     * Invoked when a collision happened in the PhysicsSpace. <i>Invoked on the
+     * render thread.</i>
+     * <p>
+     * Do not retain the event object, as it will be reused after the
+     * collision() method returns. Copy any data you need during the collide()
+     * method.
+     *
+     * @param event the event that occurred (not null, reusable)
      */
     public void collision(PhysicsCollisionEvent event);
 

+ 12 - 1
jme3-bullet/src/common/java/com/jme3/bullet/collision/RagdollCollisionListener.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -34,11 +34,22 @@ package com.jme3.bullet.collision;
 import com.jme3.animation.Bone;
 
 /**
+ * Interface to receive notifications whenever a KinematicRagdollControl
+ * collides with another physics object.
+ * <p>
+ * This interface is shared between JBullet and Native Bullet.
  *
  * @author Nehon
  */
 public interface RagdollCollisionListener {
     
+    /**
+     * Invoked when a collision involving a KinematicRagdollControl occurs.
+     *
+     * @param bone the ragdoll bone that collided (not null)
+     * @param object the collision object that collided with the bone (not null)
+     * @param event other event details (not null)
+     */    
     public void collide(Bone bone, PhysicsCollisionObject object, PhysicsCollisionEvent event);
     
 }

+ 39 - 1
jme3-bullet/src/common/java/com/jme3/bullet/collision/shapes/infos/ChildCollisionShape.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -39,24 +39,56 @@ import com.jme3.math.Vector3f;
 import java.io.IOException;
 
 /**
+ * An element of a CompoundCollisionShape, consisting of a (non-compound) child
+ * shape, offset and rotated with respect to its parent.
+ * <p>
+ * This class is shared between JBullet and Native Bullet.
  *
  * @author normenhansen
  */
 public class ChildCollisionShape implements Savable {
 
+    /**
+     * translation relative to parent shape (not null)
+     */
     public Vector3f location;
+    /**
+     * rotation relative to parent shape (not null)
+     */
     public Matrix3f rotation;
+    /**
+     * base shape (not null, not a compound shape)
+     */
     public CollisionShape shape;
 
+    /**
+     * No-argument constructor needed by SavableClassUtil. Do not invoke
+     * directly!
+     */
     public ChildCollisionShape() {
     }
 
+    /**
+     * Instantiate a child shape for use in a compound shape.
+     *
+     * @param location translation relative to the parent (not null, alias
+     * created)
+     * @param rotation rotation relative to the parent (not null, alias created)
+     * @param shape the base shape (not null, not a compound shape, alias
+     * created)
+     */
     public ChildCollisionShape(Vector3f location, Matrix3f rotation, CollisionShape shape) {
         this.location = location;
         this.rotation = rotation;
         this.shape = shape;
     }
 
+    /**
+     * Serialize this shape, for example when saving to a J3O file.
+     *
+     * @param ex exporter (not null)
+     * @throws IOException from exporter
+     */
     public void write(JmeExporter ex) throws IOException {
         OutputCapsule capsule = ex.getCapsule(this);
         capsule.write(location, "location", new Vector3f());
@@ -64,6 +96,12 @@ public class ChildCollisionShape implements Savable {
         capsule.write(shape, "shape", new BoxCollisionShape(new Vector3f(1, 1, 1)));
     }
 
+    /**
+     * De-serialize this shape, for example when loading from a J3O file.
+     *
+     * @param im importer (not null)
+     * @throws IOException from importer
+     */
     public void read(JmeImporter im) throws IOException {
         InputCapsule capsule = im.getCapsule(this);
         location = (Vector3f) capsule.readSavable("location", new Vector3f());

+ 146 - 43
jme3-bullet/src/common/java/com/jme3/bullet/control/AbstractPhysicsControl.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,87 +41,119 @@ import com.jme3.math.Vector3f;
 import com.jme3.renderer.RenderManager;
 import com.jme3.renderer.ViewPort;
 import com.jme3.scene.Spatial;
+import com.jme3.scene.control.Control;
 import com.jme3.util.clone.Cloner;
 import com.jme3.util.clone.JmeCloneable;
 import java.io.IOException;
 
 /**
- * AbstractPhysicsControl manages the lifecycle of a physics object that is
- * attached to a spatial in the SceneGraph.
+ * Manage the life cycle of a physics object linked to a spatial in a scene
+ * graph.
+ * <p>
+ * This class is shared between JBullet and Native Bullet.
  *
  * @author normenhansen
  */
 public abstract class AbstractPhysicsControl implements PhysicsControl, JmeCloneable {
 
+    /**
+     * temporary storage during calculations
+     */
     private final Quaternion tmp_inverseWorldRotation = new Quaternion();
+    /**
+     * spatial to which this control is added, or null if none
+     */
     protected Spatial spatial;
+    /**
+     * true&rarr;control is enabled, false&rarr;control is disabled
+     */
     protected boolean enabled = true;
+    /**
+     * true&rarr;body is added to the physics space, false&rarr;not added
+     */
     protected boolean added = false;
+    /**
+     * space to which the physics object is (or would be) added
+     */
     protected PhysicsSpace space = null;
+    /**
+     * true &rarr; physics coordinates match local transform, false &rarr;
+     * physics coordinates match world transform
+     */
     protected boolean applyLocal = false;
 
     /**
-     * Called when the control is added to a new spatial, create any
-     * spatial-dependent data here.
+     * Create spatial-dependent data. Invoked when this control is added to a
+     * spatial.
      *
-     * @param spat The new spatial, guaranteed not to be null
+     * @param spat the controlled spatial (not null)
      */
     protected abstract void createSpatialData(Spatial spat);
 
     /**
-     * Called when the control is removed from a spatial, remove any
-     * spatial-dependent data here.
+     * Destroy spatial-dependent data. Invoked when this control is removed from
+     * a spatial.
      *
-     * @param spat The old spatial, guaranteed not to be null
+     * @param spat the previously controlled spatial (not null)
      */
     protected abstract void removeSpatialData(Spatial spat);
 
     /**
-     * Called when the physics object is supposed to move to the spatial
-     * position.
+     * Translate the physics object to the specified location.
      *
-     * @param vec
+     * @param vec desired location (not null, unaffected)
      */
     protected abstract void setPhysicsLocation(Vector3f vec);
 
     /**
-     * Called when the physics object is supposed to move to the spatial
-     * rotation.
+     * Rotate the physics object to the specified orientation.
      *
-     * @param quat
+     * @param quat desired orientation (not null, unaffected)
      */
     protected abstract void setPhysicsRotation(Quaternion quat);
 
     /**
-     * Called when the physics object is supposed to add all objects it needs to
-     * manage to the physics space.
+     * Add all managed physics objects to the specified space.
      *
-     * @param space
+     * @param space which physics space to add to (not null)
      */
     protected abstract void addPhysics(PhysicsSpace space);
 
     /**
-     * Called when the physics object is supposed to remove all objects added to
-     * the physics space.
+     * Remove all managed physics objects from the specified space.
      *
-     * @param space
+     * @param space which physics space to remove from (not null)
      */
     protected abstract void removePhysics(PhysicsSpace space);
 
+    /**
+     * Test whether physics-space coordinates should match the spatial's local
+     * coordinates.
+     *
+     * @return true if matching local coordinates, false if matching world
+     * coordinates
+     */
     public boolean isApplyPhysicsLocal() {
         return applyLocal;
     }
 
     /**
-     * When set to true, the physics coordinates will be applied to the local
-     * translation of the Spatial
+     * Alter whether physics-space coordinates should match the spatial's local
+     * coordinates.
      *
-     * @param applyPhysicsLocal
+     * @param applyPhysicsLocal true&rarr;match local coordinates,
+     * false&rarr;match world coordinates (default=false)
      */
     public void setApplyPhysicsLocal(boolean applyPhysicsLocal) {
         applyLocal = applyPhysicsLocal;
     }
 
+    /**
+     * Access whichever spatial translation corresponds to the physics location.
+     *
+     * @return the pre-existing location vector (in physics-space coordinates,
+     * not null)
+     */
     protected Vector3f getSpatialTranslation() {
         if (applyLocal) {
             return spatial.getLocalTranslation();
@@ -129,6 +161,12 @@ public abstract class AbstractPhysicsControl implements PhysicsControl, JmeClone
         return spatial.getWorldTranslation();
     }
 
+    /**
+     * Access whichever spatial rotation corresponds to the physics rotation.
+     *
+     * @return the pre-existing quaternion (in physics-space coordinates, not
+     * null)
+     */
     protected Quaternion getSpatialRotation() {
         if (applyLocal) {
             return spatial.getLocalRotation();
@@ -137,10 +175,12 @@ public abstract class AbstractPhysicsControl implements PhysicsControl, JmeClone
     }
 
     /**
-     * Applies a physics transform to the spatial
+     * Apply a physics transform to the spatial.
      *
-     * @param worldLocation
-     * @param worldRotation
+     * @param worldLocation location vector (in physics-space coordinates, not
+     * null, unaffected)
+     * @param worldRotation orientation (in physics-space coordinates, not null,
+     * unaffected)
      */
     protected void applyPhysicsTransform(Vector3f worldLocation, Quaternion worldRotation) {
         if (enabled && spatial != null) {
@@ -162,13 +202,35 @@ public abstract class AbstractPhysicsControl implements PhysicsControl, JmeClone
         }
 
     }
-    
-    @Override   
+
+    @Deprecated
+    @Override
+    public Control cloneForSpatial(Spatial spatial) {
+        throw new UnsupportedOperationException();
+    }
+
+    /**
+     * Callback from {@link com.jme3.util.clone.Cloner} to convert this
+     * shallow-cloned control into a deep-cloned one, using the specified cloner
+     * and original to resolve copied fields.
+     *
+     * @param cloner the cloner that's cloning this control (not null)
+     * @param original the control from which this control was shallow-cloned
+     * (unused)
+     */
+    @Override  
     public void cloneFields( Cloner cloner, Object original ) { 
         this.spatial = cloner.clone(spatial);
         createSpatialData(this.spatial);
     }
          
+    /**
+     * Alter which spatial is controlled. Invoked when the control is added to
+     * or removed from a spatial. Should be invoked only by a subclass or from
+     * Spatial. Do not invoke directly from user code.
+     *
+     * @param spatial the spatial to control (or null)
+     */
     public void setSpatial(Spatial spatial) {
         if (this.spatial != null && this.spatial != spatial) {
             removeSpatialData(this.spatial);
@@ -184,6 +246,15 @@ public abstract class AbstractPhysicsControl implements PhysicsControl, JmeClone
         setPhysicsRotation(getSpatialRotation());
     }
 
+    /**
+     * Enable or disable this control.
+     * <p>
+     * When the control is disabled, the physics object is removed from physics
+     * space. When the control is enabled again, the physics object is moved to
+     * the spatial's location and then added to the physics space.
+     *
+     * @param enabled true&rarr;enable the control, false&rarr;disable it
+     */
     public void setEnabled(boolean enabled) {
         this.enabled = enabled;
         if (space != null) {
@@ -201,6 +272,11 @@ public abstract class AbstractPhysicsControl implements PhysicsControl, JmeClone
         }
     }
 
+    /**
+     * Test whether this control is enabled.
+     *
+     * @return true if enabled, otherwise false
+     */
     public boolean isEnabled() {
         return enabled;
     }
@@ -211,28 +287,48 @@ public abstract class AbstractPhysicsControl implements PhysicsControl, JmeClone
     public void render(RenderManager rm, ViewPort vp) {
     }
 
-    public void setPhysicsSpace(PhysicsSpace space) {
-        if (space == null) {
-            if (this.space != null) {
-                removePhysics(this.space);
-                added = false;
-            }
-        } else {
-            if (this.space == space) {
-                return;
-            } else if (this.space != null) {
-                removePhysics(this.space);
-            }
-            addPhysics(space);
+    /**
+     * If enabled, add this control's physics object to the specified physics
+     * space. If not enabled, alter where the object would be added. The object
+     * is removed from any other space it's in.
+     *
+     * @param newSpace where to add, or null to simply remove
+     */
+    @Override
+    public void setPhysicsSpace(PhysicsSpace newSpace) {
+        if (space == newSpace) {
+            return;
+        }
+        if (added) {
+            removePhysics(space);
+            added = false;
+        }
+        if (newSpace != null && isEnabled()) {
+            addPhysics(newSpace);
             added = true;
         }
-        this.space = space;
+        /*
+         * If this control isn't enabled, its physics object will be
+         * added to the new space when the control becomes enabled.
+         */
+        space = newSpace;
     }
 
+    /**
+     * Access the physics space to which the object is (or would be) added.
+     *
+     * @return the pre-existing space, or null for none
+     */
     public PhysicsSpace getPhysicsSpace() {
         return space;
     }
 
+    /**
+     * Serialize this object, for example when saving to a J3O file.
+     *
+     * @param ex exporter (not null)
+     * @throws IOException from exporter
+     */
     @Override
     public void write(JmeExporter ex) throws IOException {
         OutputCapsule oc = ex.getCapsule(this);
@@ -241,6 +337,13 @@ public abstract class AbstractPhysicsControl implements PhysicsControl, JmeClone
         oc.write(spatial, "spatial", null);
     }
 
+    /**
+     * De-serialize this control from the specified importer, for example when
+     * loading from a J3O file.
+     *
+     * @param im importer (not null)
+     * @throws IOException from importer
+     */
     @Override
     public void read(JmeImporter im) throws IOException {
         InputCapsule ic = im.getCapsule(this);

+ 174 - 129
jme3-bullet/src/common/java/com/jme3/bullet/control/BetterCharacterControl.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -48,9 +48,7 @@ import com.jme3.math.Vector3f;
 import com.jme3.renderer.RenderManager;
 import com.jme3.renderer.ViewPort;
 import com.jme3.scene.Spatial;
-import com.jme3.scene.control.Control;
 import com.jme3.util.TempVars;
-import com.jme3.util.clone.Cloner;
 import com.jme3.util.clone.JmeCloneable;
 import java.io.IOException;
 import java.util.List;
@@ -58,15 +56,18 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /**
- * This is intended to be a replacement for the internal bullet character class.
- * A RigidBody with cylinder collision shape is used and its velocity is set
- * continuously, a ray test is used to check if the character is on the ground.
- *
- * The character keeps his own local coordinate system which adapts based on the
- * gravity working on the character so the character will always stand upright.
- *
- * Forces in the local x/z plane are dampened while those in the local y
- * direction are applied fully (e.g. jumping, falling).
+ * This class is intended to replace the CharacterControl class.
+ * <p>
+ * A rigid body with cylinder collision shape is used and its velocity is set
+ * continuously. A ray test is used to test whether the character is on the
+ * ground.
+ * <p>
+ * The character keeps their own local coordinate system which adapts based on
+ * the gravity working on the character so they will always stand upright.
+ * <p>
+ * Motion in the local X-Z plane is damped.
+ * <p>
+ * This class is shared between JBullet and Native Bullet.
  *
  * @author normenhansen
  */
@@ -76,10 +77,16 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     protected PhysicsRigidBody rigidBody;
     protected float radius;
     protected float height;
+    /**
+     * mass of this character (&gt;0)
+     */
     protected float mass;
+    /**
+     * relative height when ducked (1=full height)
+     */
     protected float duckedFactor = 0.6f;
     /**
-     * Local up direction, derived from gravity.
+     * local up direction, derived from gravity
      */
     protected final Vector3f localUp = new Vector3f(0, 1, 0);
     /**
@@ -96,22 +103,27 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
      */
     protected final Quaternion localForwardRotation = new Quaternion(Quaternion.DIRECTION_Z);
     /**
-     * Is a z-forward vector based on the view direction and the current local
-     * x/z plane.
+     * a Z-forward vector based on the view direction and the local X-Z plane.
      */
     protected final Vector3f viewDirection = new Vector3f(0, 0, 1);
     /**
-     * Stores final spatial location, corresponds to RigidBody location.
+     * spatial location, corresponds to RigidBody location.
      */
     protected final Vector3f location = new Vector3f();
     /**
-     * Stores final spatial rotation, is a z-forward rotation based on the view
-     * direction and the current local x/z plane. See also rotatedViewDirection.
+     * spatial rotation, a Z-forward rotation based on the view direction and
+     * local X-Z plane.
+     *
+     * @see #rotatedViewDirection
      */
     protected final Quaternion rotation = new Quaternion(Quaternion.DIRECTION_Z);
     protected final Vector3f rotatedViewDirection = new Vector3f(0, 0, 1);
     protected final Vector3f walkDirection = new Vector3f();
     protected final Vector3f jumpForce;
+    /**
+     * X-Z motion damping factor (0&rarr;no damping, 1=no external forces,
+     * default=0.9)
+     */
     protected float physicsDamping = 0.9f;
     protected final Vector3f scale = new Vector3f(1, 1, 1);
     protected final Vector3f velocity = new Vector3f();
@@ -121,20 +133,23 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     protected boolean wantToUnDuck = false;
 
     /**
-     * Only used for serialization, do not use this constructor.
+     * No-argument constructor needed by SavableClassUtil. Do not invoke
+     * directly!
      */
     public BetterCharacterControl() {
         jumpForce = new Vector3f();
     }
 
     /**
-     * Creates a new character with the given properties. Note that to avoid
-     * issues the final height when ducking should be larger than 2x radius. The
-     * jumpForce will be set to an upwards force of 5x mass.
+     * Instantiate an enabled control with the specified properties.
+     * <p>
+     * The final height when ducking must be larger than 2x radius. The
+     * jumpForce will be set to an upward force of 5x mass.
      *
-     * @param radius
-     * @param height
-     * @param mass
+     * @param radius the radius of the character's collision shape (&gt;0)
+     * @param height the height of the character's collision shape
+     * (&gt;2*radius)
+     * @param mass the character's mass (&ge;0)
      */
     public BetterCharacterControl(float radius, float height, float mass) {
         this.radius = radius;
@@ -145,6 +160,13 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
         rigidBody.setAngularFactor(0);
     }
 
+    /**
+     * Update this control. Invoked once per frame during the logical-state
+     * update, provided the control is added to a scene graph. Do not invoke
+     * directly from user code.
+     *
+     * @param tpf the time interval between frames (in seconds, &ge;0)
+     */
     @Override
     public void update(float tpf) {
         super.update(tpf);
@@ -153,16 +175,24 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
         applyPhysicsTransform(location, rotation);
     }
 
+    /**
+     * Render this control. Invoked once per view port per frame, provided the
+     * control is added to a scene. Should be invoked only by a subclass or by
+     * the RenderManager.
+     *
+     * @param rm the render manager (not null)
+     * @param vp the view port to render (not null)
+     */
     @Override
     public void render(RenderManager rm, ViewPort vp) {
         super.render(rm, vp);
     }
 
     /**
-     * Used internally, don't call manually
+     * Callback from Bullet, invoked just before the physics is stepped.
      *
-     * @param space
-     * @param tpf
+     * @param space the space that is about to be stepped (not null)
+     * @param tpf the time per physics step (in seconds, &ge;0)
      */
     public void prePhysicsTick(PhysicsSpace space, float tpf) {
         checkOnGround();
@@ -174,8 +204,8 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
         TempVars vars = TempVars.get();
 
         Vector3f currentVelocity = vars.vect2.set(velocity);
-        
-        // dampen existing x/z forces
+
+        // Attenuate any existing X-Z motion.
         float existingLeftVelocity = velocity.dot(localLeft);
         float existingForwardVelocity = velocity.dot(localForward);
         Vector3f counter = vars.vect1;
@@ -210,20 +240,20 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * Used internally, don't call manually
+     * Callback from Bullet, invoked just after the physics has been stepped.
      *
-     * @param space
-     * @param tpf
+     * @param space the space that was just stepped (not null)
+     * @param tpf the time per physics step (in seconds, &ge;0)
      */
     public void physicsTick(PhysicsSpace space, float tpf) {
         rigidBody.getLinearVelocity(velocity);
     }
 
     /**
-     * Move the character somewhere. Note the character also takes the location
-     * of any spatial its being attached to in the moment it is attached.
+     * Move the character somewhere. Note the character also warps to the
+     * location of the spatial when the control is added.
      *
-     * @param vec The new character location.
+     * @param vec the desired character location (not null)
      */
     public void warp(Vector3f vec) {
         setPhysicsLocation(vec);
@@ -241,32 +271,32 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * Set the jump force as a Vector3f. The jump force is local to the
-     * characters coordinate system, which normally is always z-forward (in
-     * world coordinates, parent coordinates when set to applyLocalPhysics)
+     * Alter the jump force. The jump force is local to the character's
+     * coordinate system, which normally is always z-forward (in world
+     * coordinates, parent coordinates when set to applyLocalPhysics)
      *
-     * @param jumpForce The new jump force
+     * @param jumpForce the desired jump force (not null, unaffected,
+     * default=5*mass in +Y direction)
      */
     public void setJumpForce(Vector3f jumpForce) {
         this.jumpForce.set(jumpForce);
     }
 
     /**
-     * Gets the current jump force. The default is 5 * character mass in y
-     * direction.
+     * Access the jump force.
      *
-     * @return
+     * @return the pre-existing vector (not null)
      */
     public Vector3f getJumpForce() {
         return jumpForce;
     }
 
     /**
-     * Check if the character is on the ground. This is determined by a ray test
-     * in the center of the character and might return false even if the
-     * character is not falling yet.
+     * Test whether the character is supported. Uses a ray test from the center
+     * of the character and might return false even if the character is not
+     * falling yet.
      *
-     * @return
+     * @return true if on the ground, otherwise false
      */
     public boolean isOnGround() {
         return onGround;
@@ -276,10 +306,10 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
      * Toggle character ducking. When ducked the characters capsule collision
      * shape height will be multiplied by duckedFactor to make the capsule
      * smaller. When unducking, the character will check with a ray test if it
-     * can in fact unduck and only do so when its possible. You can check the
-     * state of the unducking by checking isDucked().
+     * can in fact unduck and only do so when its possible. You can test the
+     * state using isDucked().
      *
-     * @param enabled
+     * @param enabled true&rarr;duck, false&rarr;unduck
      */
     public void setDucked(boolean enabled) {
         if (enabled) {
@@ -300,33 +330,33 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
      * Check if the character is ducking, either due to user input or due to
      * unducking being impossible at the moment (obstacle above).
      *
-     * @return
+     * @return true if ducking, otherwise false
      */
     public boolean isDucked() {
         return ducked;
     }
 
     /**
-     * Sets the height multiplication factor for ducking.
+     * Alter the height multiplier for ducking.
      *
-     * @param factor The factor by which the height should be multiplied when
-     * ducking
+     * @param factor the factor by which the height should be multiplied when
+     * ducking (&ge;0, &le;1)
      */
     public void setDuckedFactor(float factor) {
         duckedFactor = factor;
     }
 
     /**
-     * Gets the height multiplication factor for ducking.
+     * Read the height multiplier for ducking.
      *
-     * @return
+     * @return the factor (&ge;0, &le;1)
      */
     public float getDuckedFactor() {
         return duckedFactor;
     }
 
     /**
-     * Sets the walk direction of the character. This parameter is framerate
+     * Alter the character's the walk direction. This parameter is framerate
      * independent and the character will move continuously in the direction
      * given by the vector with the speed given by the vector length in m/s.
      *
@@ -337,20 +367,19 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * Gets the current walk direction and speed of the character. The length of
-     * the vector defines the speed.
+     * Read the walk velocity. The length of the vector defines the speed.
      *
-     * @return
+     * @return the pre-existing vector (not null)
      */
     public Vector3f getWalkDirection() {
         return walkDirection;
     }
 
     /**
-     * Sets the view direction for the character. Note this only defines the
-     * rotation of the spatial in the local x/z plane of the character.
+     * Alter the character's view direction. Note this only defines the
+     * orientation in the local X-Z plane.
      *
-     * @param vec
+     * @param vec a direction vector (not null, unaffected)
      */
     public void setViewDirection(Vector3f vec) {
         viewDirection.set(vec);
@@ -358,10 +387,10 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * Gets the current view direction, note this doesn't need to correspond
-     * with the spatials forward direction.
+     * Access the view direction. This need not agree with the spatial's forward
+     * direction.
      *
-     * @return
+     * @return the pre-existing vector (not null)
      */
     public Vector3f getViewDirection() {
         return viewDirection;
@@ -369,15 +398,15 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
 
     /**
      * Realign the local forward vector to given direction vector, if null is
-     * supplied Vector3f.UNIT_Z is used. Input vector has to be perpendicular to
-     * current gravity vector. This normally only needs to be called when the
+     * supplied Vector3f.UNIT_Z is used. The input vector must be perpendicular
+     * to gravity vector. This normally only needs to be invoked when the
      * gravity direction changed continuously and the local forward vector is
      * off due to drift. E.g. after walking around on a sphere "planet" for a
-     * while and then going back to a y-up coordinate system the local z-forward
-     * might not be 100% alinged with Z axis.
+     * while and then going back to a Y-up coordinate system the local Z-forward
+     * might not be 100% aligned with the Z axis.
      *
-     * @param vec The new forward vector, has to be perpendicular to the current
-     * gravity vector!
+     * @param vec the desired forward vector (perpendicular to the gravity
+     * vector, may be null, default=0,0,1)
      */
     public void resetForward(Vector3f vec) {
         if (vec == null) {
@@ -388,23 +417,21 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * Get the current linear velocity along the three axes of the character.
-     * This is prepresented in world coordinates, parent coordinates when the
-     * control is set to applyLocalPhysics.
+     * Access the character's linear velocity in physics-space coordinates.
      *
-     * @return The current linear velocity of the character
+     * @return the pre-existing vector (not null)
      */
     public Vector3f getVelocity() {
         return velocity;
     }
 
     /**
-     * Set the gravity for this character. Note that this also realigns the
-     * local coordinate system of the character so that continuous changes in
-     * gravity direction are possible while maintaining a sensible control over
-     * the character.
+     * Alter the gravity acting on this character. Note that this also realigns
+     * the local coordinate system of the character so that continuous changes
+     * in gravity direction are possible while maintaining a sensible control
+     * over the character.
      *
-     * @param gravity
+     * @param gravity an acceleration vector (not null, unaffected)
      */
     public void setGravity(Vector3f gravity) {
         rigidBody.setGravity(gravity);
@@ -413,46 +440,48 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * Get the current gravity of the character.
+     * Copy the character's gravity vector.
      *
-     * @return
+     * @return a new acceleration vector (not null)
      */
     public Vector3f getGravity() {
         return rigidBody.getGravity();
     }
 
     /**
-     * Get the current gravity of the character.
+     * Copy the character's gravity vector.
      *
-     * @param store The vector to store the result in
-     * @return
+     * @param store storage for the result (modified if not null)
+     * @return an acceleration vector (either the provided storage or a new
+     * vector, not null)
      */
     public Vector3f getGravity(Vector3f store) {
         return rigidBody.getGravity(store);
     }
 
     /**
-     * Sets how much the physics forces in the local x/z plane should be
-     * dampened.
-     * @param physicsDamping The dampening value, 0 = no dampening, 1 = no external force, default = 0.9
+     * Alter how much motion in the local X-Z plane is damped.
+     *
+     * @param physicsDamping the desired damping factor (0&rarr;no damping, 1=no
+     * external forces, default=0.9)
      */
     public void setPhysicsDamping(float physicsDamping) {
         this.physicsDamping = physicsDamping;
     }
 
     /**
-     * Gets how much the physics forces in the local x/z plane should be
-     * dampened.
+     * Read how much motion in the local X-Z plane is damped.
+     *
+     * @return the damping factor (0&rarr;no damping, 1=no external forces)
      */
     public float getPhysicsDamping() {
         return physicsDamping;
     }
 
     /**
-     * This actually sets a new collision shape to the character to change the
-     * height of the capsule.
+     * Alter the height of collision shape.
      *
-     * @param percent
+     * @param percent the desired height, as a percentage of the full height
      */
     protected void setHeightPercent(float percent) {
         scale.setY(percent);
@@ -460,7 +489,7 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * This checks if the character is on the ground by doing a ray test.
+     * Test whether the character is on the ground, by means of a ray test.
      */
     protected void checkOnGround() {
         TempVars vars = TempVars.get();
@@ -501,12 +530,10 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * Gets a new collision shape based on the current scale parameter. The
-     * created collisionshape is a capsule collision shape that is attached to a
-     * compound collision shape with an offset to set the object center at the
-     * bottom of the capsule.
+     * Create a collision shape based on the scale parameter. The new shape is a
+     * compound shape containing an offset capsule.
      *
-     * @return
+     * @return a new compound shape (not null)
      */
     protected CollisionShape getShape() {
         //TODO: cleanup size mess..
@@ -518,18 +545,18 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * Gets the scaled height.
+     * Calculate the character's scaled height.
      *
-     * @return
+     * @return the height
      */
     protected float getFinalHeight() {
         return height * scale.getY();
     }
 
     /**
-     * Gets the scaled radius.
+     * Calculate the character's scaled radius.
      *
-     * @return
+     * @return the radius
      */
     protected float getFinalRadius() {
         return radius * scale.getZ();
@@ -538,7 +565,7 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     /**
      * Updates the local coordinate system from the localForward and localUp
      * vectors, adapts localForward, sets localForwardRotation quaternion to
-     * local z-forward rotation.
+     * local Z-forward rotation.
      */
     protected void updateLocalCoordinateSystem() {
         //gravity vector has possibly changed, calculate new world forward (UNIT_Z)
@@ -549,8 +576,8 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * Updates the local x/z-flattened view direction and the corresponding
-     * rotation quaternion for the spatial.
+     * Updates the local X-Z view direction and the corresponding rotation
+     * quaternion for the spatial.
      */
     protected void updateLocalViewDirection() {
         //update local rotation quaternion to use for view rotation
@@ -570,7 +597,6 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
      * set to the new direction
      * @param worldUpVector The up vector to use, the result direction will be
      * perpendicular to this
-     * @return
      */
     protected final void calculateNewForward(Quaternion rotation, Vector3f direction, Vector3f worldUpVector) {
         if (direction == null) {
@@ -602,10 +628,9 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * This is implemented from AbstractPhysicsControl and called when the
-     * spatial is attached for example.
+     * Translate the character to the specified location.
      *
-     * @param vec
+     * @param vec desired location (not null, unaffected)
      */
     @Override
     protected void setPhysicsLocation(Vector3f vec) {
@@ -614,12 +639,12 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * This is implemented from AbstractPhysicsControl and called when the
-     * spatial is attached for example. We don't set the actual physics rotation
-     * but the view rotation here. It might actually be altered by the
-     * calculateNewForward method.
+     * Rotate the physics object to the specified orientation.
+     * <p>
+     * We don't set the actual physics rotation but the view rotation here. It
+     * might actually be altered by the calculateNewForward method.
      *
-     * @param quat
+     * @param quat desired orientation (not null, unaffected)
      */
     @Override
     protected void setPhysicsRotation(Quaternion quat) {
@@ -629,10 +654,9 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * This is implemented from AbstractPhysicsControl and called when the
-     * control is supposed to add all objects to the physics space.
+     * Add all managed physics objects to the specified space.
      *
-     * @param space
+     * @param space which physics space to add to (not null)
      */
     @Override
     protected void addPhysics(PhysicsSpace space) {
@@ -644,10 +668,9 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
     }
 
     /**
-     * This is implemented from AbstractPhysicsControl and called when the
-     * control is supposed to remove all objects from the physics space.
+     * Remove all managed physics objects from the specified space.
      *
-     * @param space
+     * @param space which physics space to remove from (not null)
      */
     @Override
     protected void removePhysics(PhysicsSpace space) {
@@ -655,23 +678,33 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
         space.removeTickListener(this);
     }
 
+    /**
+     * Create spatial-dependent data. Invoked when this control is added to a
+     * spatial.
+     *
+     * @param spat the controlled spatial (not null, alias created)
+     */
     @Override
     protected void createSpatialData(Spatial spat) {
         rigidBody.setUserObject(spatial);
     }
 
+    /**
+     * Destroy spatial-dependent data. Invoked when this control is removed from
+     * a spatial.
+     *
+     * @param spat the previously controlled spatial (not null)
+     */
     @Override
     protected void removeSpatialData(Spatial spat) {
         rigidBody.setUserObject(null);
     }
 
-    @Override
-    public Control cloneForSpatial(Spatial spatial) {
-        BetterCharacterControl control = new BetterCharacterControl(radius, height, mass);
-        control.setJumpForce(jumpForce);
-        return control;
-    }
-
+    /**
+     * Create a shallow clone for the JME cloner.
+     *
+     * @return a new control (not null)
+     */
     @Override
     public Object jmeClone() {
         BetterCharacterControl control = new BetterCharacterControl(radius, height, mass);
@@ -680,6 +713,12 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
         return control;
     }     
 
+    /**
+     * Serialize this control, for example when saving to a J3O file.
+     *
+     * @param ex exporter (not null)
+     * @throws IOException from exporter
+     */
     @Override
     public void write(JmeExporter ex) throws IOException {
         super.write(ex);
@@ -691,6 +730,12 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph
         oc.write(physicsDamping, "physicsDamping", 0.9f);
     }
 
+    /**
+     * De-serialize this control, for example when loading from a J3O file.
+     *
+     * @param im importer (not null)
+     * @throws IOException from importer
+     */
     @Override
     public void read(JmeImporter im) throws IOException {
         super.read(im);

+ 28 - 28
jme3-bullet/src/common/java/com/jme3/bullet/control/CharacterControl.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -89,21 +89,10 @@ public class CharacterControl extends PhysicsCharacter implements PhysicsControl
         return spatial.getWorldTranslation();
     }
 
+    @Deprecated
     @Override
     public Control cloneForSpatial(Spatial spatial) {
-        CharacterControl control = new CharacterControl(collisionShape, stepHeight);
-        control.setCcdMotionThreshold(getCcdMotionThreshold());
-        control.setCcdSweptSphereRadius(getCcdSweptSphereRadius());
-        control.setCollideWithGroups(getCollideWithGroups());
-        control.setCollisionGroup(getCollisionGroup());
-        control.setFallSpeed(getFallSpeed());
-        control.setGravity(getGravity());
-        control.setJumpSpeed(getJumpSpeed());
-        control.setMaxSlope(getMaxSlope());
-        control.setPhysicsLocation(getPhysicsLocation());
-        control.setUpAxis(getUpAxis());
-        control.setApplyPhysicsLocal(isApplyPhysicsLocal());
-        return control;
+        throw new UnsupportedOperationException();
     }
 
     @Override
@@ -113,6 +102,7 @@ public class CharacterControl extends PhysicsCharacter implements PhysicsControl
         control.setCcdSweptSphereRadius(getCcdSweptSphereRadius());
         control.setCollideWithGroups(getCollideWithGroups());
         control.setCollisionGroup(getCollisionGroup());
+        control.setContactResponse(isContactResponse());
         control.setFallSpeed(getFallSpeed());
         control.setGravity(getGravity());
         control.setJumpSpeed(getJumpSpeed());
@@ -201,21 +191,31 @@ public class CharacterControl extends PhysicsCharacter implements PhysicsControl
     public void render(RenderManager rm, ViewPort vp) {
     }
 
-    public void setPhysicsSpace(PhysicsSpace space) {
-        if (space == null) {
-            if (this.space != null) {
-                this.space.removeCollisionObject(this);
-                added = false;
-            }
-        } else {
-            if(this.space == space) return;
-            // if this object isn't enabled, it will be added when it will be enabled.
-            if (isEnabled()) {
-                space.addCollisionObject(this);
-                added = true;
-            }
+    /**
+     * If enabled, add this control's physics object to the specified physics
+     * space. If not enabled, alter where the object would be added. The object
+     * is removed from any other space it's currently in.
+     *
+     * @param newSpace where to add, or null to simply remove
+     */
+    @Override
+    public void setPhysicsSpace(PhysicsSpace newSpace) {
+        if (space == newSpace) {
+            return;
+        }
+        if (added) {
+            space.removeCollisionObject(this);
+            added = false;
+        }
+        if (newSpace != null && isEnabled()) {
+            newSpace.addCollisionObject(this);
+            added = true;
         }
-        this.space = space;
+        /*
+         * If this control isn't enabled, its physics object will be
+         * added to the new space when the control becomes enabled.
+         */
+        space = newSpace;
     }
 
     public PhysicsSpace getPhysicsSpace() {

+ 155 - 28
jme3-bullet/src/common/java/com/jme3/bullet/control/GhostControl.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -49,38 +49,82 @@ import com.jme3.util.clone.JmeCloneable;
 import java.io.IOException;
 
 /**
- * A GhostControl moves with the spatial it is attached to and can be used to check
- * overlaps with other physics objects (e.g. aggro radius).
+ * A physics control to link a PhysicsGhostObject to a spatial.
+ * <p>
+ * The ghost object moves with the spatial it is attached to and can be used to
+ * detect overlaps with other physics objects (e.g. aggro radius).
+ * <p>
+ * This class is shared between JBullet and Native Bullet.
+ *
  * @author normenhansen
  */
 public class GhostControl extends PhysicsGhostObject implements PhysicsControl, JmeCloneable {
 
+    /**
+     * spatial to which this control is added, or null if none
+     */
     protected Spatial spatial;
+    /**
+     * true&rarr;control is enabled, false&rarr;control is disabled
+     */
     protected boolean enabled = true;
+    /**
+     * true&rarr;body is added to the physics space, false&rarr;not added
+     */
     protected boolean added = false;
+    /**
+     * space to which the ghost object is (or would be) added
+     */
     protected PhysicsSpace space = null;
+    /**
+     * true &rarr; physics coordinates match local transform, false &rarr;
+     * physics coordinates match world transform
+     */
     protected boolean applyLocal = false;
 
+    /**
+     * No-argument constructor needed by SavableClassUtil. Do not invoke
+     * directly!
+     */
     public GhostControl() {
     }
 
+    /**
+     * Instantiate an enabled control with the specified shape.
+     *
+     * @param shape (not null)
+     */
     public GhostControl(CollisionShape shape) {
         super(shape);
     }
 
+    /**
+     * Test whether physics-space coordinates should match the spatial's local
+     * coordinates.
+     *
+     * @return true if matching local coordinates, false if matching world
+     * coordinates
+     */
     public boolean isApplyPhysicsLocal() {
         return applyLocal;
     }
 
     /**
-     * When set to true, the physics coordinates will be applied to the local
-     * translation of the Spatial
-     * @param applyPhysicsLocal
+     * Alter whether physics-space coordinates should match the spatial's local
+     * coordinates.
+     *
+     * @param applyPhysicsLocal true&rarr;match local coordinates,
+     * false&rarr;match world coordinates (default=false)
      */
     public void setApplyPhysicsLocal(boolean applyPhysicsLocal) {
         applyLocal = applyPhysicsLocal;
     }
 
+    /**
+     * Access whichever spatial translation corresponds to the physics location.
+     *
+     * @return the pre-existing vector (not null)
+     */
     private Vector3f getSpatialTranslation() {
         if (applyLocal) {
             return spatial.getLocalTranslation();
@@ -88,6 +132,11 @@ public class GhostControl extends PhysicsGhostObject implements PhysicsControl,
         return spatial.getWorldTranslation();
     }
 
+    /**
+     * Access whichever spatial rotation corresponds to the physics rotation.
+     *
+     * @return the pre-existing quaternion (not null)
+     */
     private Quaternion getSpatialRotation() {
         if (applyLocal) {
             return spatial.getLocalRotation();
@@ -95,20 +144,24 @@ public class GhostControl extends PhysicsGhostObject implements PhysicsControl,
         return spatial.getWorldRotation();
     }
 
+    /**
+     * Clone this control for a different spatial. No longer used as of JME 3.1.
+     *
+     * @param spatial the spatial for the clone to control (or null)
+     * @return a new control (not null)
+     */
+    @Deprecated
     @Override
     public Control cloneForSpatial(Spatial spatial) {
-        GhostControl control = new GhostControl(collisionShape);
-        control.setCcdMotionThreshold(getCcdMotionThreshold());
-        control.setCcdSweptSphereRadius(getCcdSweptSphereRadius());
-        control.setCollideWithGroups(getCollideWithGroups());
-        control.setCollisionGroup(getCollisionGroup());
-        control.setPhysicsLocation(getPhysicsLocation());
-        control.setPhysicsRotation(getPhysicsRotationMatrix());
-        control.setApplyPhysicsLocal(isApplyPhysicsLocal());
-        return control;
+        throw new UnsupportedOperationException();
     }
 
-    @Override   
+    /**
+     * Create a shallow clone for the JME cloner.
+     *
+     * @return a new control (not null)
+     */
+    @Override
     public Object jmeClone() {
         GhostControl control = new GhostControl(collisionShape);
         control.setCcdMotionThreshold(getCcdMotionThreshold());
@@ -122,11 +175,27 @@ public class GhostControl extends PhysicsGhostObject implements PhysicsControl,
         return control;
     }     
 
+    /**
+     * Callback from {@link com.jme3.util.clone.Cloner} to convert this
+     * shallow-cloned control into a deep-cloned one, using the specified cloner
+     * and original to resolve copied fields.
+     *
+     * @param cloner the cloner that's cloning this control (not null)
+     * @param original the control from which this control was shallow-cloned
+     * (unused)
+     */
     @Override   
     public void cloneFields( Cloner cloner, Object original ) { 
         this.spatial = cloner.clone(spatial);
     }
          
+    /**
+     * Alter which spatial is controlled. Invoked when the control is added to
+     * or removed from a spatial. Should be invoked only by a subclass or from
+     * Spatial. Do not invoke directly from user code.
+     *
+     * @param spatial the spatial to control (or null)
+     */
     public void setSpatial(Spatial spatial) {
         this.spatial = spatial;
         setUserObject(spatial);
@@ -137,6 +206,15 @@ public class GhostControl extends PhysicsGhostObject implements PhysicsControl,
         setPhysicsRotation(getSpatialRotation());
     }
 
+    /**
+     * Enable or disable this control.
+     * <p>
+     * When the control is disabled, the ghost object is removed from physics
+     * space. When the control is enabled again, the object is moved to the
+     * current location of the spatial and then added to the physics space.
+     *
+     * @param enabled true&rarr;enable the control, false&rarr;disable it
+     */
     public void setEnabled(boolean enabled) {
         this.enabled = enabled;
         if (space != null) {
@@ -154,10 +232,22 @@ public class GhostControl extends PhysicsGhostObject implements PhysicsControl,
         }
     }
 
+    /**
+     * Test whether this control is enabled.
+     *
+     * @return true if enabled, otherwise false
+     */
     public boolean isEnabled() {
         return enabled;
     }
 
+    /**
+     * Update this control. Invoked once per frame during the logical-state
+     * update, provided the control is added to a scene. Do not invoke directly
+     * from user code.
+     *
+     * @param tpf the time interval between frames (in seconds, &ge;0)
+     */
     public void update(float tpf) {
         if (!enabled) {
             return;
@@ -166,29 +256,60 @@ public class GhostControl extends PhysicsGhostObject implements PhysicsControl,
         setPhysicsRotation(getSpatialRotation());
     }
 
+    /**
+     * Render this control. Invoked once per view port per frame, provided the
+     * control is added to a scene. Should be invoked only by a subclass or by
+     * the RenderManager.
+     *
+     * @param rm the render manager (not null)
+     * @param vp the view port to render (not null)
+     */
     public void render(RenderManager rm, ViewPort vp) {
     }
 
-    public void setPhysicsSpace(PhysicsSpace space) {
-        if (space == null) {
-            if (this.space != null) {
-                this.space.removeCollisionObject(this);
-                added = false;
-            }
-        } else {
-            if (this.space == space) {
-                return;
-            }
-            space.addCollisionObject(this);
+    /**
+     * If enabled, add this control's physics object to the specified physics
+     * space. If not enabled, alter where the object would be added. The object
+     * is removed from any other space it's currently in.
+     *
+     * @param newSpace where to add, or null to simply remove
+     */
+    @Override
+    public void setPhysicsSpace(PhysicsSpace newSpace) {
+        if (space == newSpace) {
+            return;
+        }
+        if (added) {
+            space.removeCollisionObject(this);
+            added = false;
+        }
+        if (newSpace != null && isEnabled()) {
+            newSpace.addCollisionObject(this);
             added = true;
         }
-        this.space = space;
+        /*
+         * If this control isn't enabled, its physics object will be
+         * added to the new space when the control becomes enabled.
+         */
+        space = newSpace;
     }
 
+    /**
+     * Access the physics space to which the ghost object is (or would be)
+     * added.
+     *
+     * @return the pre-existing space, or null for none
+     */
     public PhysicsSpace getPhysicsSpace() {
         return space;
     }
 
+    /**
+     * Serialize this control, for example when saving to a J3O file.
+     *
+     * @param ex exporter (not null)
+     * @throws IOException from exporter
+     */
     @Override
     public void write(JmeExporter ex) throws IOException {
         super.write(ex);
@@ -198,6 +319,12 @@ public class GhostControl extends PhysicsGhostObject implements PhysicsControl,
         oc.write(spatial, "spatial", null);
     }
 
+    /**
+     * De-serialize this control, for example when loading from a J3O file.
+     *
+     * @param im importer (not null)
+     * @throws IOException from importer
+     */
     @Override
     public void read(JmeImporter im) throws IOException {
         super.read(im);

+ 381 - 134
jme3-bullet/src/common/java/com/jme3/bullet/control/KinematicRagdollControl.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -31,37 +31,22 @@
  */
 package com.jme3.bullet.control;
 
-import com.jme3.animation.AnimControl;
-import com.jme3.animation.Bone;
-import com.jme3.animation.Skeleton;
-import com.jme3.animation.SkeletonControl;
+import com.jme3.animation.*;
 import com.jme3.bullet.PhysicsSpace;
-import com.jme3.bullet.collision.PhysicsCollisionEvent;
-import com.jme3.bullet.collision.PhysicsCollisionListener;
-import com.jme3.bullet.collision.PhysicsCollisionObject;
-import com.jme3.bullet.collision.RagdollCollisionListener;
+import com.jme3.bullet.collision.*;
 import com.jme3.bullet.collision.shapes.BoxCollisionShape;
 import com.jme3.bullet.collision.shapes.HullCollisionShape;
-import com.jme3.bullet.control.ragdoll.HumanoidRagdollPreset;
-import com.jme3.bullet.control.ragdoll.RagdollPreset;
-import com.jme3.bullet.control.ragdoll.RagdollUtils;
+import com.jme3.bullet.control.ragdoll.*;
 import com.jme3.bullet.joints.SixDofJoint;
 import com.jme3.bullet.objects.PhysicsRigidBody;
-import com.jme3.export.InputCapsule;
-import com.jme3.export.JmeExporter;
-import com.jme3.export.JmeImporter;
-import com.jme3.export.OutputCapsule;
-import com.jme3.export.Savable;
-import com.jme3.math.FastMath;
-import com.jme3.math.Quaternion;
-import com.jme3.math.Vector3f;
+import com.jme3.export.*;
+import com.jme3.math.*;
 import com.jme3.renderer.RenderManager;
 import com.jme3.renderer.ViewPort;
+import com.jme3.scene.Mesh;
 import com.jme3.scene.Node;
 import com.jme3.scene.Spatial;
-import com.jme3.scene.control.Control;
 import com.jme3.util.TempVars;
-import com.jme3.util.clone.Cloner;
 import com.jme3.util.clone.JmeCloneable;
 import java.io.IOException;
 import java.util.*;
@@ -73,29 +58,39 @@ import java.util.logging.Logger;
  * use this control you need a model with an AnimControl and a
  * SkeletonControl.<br> This should be the case if you imported an animated
  * model from Ogre or blender.<br> Note enabling/disabling the control
- * add/removes it from the physic space<br> <p> This control creates collision
- * shapes for each bones of the skeleton when you call
- * spatial.addControl(ragdollControl). <ul> <li>The shape is HullCollision shape
- * based on the vertices associated with each bone and based on a tweakable
- * weight threshold (see setWeightThreshold)</li> <li>If you don't want each
- * bone to be a collision shape, you can specify what bone to use by using the
- * addBoneName method<br> By using this method, bone that are not used to create
- * a shape, are "merged" to their parent to create the collision shape. </li>
- * </ul> </p> <p> There are 2 modes for this control : <ul> <li><strong>The
- * kinematic modes :</strong><br> this is the default behavior, this means that
- * the collision shapes of the body are able to interact with physics enabled
- * objects. in this mode physic shapes follow the moovements of the animated
- * skeleton (for example animated by a key framed animation) this mode is
- * enabled by calling setKinematicMode(); </li> <li><strong>The ragdoll modes
- * :</strong><br> To enable this behavior, you need to call setRagdollMode()
- * method. In this mode the charater is entirely controled by physics, so it
- * will fall under the gravity and move if any force is applied to it. </li>
- * </ul> </p>
+ * add/removes it from the physics space<br>
+ * <p>
+ * This control creates collision shapes for each bones of the skeleton when you
+ * invoke spatial.addControl(ragdollControl). <ul> <li>The shape is
+ * HullCollision shape based on the vertices associated with each bone and based
+ * on a tweakable weight threshold (see setWeightThreshold)</li> <li>If you
+ * don't want each bone to be a collision shape, you can specify what bone to
+ * use by using the addBoneName method<br> By using this method, bone that are
+ * not used to create a shape, are "merged" to their parent to create the
+ * collision shape. </li>
+ * </ul>
+ * <p>
+ * There are 2 modes for this control : <ul> <li><strong>The kinematic modes
+ * :</strong><br> this is the default behavior, this means that the collision
+ * shapes of the body are able to interact with physics enabled objects. in this
+ * mode physics shapes follow the motion of the animated skeleton (for example
+ * animated by a key framed animation) this mode is enabled by calling
+ * setKinematicMode(); </li> <li><strong>The ragdoll modes:</strong><br> To
+ * enable this behavior, you need to invoke the setRagdollMode() method. In this
+ * mode the character is entirely controlled by physics, so it will fall under
+ * the gravity and move if any force is applied to it.</li>
+ * </ul>
+ * <p>
+ * This class is shared between JBullet and Native Bullet.
  *
- * @author Normen Hansen and Rémy Bouquet (Nehon)
+ * @author Normen Hansen and Rémy Bouquet (Nehon)
  */
+@Deprecated
 public class KinematicRagdollControl extends AbstractPhysicsControl implements PhysicsCollisionListener, JmeCloneable {
 
+    /**
+     * list of registered collision listeners
+     */
     protected static final Logger logger = Logger.getLogger(KinematicRagdollControl.class.getName());
     protected List<RagdollCollisionListener> listeners;
     protected final Set<String> boneList = new TreeSet<String>();
@@ -103,7 +98,13 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     protected final Vector3f modelPosition = new Vector3f();
     protected final Quaternion modelRotation = new Quaternion();
     protected final PhysicsRigidBody baseRigidBody;
+    /**
+     * model being controlled
+     */
     protected Spatial targetModel;
+    /**
+     * skeleton being controlled
+     */
     protected Skeleton skeleton;
     protected RagdollPreset preset = new HumanoidRagdollPreset();
     protected Vector3f initScale;
@@ -112,23 +113,52 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     protected boolean blendedControl = false;
     protected float weightThreshold = -1.0f;
     protected float blendStart = 0.0f;
+    /**
+     * blending interval for animations (in seconds, &ge;0)
+     */
     protected float blendTime = 1.0f;
     protected float eventDispatchImpulseThreshold = 10;
     protected float rootMass = 15;
+    /**
+     * accumulate total mass of ragdoll when control is added to a scene
+     */
     protected float totalMass = 0;
     private Map<String, Vector3f> ikTargets = new HashMap<String, Vector3f>();
     private Map<String, Integer> ikChainDepth = new HashMap<String, Integer>();
+    /**
+     * rotational speed for inverse kinematics (radians per second, default=7)
+     */
     private float ikRotSpeed = 7f;
+    /**
+     * viscous limb-damping ratio (0&rarr;no damping, 1&rarr;critically damped,
+     * default=0.6)
+     */
     private float limbDampening = 0.6f;
-
+    /**
+     * distance threshold for inverse kinematics (default=0.1)
+     */
     private float IKThreshold = 0.1f;
+    /**
+     * Enumerate joint-control modes for this control.
+     */
     public static enum Mode {
-
+        /**
+         * collision shapes follow the movements of bones in the skeleton
+         */
         Kinematic,
+        /**
+         * skeleton is controlled by Bullet physics (gravity and collisions)
+         */
         Ragdoll,
+        /**
+         * skeleton is controlled by inverse-kinematic targets
+         */
         IK
     }
 
+    /**
+     * Link a bone to a jointed rigid body.
+     */
     public class PhysicsBoneLink implements Savable {
 
         protected PhysicsRigidBody rigidBody;
@@ -138,17 +168,37 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         protected Quaternion startBlendingRot = new Quaternion();
         protected Vector3f startBlendingPos = new Vector3f();
 
+        /**
+         * Instantiate an uninitialized link.
+         */
         public PhysicsBoneLink() {
         }
 
+        /**
+         * Access the linked bone.
+         *
+         * @return the pre-existing instance or null
+         */
         public Bone getBone() {
             return bone;
         }
 
+        /**
+         * Access the linked body.
+         *
+         * @return the pre-existing instance or null
+         */
         public PhysicsRigidBody getRigidBody() {
             return rigidBody;
         }
 
+        /**
+         * Serialize this bone link, for example when saving to a J3O file.
+         *
+         * @param ex exporter (not null)
+         * @throws IOException from exporter
+         */
+        @Override
         public void write(JmeExporter ex) throws IOException {
             OutputCapsule oc = ex.getCapsule(this);
             oc.write(rigidBody, "rigidBody", null);
@@ -159,6 +209,14 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
             oc.write(startBlendingPos, "startBlendingPos", new Vector3f());
         }
 
+        /**
+         * De-serialize this bone link, for example when loading from a J3O
+         * file.
+         *
+         * @param im importer (not null)
+         * @throws IOException from importer
+         */
+        @Override
         public void read(JmeImporter im) throws IOException {
             InputCapsule ic = im.getCapsule(this);
             rigidBody = (PhysicsRigidBody) ic.readSavable("rigidBody", null);
@@ -171,29 +229,54 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * contruct a KinematicRagdollControl
+     * Instantiate an enabled control.
      */
     public KinematicRagdollControl() {
         baseRigidBody = new PhysicsRigidBody(new BoxCollisionShape(Vector3f.UNIT_XYZ.mult(0.1f)), 1);
         baseRigidBody.setKinematic(mode == Mode.Kinematic);
     }
 
+    /**
+     * Instantiate an enabled control with the specified weight threshold.
+     *
+     * @param weightThreshold (&gt;0, &lt;1)
+     */
     public KinematicRagdollControl(float weightThreshold) {
         this();
         this.weightThreshold = weightThreshold;
     }
 
+    /**
+     * Instantiate an enabled control with the specified preset and weight
+     * threshold.
+     *
+     * @param preset (not null)
+     * @param weightThreshold (&gt;0, &lt;1)
+     */
     public KinematicRagdollControl(RagdollPreset preset, float weightThreshold) {
         this();
         this.preset = preset;
         this.weightThreshold = weightThreshold;
     }
 
+    /**
+     * Instantiate an enabled control with the specified preset.
+     *
+     * @param preset (not null)
+     */
     public KinematicRagdollControl(RagdollPreset preset) {
         this();
         this.preset = preset;
     }
 
+    /**
+     * Update this control. Invoked once per frame during the logical-state
+     * update, provided the control is added to a scene. Do not invoke directly
+     * from user code.
+     *
+     * @param tpf the time interval between frames (in seconds, &ge;0)
+     */
+    @Override
     public void update(float tpf) {
         if (!enabled) {
             return;
@@ -201,13 +284,18 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         if(mode == Mode.IK){
             ikUpdate(tpf);
         } else if (mode == mode.Ragdoll && targetModel.getLocalTranslation().equals(modelPosition)) {
-            //if the ragdoll has the control of the skeleton, we update each bone with its position in physic world space.
+            //if the ragdoll has the control of the skeleton, we update each bone with its position in physics world space.
             ragDollUpdate(tpf);
         } else {
             kinematicUpdate(tpf);
         }
     }
 
+    /**
+     * Update this control in Ragdoll mode, based on Bullet physics.
+     *
+     * @param tpf the time interval between frames (in seconds, &ge;0)
+     */
     protected void ragDollUpdate(float tpf) {
         TempVars vars = TempVars.get();
         Quaternion tmpRot1 = vars.quat1;
@@ -217,15 +305,15 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
 
             Vector3f position = vars.vect1;
 
-            //retrieving bone position in physic world space
+            //retrieving bone position in physics world space
             Vector3f p = link.rigidBody.getMotionState().getWorldLocation();
             //transforming this position with inverse transforms of the model
             targetModel.getWorldTransform().transformInverseVector(p, position);
 
-            //retrieving bone rotation in physic world space
+            //retrieving bone rotation in physics world space
             Quaternion q = link.rigidBody.getMotionState().getWorldRotationQuat();
 
-            //multiplying this rotation by the initialWorld rotation of the bone, 
+            //multiplying this rotation by the initialWorld rotation of the bone,
             //then transforming it with the inverse world rotation of the model
             tmpRot1.set(q).multLocal(link.initalWorldRotation);
             tmpRot2.set(targetModel.getWorldRotation()).inverseLocal().mult(tmpRot1, tmpRot1);
@@ -249,22 +337,21 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
                 link.bone.setUserTransformsInModelSpace(position, tmpRot1);
 
             } else {
-                //if boneList is empty, this means that every bone in the ragdoll has a collision shape,
-                //so we just update the bone position
-                if (boneList.isEmpty()) {
-                    link.bone.setUserTransformsInModelSpace(position, tmpRot1);
-                } else {
-                    //boneList is not empty, this means some bones of the skeleton might not be associated with a collision shape.
-                    //So we update them recusively
-                    RagdollUtils.setTransform(link.bone, position, tmpRot1, false, boneList);
-                }
+                //some bones of the skeleton might not be associated with a collision shape.
+                //So we update them recusively
+                RagdollUtils.setTransform(link.bone, position, tmpRot1, false, boneList);
             }
         }
         vars.release();
     }
 
+    /**
+     * Update this control in Kinematic mode, based on bone animation tracks.
+     *
+     * @param tpf the time interval between frames (in seconds, &ge;0)
+     */
     protected void kinematicUpdate(float tpf) {
-        //the ragdoll does not have the controll, so the keyframed animation updates the physic position of the physic bonces
+        //the ragdoll does not have control, so the keyframed animation updates the physics position of the physics bonces
         TempVars vars = TempVars.get();
         Quaternion tmpRot1 = vars.quat1;
         Quaternion tmpRot2 = vars.quat2;
@@ -273,7 +360,7 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
 //            if(link.usedbyIK){
 //                continue;
 //            }
-            //if blended control this means, keyframed animation is updating the skeleton, 
+            //if blended control this means, keyframed animation is updating the skeleton,
             //but to allow smooth transition, we blend this transformation with the saved position of the ragdoll
             if (blendedControl) {
                 Vector3f position2 = vars.vect2;
@@ -287,17 +374,8 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
                 tmpRot1.set(tmpRot2);
                 position.set(position2);
 
-                //updating bones transforms
-                if (boneList.isEmpty()) {
-                    //we ensure we have the control to update the bone
-                    link.bone.setUserControl(true);
-                    link.bone.setUserTransformsInModelSpace(position, tmpRot1);
-                    //we give control back to the key framed animation.
-                    link.bone.setUserControl(false);
-                } else {
-                    RagdollUtils.setTransform(link.bone, position, tmpRot1, true, boneList);
-                }
-
+                //update bone transforms
+                RagdollUtils.setTransform(link.bone, position, tmpRot1, true, boneList);
             }
             //setting skeleton transforms to the ragdoll
             matchPhysicObjectToBone(link, position, tmpRot1);
@@ -313,6 +391,11 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         }
         vars.release();
     }
+    /**
+     * Update this control in IK mode, based on IK targets.
+     *
+     * @param tpf the time interval between frames (in seconds, &ge;0)
+     */
     private void ikUpdate(float tpf){
         TempVars vars = TempVars.get();
 
@@ -349,6 +432,19 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         vars.release();
     }
     
+    /**
+     * Update a bone and its ancestors in IK mode. Note: recursive!
+     *
+     * @param link the bone link for the affected bone (may be null)
+     * @param tpf the time interval between frames (in seconds, &ge;0)
+     * @param vars unused
+     * @param tmpRot1 temporary storage used in calculations (not null)
+     * @param tmpRot2 temporary storage used in calculations (not null)
+     * @param tipBone (not null)
+     * @param target the location target in model space (not null, unaffected)
+     * @param depth depth of the recursion (&ge;0)
+     * @param maxDepth recursion limit (&ge;0)
+     */
     public void updateBone(PhysicsBoneLink link, float tpf, TempVars vars, Quaternion tmpRot1, Quaternion[] tmpRot2, Bone tipBone, Vector3f target, int depth, int maxDepth) {
         if (link == null || link.bone.getParent() == null) {
             return;
@@ -403,13 +499,12 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * Set the transforms of a rigidBody to match the transforms of a bone. this
-     * is used to make the ragdoll follow the skeleton motion while in Kinematic
-     * mode
+     * Alter the transforms of a rigidBody to match the transforms of a bone.
+     * This is used to make the ragdoll follow animated motion in Kinematic mode
      *
-     * @param link the link containing the bone and the rigidBody
-     * @param position just a temp vector for position
-     * @param tmpRot1 just a temp quaternion for rotation
+     * @param link the bone link connecting the bone and the rigidBody
+     * @param position temporary storage used in calculations (not null)
+     * @param tmpRot1 temporary storage used in calculations (not null)
      */
     protected void matchPhysicObjectToBone(PhysicsBoneLink link, Vector3f position, Quaternion tmpRot1) {
         //computing position from rotation and scale
@@ -420,15 +515,15 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         targetModel.getWorldRotation().mult(tmpRot1, tmpRot1);
         tmpRot1.normalizeLocal();
 
-        //updating physic location/rotation of the physic bone
+        //updating physics location/rotation of the physics bone
         link.rigidBody.setPhysicsLocation(position);
         link.rigidBody.setPhysicsRotation(tmpRot1);
 
     }
 
     /**
-     * rebuild the ragdoll this is useful if you applied scale on the ragdoll
-     * after it's been initialized, same as reattaching.
+     * Rebuild the ragdoll. This is useful if you applied scale on the ragdoll
+     * after it was initialized. Same as re-attaching.
      */
     public void reBuild() {
         if (spatial == null) {
@@ -438,6 +533,12 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         createSpatialData(spatial);
     }
 
+    /**
+     * Create spatial-dependent data. Invoked when this control is added to a
+     * scene.
+     *
+     * @param model the controlled spatial (not null)
+     */
     @Override
     protected void createSpatialData(Spatial model) {
         targetModel = model;
@@ -462,8 +563,24 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         model.removeControl(sc);
         model.addControl(sc);
 
+        if (boneList.isEmpty()) {
+            // add all bones to the list
+            skeleton = sc.getSkeleton();
+            for (int boneI = 0; boneI < skeleton.getBoneCount(); boneI++) {
+                String boneName = skeleton.getBone(boneI).getName();
+                boneList.add(boneName);
+            }
+        }
+        // filter out bones without vertices
+        filterBoneList(sc);
+
+        if (boneList.isEmpty()) {
+            throw new IllegalArgumentException(
+                    "No suitable bones were found in the model's skeleton.");
+        }
+
         // put into bind pose and compute bone transforms in model space
-        // maybe dont reset to ragdoll out of animations?
+        // maybe don't reset to ragdoll out of animations?
         scanSpatial(model);
 
 
@@ -481,6 +598,31 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         logger.log(Level.FINE, "Created physics ragdoll for skeleton {0}", skeleton);
     }
 
+    /**
+     * Remove any bones without vertices from the boneList, so that every hull
+     * shape will contain at least 1 vertex.
+     */
+    private void filterBoneList(SkeletonControl skeletonControl) {
+        Mesh[] targets = skeletonControl.getTargets();
+        Skeleton skel = skeletonControl.getSkeleton();
+        for (int boneI = 0; boneI < skel.getBoneCount(); boneI++) {
+            String boneName = skel.getBone(boneI).getName();
+            if (boneList.contains(boneName)) {
+                boolean hasVertices = RagdollUtils.hasVertices(boneI, targets,
+                        weightThreshold);
+                if (!hasVertices) {
+                    boneList.remove(boneName);
+                }
+            }
+        }
+    }
+
+    /**
+     * Destroy spatial-dependent data. Invoked when this control is removed from
+     * a spatial.
+     *
+     * @param spat the previously controlled spatial (not null)
+     */
     @Override
     protected void removeSpatialData(Spatial spat) {
         if (added) {
@@ -490,15 +632,22 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * Add a bone name to this control Using this method you can specify which
-     * bones of the skeleton will be used to build the collision shapes.
+     * Add a bone name to this control. Repeated invocations of this method can
+     * be used to specify which bones to use when generating collision shapes.
+     * <p>
+     * Not allowed after attaching the control.
      *
-     * @param name
+     * @param name the name of the bone to add
      */
     public void addBoneName(String name) {
         boneList.add(name);
     }
 
+    /**
+     * Generate physics shapes and bone links for the skeleton.
+     *
+     * @param model the spatial with the model's SkeletonControl (not null)
+     */
     protected void scanSpatial(Spatial model) {
         AnimControl animControl = model.getControl(AnimControl.class);
         Map<Integer, List<Float>> pointsMap = null;
@@ -517,14 +666,24 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         }
     }
 
+    /**
+     * Generate a physics shape and bone links for the specified bone. Note:
+     * recursive!
+     *
+     * @param model the spatial with the model's SkeletonControl (not null)
+     * @param bone the bone to be linked (not null)
+     * @param parent the body linked to the parent bone (not null)
+     * @param reccount depth of the recursion (&ge;1)
+     * @param pointsMap (not null)
+     */
     protected void boneRecursion(Spatial model, Bone bone, PhysicsRigidBody parent, int reccount, Map<Integer, List<Float>> pointsMap) {
         PhysicsRigidBody parentShape = parent;
-        if (boneList.isEmpty() || boneList.contains(bone.getName())) {
+        if (boneList.contains(bone.getName())) {
 
             PhysicsBoneLink link = new PhysicsBoneLink();
             link.bone = bone;
 
-            //creating the collision shape 
+            //create the collision shape
             HullCollisionShape shape = null;
             if (pointsMap != null) {
                 //build a shape for the bone, using the vertices that are most influenced by this bone
@@ -567,16 +726,16 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * Set the joint limits for the joint between the given bone and its parent.
-     * This method can't work before attaching the control to a spatial
+     * Alter the limits of the joint connecting the specified bone to its
+     * parent. Can only be invoked after adding the control to a spatial.
      *
      * @param boneName the name of the bone
-     * @param maxX the maximum rotation on the x axis (in radians)
-     * @param minX the minimum rotation on the x axis (in radians)
-     * @param maxY the maximum rotation on the y axis (in radians)
-     * @param minY the minimum rotation on the z axis (in radians)
-     * @param maxZ the maximum rotation on the z axis (in radians)
-     * @param minZ the minimum rotation on the z axis (in radians)
+     * @param maxX the maximum rotation on the X axis (in radians)
+     * @param minX the minimum rotation on the X axis (in radians)
+     * @param maxY the maximum rotation on the Y axis (in radians)
+     * @param minY the minimum rotation on the Y axis (in radians)
+     * @param maxZ the maximum rotation on the Z axis (in radians)
+     * @param minZ the minimum rotation on the Z axis (in radians)
      */
     public void setJointLimit(String boneName, float maxX, float minX, float maxY, float minY, float maxZ, float minZ) {
         PhysicsBoneLink link = boneLinks.get(boneName);
@@ -588,8 +747,8 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * Return the joint between the given bone and its parent. This return null
-     * if it's called before attaching the control to a spatial
+     * Return the joint between the specified bone and its parent. This return
+     * null if it's invoked before adding the control to a spatial
      *
      * @param boneName the name of the bone
      * @return the joint between the given bone and its parent
@@ -654,9 +813,9 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * For internal use only callback for collisionevent
+     * For internal use only: callback for collision event
      *
-     * @param event
+     * @param event (not null)
      */
     public void collision(PhysicsCollisionEvent event) {
         PhysicsCollisionObject objA = event.getObjectA();
@@ -707,11 +866,11 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
 
     /**
      * Enable or disable the ragdoll behaviour. if ragdollEnabled is true, the
-     * character motion will only be powerd by physics else, the characted will
+     * character motion will only be powered by physics else, the character will
      * be animated by the keyframe animation, but will be able to physically
-     * interact with its physic environnement
+     * interact with its physics environment
      *
-     * @param ragdollEnabled
+     * @param mode an enum value (not null)
      */
     protected void setMode(Mode mode) {
         this.mode = mode;
@@ -789,9 +948,9 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * Set the control into Kinematic mode In theis mode, the collision shapes
-     * follow the movements of the skeleton, and can interact with physical
-     * environement
+     * Put the control into Kinematic mode. In this mode, the collision shapes
+     * follow the movements of the skeleton while interacting with the physics
+     * environment.
      */
     public void setKinematicMode() {
         if (mode != Mode.Kinematic) {
@@ -810,8 +969,8 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * Sets the control into Inverse Kinematics mode. The affected bones are affected by IK.
-     * physics.
+     * Sets the control into Inverse Kinematics mode. The affected bones are
+     * affected by IK. physics.
      */
     public void setIKMode() {
         if (mode != Mode.IK) {
@@ -820,18 +979,18 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
     
     /**
-     * retruns the mode of this control
+     * returns the mode of this control
      *
-     * @return
+     * @return an enum value
      */
     public Mode getMode() {
         return mode;
     }
 
     /**
-     * add a
+     * Add a collision listener to this control.
      *
-     * @param listener
+     * @param listener (not null, alias created)
      */
     public void addCollisionListener(RagdollCollisionListener listener) {
         if (listeners == null) {
@@ -840,35 +999,66 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         listeners.add(listener);
     }
 
+    /**
+     * Alter the ragdoll's root mass.
+     *
+     * @param rootMass the desired mass (&ge;0)
+     */
     public void setRootMass(float rootMass) {
         this.rootMass = rootMass;
     }
 
+    /**
+     * Read the ragdoll's total mass.
+     *
+     * @return mass (&ge;0)
+     */
     public float getTotalMass() {
         return totalMass;
     }
 
+    /**
+     * Read the ragdoll's weight threshold.
+     *
+     * @return threshold
+     */
     public float getWeightThreshold() {
         return weightThreshold;
     }
 
+    /**
+     * Alter the ragdoll's weight threshold.
+     *
+     * @param weightThreshold the desired threshold
+     */
     public void setWeightThreshold(float weightThreshold) {
         this.weightThreshold = weightThreshold;
     }
 
+    /**
+     * Read the ragdoll's event-dispatch impulse threshold.
+     *
+     * @return threshold
+     */
     public float getEventDispatchImpulseThreshold() {
         return eventDispatchImpulseThreshold;
     }
 
+    /**
+     * Alter the ragdoll's event-dispatch impulse threshold.
+     *
+     * @param eventDispatchImpulseThreshold desired threshold
+     */
     public void setEventDispatchImpulseThreshold(float eventDispatchImpulseThreshold) {
         this.eventDispatchImpulseThreshold = eventDispatchImpulseThreshold;
     }
 
     /**
-     * Set the CcdMotionThreshold of all the bone's rigidBodies of the ragdoll
+     * Alter the CcdMotionThreshold of all rigid bodies in the ragdoll.
      *
      * @see PhysicsRigidBody#setCcdMotionThreshold(float)
-     * @param value
+     * @param value the desired threshold value (velocity, &gt;0) or zero to
+     * disable CCD (default=0)
      */
     public void setCcdMotionThreshold(float value) {
         for (PhysicsBoneLink link : boneLinks.values()) {
@@ -877,10 +1067,11 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * Set the CcdSweptSphereRadius of all the bone's rigidBodies of the ragdoll
+     * Alter the CcdSweptSphereRadius of all rigid bodies in the ragdoll.
      *
      * @see PhysicsRigidBody#setCcdSweptSphereRadius(float)
-     * @param value
+     * @param value the desired radius of the sphere used for continuous
+     * collision detection (&ge;0)
      */
     public void setCcdSweptSphereRadius(float value) {
         for (PhysicsBoneLink link : boneLinks.values()) {
@@ -889,7 +1080,7 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * return the rigidBody associated to the given bone
+     * Access the rigidBody associated with the named bone.
      *
      * @param boneName the name of the bone
      * @return the associated rigidBody.
@@ -903,25 +1094,22 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * For internal use only specific render for the ragdoll(if debugging)
+     * Render this control. Invoked once per view port per frame, provided the
+     * control is added to a scene. Should be invoked only by a subclass or by
+     * the RenderManager.
      *
-     * @param rm
-     * @param vp
+     * @param rm the render manager (not null)
+     * @param vp the view port to render (not null)
      */
     @Override
     public void render(RenderManager rm, ViewPort vp) {
     }
 
-    @Override
-    public Control cloneForSpatial(Spatial spatial) {
-        KinematicRagdollControl control = new KinematicRagdollControl(preset, weightThreshold);
-        control.setMode(mode);
-        control.setRootMass(rootMass);
-        control.setWeightThreshold(weightThreshold);
-        control.setApplyPhysicsLocal(applyLocal);
-        return control;
-    }
-   
+    /**
+     * Create a shallow clone for the JME cloner.
+     *
+     * @return a new control (not null)
+     */
     @Override   
     public Object jmeClone() {
         KinematicRagdollControl control = new KinematicRagdollControl(preset, weightThreshold);        
@@ -933,6 +1121,14 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         return control;
     }     
 
+    /**
+     * Add a target for inverse kinematics.
+     *
+     * @param bone which bone the IK applies to (not null)
+     * @param worldPos the world coordinates of the goal (not null)
+     * @param chainLength number of bones in the chain
+     * @return a new instance (not null, already added to ikTargets)
+     */
     public Vector3f setIKTarget(Bone bone, Vector3f worldPos, int chainLength) {
         Vector3f target = worldPos.subtract(targetModel.getWorldTranslation());
         ikTargets.put(bone.getName(), target);
@@ -951,6 +1147,11 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         return target;
     }
 
+    /**
+     * Remove the inverse-kinematics target for the specified bone.
+     *
+     * @param bone which bone has the target (not null, modified)
+     */
     public void removeIKTarget(Bone bone) {
         int depth = ikChainDepth.remove(bone.getName());
         int i = 0;
@@ -964,11 +1165,19 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
         }
     }
     
+    /**
+     * Remove all inverse-kinematics targets.
+     */
     public void removeAllIKTargets(){
         ikTargets.clear();
         ikChainDepth.clear();
         applyUserControl();
     }
+
+    /**
+     * Ensure that user control is enabled for any bones used by inverse
+     * kinematics and disabled for any other bones.
+     */
     public void applyUserControl() {
         for (Bone bone : skeleton.getRoots()) {
             RagdollUtils.setUserControl(bone, false);
@@ -995,39 +1204,77 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
             vars.release();
         }
     }
+
+    /**
+     * Read the rotation speed for inverse kinematics.
+     *
+     * @return speed (&ge;0)
+     */
     public float getIkRotSpeed() {
         return ikRotSpeed;
     }
 
+    /**
+     * Alter the rotation speed for inverse kinematics.
+     *
+     * @param ikRotSpeed the desired speed (&ge;0, default=7)
+     */
     public void setIkRotSpeed(float ikRotSpeed) {
         this.ikRotSpeed = ikRotSpeed;
     }
 
+    /**
+     * Read the distance threshold for inverse kinematics.
+     *
+     * @return distance threshold
+     */
     public float getIKThreshold() {
         return IKThreshold;
     }
 
+    /**
+     * Alter the distance threshold for inverse kinematics.
+     *
+     * @param IKThreshold the desired distance threshold (default=0.1)
+     */
     public void setIKThreshold(float IKThreshold) {
         this.IKThreshold = IKThreshold;
     }
 
-    
+    /**
+     * Read the limb damping.
+     *
+     * @return the viscous damping ratio (0&rarr;no damping, 1&rarr;critically
+     * damped)
+     */
     public float getLimbDampening() {
         return limbDampening;
     }
 
+    /**
+     * Alter the limb damping.
+     *
+     * @param limbDampening the desired viscous damping ratio (0&rarr;no
+     * damping, 1&rarr;critically damped, default=0.6)
+     */
     public void setLimbDampening(float limbDampening) {
         this.limbDampening = limbDampening;
     }
     
+    /**
+     * Access the named bone.
+     *
+     * @param name which bone to access
+     * @return the pre-existing instance, or null if not found
+     */
     public Bone getBone(String name){
         return skeleton.getBone(name);
     }
     /**
-     * serialize this control
+     * Serialize this control, for example when saving to a J3O file.
      *
-     * @param ex
-     * @throws IOException
+     * @param ex exporter (not null)
+     * @throws IOException from exporter
      */
     @Override
     public void write(JmeExporter ex) throws IOException {
@@ -1054,10 +1301,10 @@ public class KinematicRagdollControl extends AbstractPhysicsControl implements P
     }
 
     /**
-     * de-serialize this control
+     * De-serialize this control, for example when loading from a J3O file.
      *
-     * @param im
-     * @throws IOException
+     * @param im importer (not null)
+     * @throws IOException from importer
      */
     @Override
     public void read(JmeImporter im) throws IOException {

+ 26 - 10
jme3-bullet/src/common/java/com/jme3/bullet/control/PhysicsControl.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2012 jMonkeyEngine
+ * Copyright (c) 2009-2018 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -35,31 +35,47 @@ import com.jme3.bullet.PhysicsSpace;
 import com.jme3.scene.control.Control;
 
 /**
+ * An interface for a scene-graph control that links a physics object to a
+ * Spatial.
+ * <p>
+ * This interface is shared between JBullet and Native Bullet.
  *
  * @author normenhansen
  */
 public interface PhysicsControl extends Control {
 
     /**
-     * Only used internally, do not call.
-     * @param space
+     * If enabled, add this control's physics object to the specified physics
+     * space. In not enabled, alter where the object would be added. The object
+     * is removed from any other space it's currently in.
+     *
+     * @param space where to add, or null to simply remove
      */
     public void setPhysicsSpace(PhysicsSpace space);
 
+    /**
+     * Access the physics space to which the object is (or would be) added.
+     *
+     * @return the pre-existing space, or null for none
+     */
     public PhysicsSpace getPhysicsSpace();
 
     /**
-     * The physics object is removed from the physics space when the control
-     * is disabled. When the control is enabled  again the physics object is
-     * moved to the current location of the spatial and then added to the physics
-     * space. This allows disabling/enabling physics to move the spatial freely.
-     * @param state
+     * Enable or disable this control.
+     * <p>
+     * The physics object is removed from its physics space when the control is
+     * disabled. When the control is enabled again, the physics object is moved
+     * to the current location of the spatial and then added to the physics
+     * space.
+     *
+     * @param state true&rarr;enable the control, false&rarr;disable it
      */
     public void setEnabled(boolean state);
 
     /**
-     * Returns the current enabled state of the physics control
-     * @return current enabled state
+     * Test whether this control is enabled.
+     *
+     * @return true if enabled, otherwise false
      */
     public boolean isEnabled();
 }

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.