diff --git a/.gitignore b/.gitignore index 065ad23112..03507b6786 100644 --- a/.gitignore +++ b/.gitignore @@ -22,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.86.1/ +/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/ diff --git a/.travis.yml b/.travis.yml index 00aed0854f..fc586f6397 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: java -sudo: false -dist: precise +sudo: true branches: only: @@ -15,7 +14,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: diff --git a/appveyor.yml b/appveyor.yml index dc36e789eb..036db80012 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -41,6 +41,8 @@ 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" diff --git a/build.gradle b/build.gradle index 14d97755e2..3ccd202a90 100644 --- a/build.gradle +++ b/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' } } @@ -115,10 +116,6 @@ task mergedSource(type: Copy){ } -task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper to the current directory.') { - gradleVersion = '4.1' -} - ext { ndkCommandPath = "" ndkExists = false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 51288f9c2f..7a3265ee94 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3a174dff1c..76e4690af0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sun Sep 17 22:55:30 EDT 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.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 diff --git a/gradlew b/gradlew index 4453ccea33..cccdd3d517 100755 --- a/gradlew +++ b/gradlew @@ -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 @@ -155,7 +155,7 @@ if $cygwin ; then fi # Escape application args -save ( ) { +save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } diff --git a/jme3-bullet-native/build.gradle b/jme3-bullet-native/build.gradle index b94769943f..55273f09e9 100644 --- a/jme3-bullet-native/build.gradle +++ b/jme3-bullet-native/build.gradle @@ -11,6 +11,16 @@ 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 +} model { components { @@ -77,6 +87,7 @@ model { return } + cppCompiler.define('BT_NO_PROFILE') if (toolChain in VisualCpp) { cppCompiler.args "/I$javaHome\\include" } else{ @@ -115,7 +126,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 +213,7 @@ unzipBulletIfNeeded.dependsOn { } } -// Helper class to wrap ant dowload task +// Helper class to wrap ant download task class MyDownload extends DefaultTask { @Input String sourceUrl diff --git a/jme3-bullet-native/libs/native/linux/x86/libbulletjme.so b/jme3-bullet-native/libs/native/linux/x86/libbulletjme.so index 9296f0a930..9aa3d7a26c 100755 Binary files a/jme3-bullet-native/libs/native/linux/x86/libbulletjme.so and b/jme3-bullet-native/libs/native/linux/x86/libbulletjme.so differ diff --git a/jme3-bullet-native/libs/native/linux/x86_64/libbulletjme.so b/jme3-bullet-native/libs/native/linux/x86_64/libbulletjme.so index 2d41558d41..ae2e70eb0b 100755 Binary files a/jme3-bullet-native/libs/native/linux/x86_64/libbulletjme.so and b/jme3-bullet-native/libs/native/linux/x86_64/libbulletjme.so differ diff --git a/jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib b/jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib index 3ace9e9461..953b2eade2 100755 Binary files a/jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib and b/jme3-bullet-native/libs/native/osx/x86/libbulletjme.dylib differ diff --git a/jme3-bullet-native/libs/native/osx/x86_64/libbulletjme.dylib b/jme3-bullet-native/libs/native/osx/x86_64/libbulletjme.dylib index 594501d671..1a9432c8dc 100755 Binary files a/jme3-bullet-native/libs/native/osx/x86_64/libbulletjme.dylib and b/jme3-bullet-native/libs/native/osx/x86_64/libbulletjme.dylib differ diff --git a/jme3-bullet-native/libs/native/windows/x86/bulletjme.dll b/jme3-bullet-native/libs/native/windows/x86/bulletjme.dll index ab0ef06dac..f4556c5ad5 100755 Binary files a/jme3-bullet-native/libs/native/windows/x86/bulletjme.dll and b/jme3-bullet-native/libs/native/windows/x86/bulletjme.dll differ diff --git a/jme3-bullet-native/libs/native/windows/x86_64/bulletjme.dll b/jme3-bullet-native/libs/native/windows/x86_64/bulletjme.dll index f73fc45c4c..8a4ac5c807 100755 Binary files a/jme3-bullet-native/libs/native/windows/x86_64/bulletjme.dll and b/jme3-bullet-native/libs/native/windows/x86_64/bulletjme.dll differ diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace.h deleted file mode 100644 index b7b932df9c..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace.h +++ /dev/null @@ -1,187 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace_BroadphaseType.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace_BroadphaseType.h deleted file mode 100644 index 04eb0f45f6..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_PhysicsSpace_BroadphaseType.h +++ /dev/null @@ -1,13 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionEvent.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionEvent.h deleted file mode 100644 index 2dd9dcf3b9..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionEvent.h +++ /dev/null @@ -1,173 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionObject.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionObject.h deleted file mode 100644 index db5bf7aafa..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_PhysicsCollisionObject.h +++ /dev/null @@ -1,87 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_BoxCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_BoxCollisionShape.h deleted file mode 100644 index 5602a0dd34..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_BoxCollisionShape.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.h deleted file mode 100644 index 4d706748d8..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CapsuleCollisionShape.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CollisionShape.h deleted file mode 100644 index cd5d70f213..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CollisionShape.h +++ /dev/null @@ -1,45 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CompoundCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CompoundCollisionShape.h deleted file mode 100644 index 18783ce1d2..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CompoundCollisionShape.h +++ /dev/null @@ -1,37 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_ConeCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_ConeCollisionShape.h deleted file mode 100644 index 711276ebbf..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_ConeCollisionShape.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CylinderCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CylinderCollisionShape.h deleted file mode 100644 index 48a665ac75..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_CylinderCollisionShape.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_GImpactCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_GImpactCollisionShape.h deleted file mode 100644 index f08d3ebf8b..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_GImpactCollisionShape.h +++ /dev/null @@ -1,29 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.h deleted file mode 100644 index a3d1621b89..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_HeightfieldCollisionShape.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_HullCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_HullCollisionShape.h deleted file mode 100644 index 42a267216e..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_HullCollisionShape.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_MeshCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_MeshCollisionShape.h deleted file mode 100644 index 11b2aa32aa..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_MeshCollisionShape.h +++ /dev/null @@ -1,45 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_PlaneCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_PlaneCollisionShape.h deleted file mode 100644 index 7e7a22bdfe..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_PlaneCollisionShape.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_SimplexCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_SimplexCollisionShape.h deleted file mode 100644 index e50d06226a..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_SimplexCollisionShape.h +++ /dev/null @@ -1,45 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_SphereCollisionShape.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_SphereCollisionShape.h deleted file mode 100644 index ef1b2cbed5..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_collision_shapes_SphereCollisionShape.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_ConeJoint.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_ConeJoint.h deleted file mode 100644 index 327b47f257..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_ConeJoint.h +++ /dev/null @@ -1,37 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_HingeJoint.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_HingeJoint.h deleted file mode 100644 index ab6e0034f7..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_HingeJoint.h +++ /dev/null @@ -1,101 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_PhysicsJoint.cpp b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_PhysicsJoint.cpp index 129865034f..b00425e88c 100644 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_PhysicsJoint.cpp +++ b/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 (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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_PhysicsJoint.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_PhysicsJoint.h deleted file mode 100644 index 63e21a7d38..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_PhysicsJoint.h +++ /dev/null @@ -1,29 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_Point2PointJoint.cpp b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_Point2PointJoint.cpp index f6d7855832..5284518788 100644 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_Point2PointJoint.cpp +++ b/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(jointId); + btPoint2PointConstraint* joint = reinterpret_cast (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(jointId); + btPoint2PointConstraint* joint = reinterpret_cast (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; } /* diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_Point2PointJoint.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_Point2PointJoint.h deleted file mode 100644 index 5cb8188a84..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_Point2PointJoint.h +++ /dev/null @@ -1,69 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofJoint.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofJoint.h deleted file mode 100644 index 86e6102346..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofJoint.h +++ /dev/null @@ -1,69 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofSpringJoint.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofSpringJoint.h deleted file mode 100644 index b4fced0c97..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SixDofSpringJoint.h +++ /dev/null @@ -1,61 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SliderJoint.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SliderJoint.h deleted file mode 100644 index 7afd66a560..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_SliderJoint.h +++ /dev/null @@ -1,469 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_RotationalLimitMotor.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_RotationalLimitMotor.h deleted file mode 100644 index b14bf1d73a..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_RotationalLimitMotor.h +++ /dev/null @@ -1,173 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_TranslationalLimitMotor.cpp b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_TranslationalLimitMotor.cpp index ecc6c429b9..39db519e70 100644 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_TranslationalLimitMotor.cpp +++ b/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(motorId); + btTranslationalLimitMotor* motor = reinterpret_cast (motorId); if (motor == NULL) { jclass newExc = env->FindClass("java/lang/NullPointerException"); env->ThrowNew(newExc, "The native object does not exist."); diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_TranslationalLimitMotor.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_TranslationalLimitMotor.h deleted file mode 100644 index 0ea93e2b1f..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_joints_motors_TranslationalLimitMotor.h +++ /dev/null @@ -1,109 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsCharacter.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsCharacter.h deleted file mode 100644 index 53bad55b27..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsCharacter.h +++ /dev/null @@ -1,331 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsGhostObject.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsGhostObject.h deleted file mode 100644 index cf98e59705..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsGhostObject.h +++ /dev/null @@ -1,167 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp index 465c156203..1d726038fd 100644 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.cpp +++ b/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); } /* diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h deleted file mode 100644 index 4374fa4f28..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsRigidBody.h +++ /dev/null @@ -1,447 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsVehicle.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsVehicle.h deleted file mode 100644 index 821e384cc5..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_PhysicsVehicle.h +++ /dev/null @@ -1,143 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_VehicleWheel.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_VehicleWheel.h deleted file mode 100644 index f4ab208aea..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_VehicleWheel.h +++ /dev/null @@ -1,69 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_infos_RigidBodyMotionState.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_infos_RigidBodyMotionState.h deleted file mode 100644 index 7939038d27..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_objects_infos_RigidBodyMotionState.h +++ /dev/null @@ -1,61 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_util_DebugShapeFactory.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_util_DebugShapeFactory.h deleted file mode 100644 index 757696fcce..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_util_DebugShapeFactory.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_util_NativeMeshUtil.h b/jme3-bullet-native/src/native/cpp/com_jme3_bullet_util_NativeMeshUtil.h deleted file mode 100644 index 0be9f4d5a1..0000000000 --- a/jme3-bullet-native/src/native/cpp/com_jme3_bullet_util_NativeMeshUtil.h +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include -/* 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 diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/BulletAppState.java b/jme3-bullet/src/common/java/com/jme3/bullet/BulletAppState.java index addea7a5e0..9fb5b85f1c 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/BulletAppState.java +++ b/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.Logger; /** - * BulletAppState allows using bullet physics in an Application. + * An app state to manage a single Bullet physics space. + *

+ * 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().attach(bulletAppState) to enable - * physics for an Application. + * Instantiate an app state to manage a new PhysicsSpace with DBVT collision + * detection. + *

+ * Use getStateManager().addState(bulletAppState) to start physics. */ public BulletAppState() { } /** - * Creates a new BulletAppState running a PhysicsSpace for physics - * simulation, use getStateManager().attach(bulletAppState) to enable - * physics for an Application. + * Instantiate an app state to manage a new PhysicsSpace. + *

+ * 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().attach(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. + *

+ * 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. + *

+ * 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 Boolean call() throws Exception { } }; + /** + * 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. + *

+ * 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 void stopPhysics() { 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 → enable, false → 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 → enable, false → 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 void stateAttached(AppStateManager stateManager) { } } + /** + * 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, ≥0) + */ public void update(float tpf) { if (debugEnabled && debugAppState == null && pSpace != null) { debugAppState = new BulletDebugAppState(pSpace); @@ -237,6 +381,13 @@ public void update(float tpf) { 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 void render(RenderManager rm) { } } + /** + * 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 void postRender() { } } + /** + * 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 void cleanup() { } /** - * @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 (≥0, default=1) + */ public float getSpeed() { return speed; } + /** + * Alter the simulation speed. + * + * @param speed the desired speed (≥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, ≥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, ≥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.
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, } diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/PhysicsTickListener.java b/jme3-bullet/src/common/java/com/jme3/bullet/PhysicsTickListener.java index 0a52a51195..7bbd704aa1 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/PhysicsTickListener.java +++ b/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. + *

+ * 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, ≥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, ≥0) */ public void physicsTick(PhysicsSpace space, float tpf); diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/collision/PhysicsCollisionGroupListener.java b/jme3-bullet/src/common/java/com/jme3/bullet/collision/PhysicsCollisionGroupListener.java index d5d010d873..4a7a0432d6 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/collision/PhysicsCollisionGroupListener.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/collision/PhysicsCollisionGroupListener.java @@ -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. + *

+ * 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, called from physics thread.
- * This is only called when the collision will happen based on the collisionGroup and collideWithGroups - * settings in the PhysicsCollisionObject. That is the case when one of the parties has the - * collisionGroup of the other in its collideWithGroups set.
- * @param nodeA CollisionObject #1 - * @param nodeB CollisionObject #2 + * Invoked when two physics objects of the registered group are about to + * collide. invoked on the physics thread.
+ * This is only invoked when the collision will happen based on the + * collisionGroup and collideWithGroups settings in the + * PhysicsCollisionObject. That is the case when one 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); diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/collision/PhysicsCollisionListener.java b/jme3-bullet/src/common/java/com/jme3/bullet/collision/PhysicsCollisionListener.java index b49e3627fd..8bcaf4e22d 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/collision/PhysicsCollisionListener.java +++ b/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. + *

+ * This interface is shared between JBullet and Native Bullet. + * * @author normenhansen */ public interface PhysicsCollisionListener { /** - * Called when a collision happened in the PhysicsSpace, called from render thread. - * - * 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. Invoked on the + * render thread. + *

+ * 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); diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/collision/RagdollCollisionListener.java b/jme3-bullet/src/common/java/com/jme3/bullet/collision/RagdollCollisionListener.java index cb00aeff3c..84e50cdaed 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/collision/RagdollCollisionListener.java +++ b/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 @@ import com.jme3.animation.Bone; /** + * Interface to receive notifications whenever a KinematicRagdollControl + * collides with another physics object. + *

+ * 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); } diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/collision/shapes/infos/ChildCollisionShape.java b/jme3-bullet/src/common/java/com/jme3/bullet/collision/shapes/infos/ChildCollisionShape.java index ac71962585..1ca8bc37c4 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/collision/shapes/infos/ChildCollisionShape.java +++ b/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 java.io.IOException; /** + * An element of a CompoundCollisionShape, consisting of a (non-compound) child + * shape, offset and rotated with respect to its parent. + *

+ * 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 void write(JmeExporter ex) throws IOException { 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()); diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/control/AbstractPhysicsControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/control/AbstractPhysicsControl.java index 4f6eef4884..f858d0e00e 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/control/AbstractPhysicsControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/control/AbstractPhysicsControl.java @@ -47,82 +47,113 @@ 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. + *

+ * 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→control is enabled, false→control is disabled + */ protected boolean enabled = true; + /** + * true→body is added to the physics space, false→not added + */ protected boolean added = false; + /** + * space to which the physics object is (or would be) added + */ protected PhysicsSpace space = null; + /** + * true → physics coordinates match local transform, false → + * 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→match local coordinates, + * false→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(); @@ -130,6 +161,12 @@ protected Vector3f getSpatialTranslation() { 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(); @@ -138,10 +175,12 @@ protected Quaternion getSpatialRotation() { } /** - * 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) { @@ -170,12 +209,28 @@ 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); @@ -191,6 +246,15 @@ public void setSpatial(Spatial spatial) { setPhysicsRotation(getSpatialRotation()); } + /** + * Enable or disable this control. + *

+ * 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→enable the control, false→disable it + */ public void setEnabled(boolean enabled) { this.enabled = enabled; if (space != null) { @@ -208,6 +272,11 @@ public void setEnabled(boolean enabled) { } } + /** + * Test whether this control is enabled. + * + * @return true if enabled, otherwise false + */ public boolean isEnabled() { return enabled; } @@ -218,28 +287,48 @@ public void update(float tpf) { 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); @@ -248,6 +337,13 @@ public void write(JmeExporter ex) throws IOException { 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); diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/control/BetterCharacterControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/control/BetterCharacterControl.java index 660b7f559d..027d00f330 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/control/BetterCharacterControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/control/BetterCharacterControl.java @@ -56,15 +56,18 @@ 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. + *

+ * 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. + *

+ * The character keeps their own local coordinate system which adapts based on + * the gravity working on the character so they will always stand upright. + *

+ * Motion in the local X-Z plane is damped. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen */ @@ -74,10 +77,16 @@ public class BetterCharacterControl extends AbstractPhysicsControl implements Ph protected PhysicsRigidBody rigidBody; protected float radius; protected float height; + /** + * mass of this character (>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); /** @@ -94,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→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(); @@ -119,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. + *

+ * 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 (>0) + * @param height the height of the character's collision shape + * (>2*radius) + * @param mass the character's mass (≥0) */ public BetterCharacterControl(float radius, float height, float mass) { this.radius = radius; @@ -143,6 +160,13 @@ public BetterCharacterControl(float radius, float height, float mass) { 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, ≥0) + */ @Override public void update(float tpf) { super.update(tpf); @@ -151,16 +175,24 @@ public void update(float tpf) { 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, ≥0) */ public void prePhysicsTick(PhysicsSpace space, float tpf) { checkOnGround(); @@ -172,8 +204,8 @@ public void prePhysicsTick(PhysicsSpace space, float tpf) { 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; @@ -208,20 +240,20 @@ public void prePhysicsTick(PhysicsSpace space, float tpf) { } /** - * 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, ≥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); @@ -239,32 +271,32 @@ public void jump() { } /** - * 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; @@ -274,10 +306,10 @@ public boolean isOnGround() { * 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→duck, false→unduck */ public void setDucked(boolean enabled) { if (enabled) { @@ -298,33 +330,33 @@ public void setDucked(boolean enabled) { * 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 (≥0, ≤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 (≥0, ≤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. * @@ -335,20 +367,19 @@ public void setWalkDirection(Vector3f vec) { } /** - * 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); @@ -356,10 +387,10 @@ public void setViewDirection(Vector3f vec) { } /** - * 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; @@ -367,15 +398,15 @@ public Vector3f getViewDirection() { /** * 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) { @@ -386,23 +417,21 @@ public void resetForward(Vector3f vec) { } /** - * 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); @@ -411,46 +440,48 @@ public void setGravity(Vector3f gravity) { } /** - * 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→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→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); @@ -458,7 +489,7 @@ protected void setHeightPercent(float percent) { } /** - * 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(); @@ -499,12 +530,10 @@ protected boolean checkCanUnDuck() { } /** - * 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.. @@ -516,18 +545,18 @@ protected CollisionShape getShape() { } /** - * 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(); @@ -536,7 +565,7 @@ protected float getFinalRadius() { /** * 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) @@ -547,8 +576,8 @@ protected void updateLocalCoordinateSystem() { } /** - * 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 @@ -568,7 +597,6 @@ protected void updateLocalViewDirection() { * 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) { @@ -600,10 +628,9 @@ protected final void calculateNewForward(Quaternion rotation, Vector3f direction } /** - * 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) { @@ -612,12 +639,12 @@ protected void setPhysicsLocation(Vector3f vec) { } /** - * 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. + *

+ * 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) { @@ -627,10 +654,9 @@ protected void setPhysicsRotation(Quaternion quat) { } /** - * 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) { @@ -642,10 +668,9 @@ protected void addPhysics(PhysicsSpace space) { } /** - * 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) { @@ -653,16 +678,33 @@ protected void removePhysics(PhysicsSpace space) { 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); } + /** + * 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); @@ -671,6 +713,12 @@ public Object jmeClone() { 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); @@ -682,6 +730,12 @@ public void write(JmeExporter ex) throws IOException { 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); diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/control/CharacterControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/control/CharacterControl.java index 5291c4f40f..85dcf1a955 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/control/CharacterControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/control/CharacterControl.java @@ -190,21 +190,31 @@ public void update(float tpf) { 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() { diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/control/GhostControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/control/GhostControl.java index 4aae0f9678..7ff51670d2 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/control/GhostControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/control/GhostControl.java @@ -49,38 +49,82 @@ 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. + *

+ * 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). + *

+ * 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→control is enabled, false→control is disabled + */ protected boolean enabled = true; + /** + * true→body is added to the physics space, false→not added + */ protected boolean added = false; + /** + * space to which the ghost object is (or would be) added + */ protected PhysicsSpace space = null; + /** + * true → physics coordinates match local transform, false → + * 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→match local coordinates, + * false→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 @@ private Vector3f getSpatialTranslation() { 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,12 +144,23 @@ private Quaternion getSpatialRotation() { 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) { throw new UnsupportedOperationException(); } + /** + * Create a shallow clone for the JME cloner. + * + * @return a new control (not null) + */ @Override public Object jmeClone() { GhostControl control = new GhostControl(collisionShape); @@ -115,11 +175,27 @@ public Object jmeClone() { 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); @@ -130,6 +206,15 @@ public void setSpatial(Spatial spatial) { setPhysicsRotation(getSpatialRotation()); } + /** + * Enable or disable this control. + *

+ * 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→enable the control, false→disable it + */ public void setEnabled(boolean enabled) { this.enabled = enabled; if (space != null) { @@ -147,10 +232,22 @@ public void setEnabled(boolean enabled) { } } + /** + * 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, ≥0) + */ public void update(float tpf) { if (!enabled) { return; @@ -159,29 +256,60 @@ public void update(float tpf) { 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); @@ -191,6 +319,12 @@ public void write(JmeExporter ex) throws IOException { 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); diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/control/KinematicRagdollControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/control/KinematicRagdollControl.java index 49c0e0f341..8a99ddc226 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/control/KinematicRagdollControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/control/KinematicRagdollControl.java @@ -43,11 +43,11 @@ 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.util.TempVars; import com.jme3.util.clone.JmeCloneable; - import java.io.IOException; import java.util.*; import java.util.logging.Level; @@ -58,32 +58,39 @@ * use this control you need a model with an AnimControl and a * SkeletonControl.
This should be the case if you imported an animated * model from Ogre or blender.
Note enabling/disabling the control - * add/removes it from the physics space

This control creates collision - * shapes for each bones of the skeleton when you call - * spatial.addControl(ragdollControl).

  • The shape is HullCollision shape - * based on the vertices associated with each bone and based on a tweakable - * weight threshold (see setWeightThreshold)
  • If you don't want each - * bone to be a collision shape, you can specify what bone to use by using the - * addBoneName method
    By using this method, bone that are not used to create - * a shape, are "merged" to their parent to create the collision shape.
  • - *

There are 2 modes for this control :

  • The - * kinematic modes :
    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();
  • The ragdoll modes - * :
    To enable this behavior, you need to call 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.
  • - *

- * - * @author Normen Hansen and Rémy Bouquet (Nehon) + * add/removes it from the physics space
+ *

+ * This control creates collision shapes for each bones of the skeleton when you + * invoke spatial.addControl(ragdollControl).

  • The shape is + * HullCollision shape based on the vertices associated with each bone and based + * on a tweakable weight threshold (see setWeightThreshold)
  • If you + * don't want each bone to be a collision shape, you can specify what bone to + * use by using the addBoneName method
    By using this method, bone that are + * not used to create a shape, are "merged" to their parent to create the + * collision shape.
  • + *
+ *

+ * There are 2 modes for this control :

  • The kinematic modes + * :
    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();
  • The ragdoll modes:
    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.
  • + *
+ *

+ * This class is shared between JBullet and Native Bullet. * - * TODO this needs to be redone with the new animation system + * @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 listeners; protected final Set boneList = new TreeSet(); @@ -91,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; @@ -100,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, ≥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 ikTargets = new HashMap(); private Map ikChainDepth = new HashMap(); + /** + * rotational speed for inverse kinematics (radians per second, default=7) + */ private float ikRotSpeed = 7f; + /** + * viscous limb-damping ratio (0→no damping, 1→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; @@ -126,17 +168,37 @@ public class PhysicsBoneLink implements Savable { 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); @@ -147,6 +209,14 @@ public void write(JmeExporter ex) throws IOException { 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); @@ -159,29 +229,54 @@ public void read(JmeImporter im) throws IOException { } /** - * construct 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 (>0, <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 (>0, <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, ≥0) + */ + @Override public void update(float tpf) { if (!enabled) { return; @@ -196,6 +291,11 @@ public void update(float tpf) { } } + /** + * Update this control in Ragdoll mode, based on Bullet physics. + * + * @param tpf the time interval between frames (in seconds, ≥0) + */ protected void ragDollUpdate(float tpf) { TempVars vars = TempVars.get(); Quaternion tmpRot1 = vars.quat1; @@ -213,7 +313,7 @@ protected void ragDollUpdate(float tpf) { //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); @@ -237,20 +337,19 @@ protected void ragDollUpdate(float tpf) { 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 recursively - 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, ≥0) + */ protected void kinematicUpdate(float tpf) { //the ragdoll does not have control, so the keyframed animation updates the physics position of the physics bonces TempVars vars = TempVars.get(); @@ -261,7 +360,7 @@ protected void kinematicUpdate(float tpf) { // 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; @@ -275,17 +374,8 @@ protected void kinematicUpdate(float tpf) { 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); @@ -301,6 +391,11 @@ protected void kinematicUpdate(float tpf) { } vars.release(); } + /** + * Update this control in IK mode, based on IK targets. + * + * @param tpf the time interval between frames (in seconds, ≥0) + */ private void ikUpdate(float tpf){ TempVars vars = TempVars.get(); @@ -337,6 +432,19 @@ private void ikUpdate(float tpf){ 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, ≥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 (≥0) + * @param maxDepth recursion limit (≥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; @@ -391,13 +499,12 @@ public void updateBone(PhysicsBoneLink link, float tpf, TempVars vars, Quaternio } /** - * 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 @@ -415,8 +522,8 @@ protected void matchPhysicObjectToBone(PhysicsBoneLink link, Vector3f position, } /** - * 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) { @@ -426,6 +533,12 @@ public void reBuild() { 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; @@ -450,8 +563,24 @@ protected void createSpatialData(Spatial model) { 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); @@ -469,6 +598,31 @@ protected void createSpatialData(Spatial model) { 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) { @@ -478,15 +632,22 @@ protected void removeSpatialData(Spatial spat) { } /** - * 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. + *

+ * 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> pointsMap = null; @@ -505,14 +666,24 @@ protected void scanSpatial(Spatial model) { } } + /** + * 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 (≥1) + * @param pointsMap (not null) + */ protected void boneRecursion(Spatial model, Bone bone, PhysicsRigidBody parent, int reccount, Map> 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 @@ -555,16 +726,16 @@ protected void boneRecursion(Spatial model, Bone bone, PhysicsRigidBody parent, } /** - * 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); @@ -576,8 +747,8 @@ public void setJointLimit(String boneName, float maxX, float minX, float maxY, f } /** - * 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 @@ -642,9 +813,9 @@ protected void removePhysics(PhysicsSpace space) { } /** - * 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(); @@ -699,7 +870,7 @@ public void collision(PhysicsCollisionEvent event) { * be animated by the keyframe animation, but will be able to physically * interact with its physics environment * - * @param ragdollEnabled + * @param mode an enum value (not null) */ protected void setMode(Mode mode) { this.mode = mode; @@ -777,9 +948,9 @@ public void blendToKinematicMode(float blendTime) { } /** - * Set the control into Kinematic mode In this mode, the collision shapes - * follow the movements of the skeleton, and can interact with physical - * environment + * 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) { @@ -798,8 +969,8 @@ public void setRagdollMode() { } /** - * 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) { @@ -810,16 +981,16 @@ public void setIKMode() { /** * 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) { @@ -828,35 +999,66 @@ public void addCollisionListener(RagdollCollisionListener listener) { listeners.add(listener); } + /** + * Alter the ragdoll's root mass. + * + * @param rootMass the desired mass (≥0) + */ public void setRootMass(float rootMass) { this.rootMass = rootMass; } + /** + * Read the ragdoll's total mass. + * + * @return mass (≥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, >0) or zero to + * disable CCD (default=0) */ public void setCcdMotionThreshold(float value) { for (PhysicsBoneLink link : boneLinks.values()) { @@ -865,10 +1067,11 @@ public void setCcdMotionThreshold(float value) { } /** - * 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 (≥0) */ public void setCcdSweptSphereRadius(float value) { for (PhysicsBoneLink link : boneLinks.values()) { @@ -877,7 +1080,7 @@ public void setCcdSweptSphereRadius(float value) { } /** - * 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. @@ -891,15 +1094,22 @@ public PhysicsRigidBody getBoneRigidBody(String boneName) { } /** - * 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) { } + /** + * Create a shallow clone for the JME cloner. + * + * @return a new control (not null) + */ @Override public Object jmeClone() { KinematicRagdollControl control = new KinematicRagdollControl(preset, weightThreshold); @@ -911,6 +1121,14 @@ public Object jmeClone() { 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); @@ -929,6 +1147,11 @@ public Vector3f setIKTarget(Bone bone, Vector3f worldPos, int chainLength) { 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; @@ -942,11 +1165,19 @@ public void removeIKTarget(Bone bone) { } } + /** + * 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); @@ -973,39 +1204,77 @@ public void applyUserControl() { vars.release(); } } + + /** + * Read the rotation speed for inverse kinematics. + * + * @return speed (≥0) + */ public float getIkRotSpeed() { return ikRotSpeed; } + /** + * Alter the rotation speed for inverse kinematics. + * + * @param ikRotSpeed the desired speed (≥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→no damping, 1→critically + * damped) + */ public float getLimbDampening() { return limbDampening; } + /** + * Alter the limb damping. + * + * @param limbDampening the desired viscous damping ratio (0→no + * damping, 1→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 { @@ -1032,10 +1301,10 @@ public void write(JmeExporter ex) throws IOException { } /** - * 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 { diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/control/PhysicsControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/control/PhysicsControl.java index 693c155900..1c81a7ff70 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/control/PhysicsControl.java +++ b/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.scene.control.Control; /** + * An interface for a scene-graph control that links a physics object to a + * Spatial. + *

+ * 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. + *

+ * 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→enable the control, false→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(); } diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/control/RigidBodyControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/control/RigidBodyControl.java index 51675b72a3..6b8714da8d 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/control/RigidBodyControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/control/RigidBodyControl.java @@ -56,47 +56,91 @@ import java.io.IOException; /** + * A physics control to link a PhysicsRigidBody to a spatial. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen */ public class RigidBodyControl extends PhysicsRigidBody implements PhysicsControl, JmeCloneable { + /** + * spatial to which this control is added, or null if none + */ protected Spatial spatial; + /** + * true→control is enabled, false→control is disabled + */ protected boolean enabled = true; + /** + * true→body is added to the physics space, false→not added + */ protected boolean added = false; + /** + * space to which the body is (or would be) added + */ protected PhysicsSpace space = null; + /** + * true→body is kinematic, false→body is static or dynamic + */ protected boolean kinematicSpatial = true; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public RigidBodyControl() { } /** - * When using this constructor, the CollisionShape for the RigidBody is generated - * automatically when the Control is added to a Spatial. - * @param mass When not 0, a HullCollisionShape is generated, otherwise a MeshCollisionShape is used. For geometries with box or sphere meshes the proper box or sphere collision shape is used. + * When using this constructor, the CollisionShape for the RigidBody is + * generated automatically when the control is added to a spatial. + * + * @param mass When not 0, a HullCollisionShape is generated, otherwise a + * MeshCollisionShape is used. For geometries with box or sphere meshes the + * proper box or sphere collision shape is used. */ public RigidBodyControl(float mass) { this.mass = mass; } /** - * Creates a new PhysicsNode with the supplied collision shape and mass 1 - * @param shape + * Instantiate an enabled control with mass=1 and the specified collision + * shape. + * + * @param shape the desired shape (not null, alias created) */ public RigidBodyControl(CollisionShape shape) { super(shape); } + /** + * Instantiate an enabled control with the specified collision shape and + * mass. + * + * @param shape the desired shape (not null, alias created) + * @param mass the desired mass (≥0) + */ public RigidBodyControl(CollisionShape shape, float mass) { super(shape, mass); } - @Deprecated + /** + * 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) + */ @Override public Control cloneForSpatial(Spatial spatial) { throw new UnsupportedOperationException(); } + /** + * Create a shallow clone for the JME cloner. + * + * @return a new control (not null) + */ @Override public Object jmeClone() { RigidBodyControl control = new RigidBodyControl(collisionShape, mass); @@ -127,11 +171,27 @@ public Object jmeClone() { 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); @@ -146,6 +206,10 @@ public void setSpatial(Spatial spatial) { setPhysicsRotation(getSpatialRotation()); } + /** + * Set the collision shape based on the controlled spatial and its + * descendents. + */ protected void createCollisionShape() { if (spatial == null) { return; @@ -168,6 +232,15 @@ protected void createCollisionShape() { } } + /** + * Enable or disable this control. + *

+ * When the control is disabled, the body is removed from physics space. + * When the control is enabled again, the body is moved to the current + * location of the spatial and then added to the physics space. + * + * @param enabled true→enable the control, false→disable it + */ public void setEnabled(boolean enabled) { this.enabled = enabled; if (space != null) { @@ -185,40 +258,62 @@ public void setEnabled(boolean enabled) { } } + /** + * Test whether this control is enabled. + * + * @return true if enabled, otherwise false + */ public boolean isEnabled() { return enabled; } /** - * Checks if this control is in kinematic spatial mode. - * @return true if the spatial location is applied to this kinematic rigidbody + * Test whether this control is in kinematic mode. + * + * @return true if the spatial location and rotation are applied to the + * rigid body, otherwise false */ public boolean isKinematicSpatial() { return kinematicSpatial; } /** - * Sets this control to kinematic spatial mode so that the spatials transform will - * be applied to the rigidbody in kinematic mode, defaults to true. - * @param kinematicSpatial + * Enable or disable kinematic mode. In kinematic mode, the spatial's + * location and rotation will be applied to the rigid body. + * + * @param kinematicSpatial true→kinematic, false→dynamic or static */ public void setKinematicSpatial(boolean kinematicSpatial) { this.kinematicSpatial = kinematicSpatial; } + /** + * 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 motionState.isApplyPhysicsLocal(); } /** - * When set to true, the physics coordinates will be applied to the local - * translation of the Spatial instead of the world translation. - * @param applyPhysicsLocal + * Alter whether physics-space coordinates should match the spatial's local + * coordinates. + * + * @param applyPhysicsLocal true→match local coordinates, + * false→match world coordinates (default=false) */ public void setApplyPhysicsLocal(boolean applyPhysicsLocal) { motionState.setApplyPhysicsLocal(applyPhysicsLocal); } + /** + * Access whichever spatial translation corresponds to the physics location. + * + * @return the pre-existing vector (not null) + */ private Vector3f getSpatialTranslation(){ if(motionState.isApplyPhysicsLocal()){ return spatial.getLocalTranslation(); @@ -226,6 +321,11 @@ private Vector3f getSpatialTranslation(){ return spatial.getWorldTranslation(); } + /** + * Access whichever spatial rotation corresponds to the physics rotation. + * + * @return the pre-existing quaternion (not null) + */ private Quaternion getSpatialRotation(){ if(motionState.isApplyPhysicsLocal()){ return spatial.getLocalRotation(); @@ -233,6 +333,12 @@ private Quaternion getSpatialRotation(){ return spatial.getWorldRotation(); } + /** + * Update this control. Invoked once per frame, during the logical-state + * update, provided the control is added to a scene. + * + * @param tpf the time interval between frames (in seconds, ≥0) + */ public void update(float tpf) { if (enabled && spatial != null) { if (isKinematic() && kinematicSpatial) { @@ -244,30 +350,59 @@ public void update(float tpf) { } } + /** + * 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; - // 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 body to the specified physics space. In + * not enabled, alter where the body would be added. The body 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; } - this.space = space; + if (newSpace != null && isEnabled()) { + newSpace.addCollisionObject(this); + added = true; + } + /* + * If this control isn't enabled, its body will be + * added to the new space when the control becomes enabled. + */ + space = newSpace; } + /** + * Access the physics space to which the body 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); @@ -278,6 +413,12 @@ public void write(JmeExporter ex) throws IOException { 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); @@ -288,4 +429,4 @@ public void read(JmeImporter im) throws IOException { motionState.setApplyPhysicsLocal(ic.readBoolean("applyLocalPhysics", false)); setUserObject(spatial); } -} +} \ No newline at end of file diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/control/VehicleControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/control/VehicleControl.java index bccd19941c..ccc90091a9 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/control/VehicleControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/control/VehicleControl.java @@ -51,39 +51,75 @@ import java.util.Iterator; /** + * A physics control to link a PhysicsVehicle to a spatial. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen */ public class VehicleControl extends PhysicsVehicle implements PhysicsControl, JmeCloneable { + /** + * spatial to which this control is added, or null if none + */ protected Spatial spatial; + /** + * true→control is enabled, false→control is disabled + */ protected boolean enabled = true; + /** + * space to which the vehicle is (or would be) added + */ protected PhysicsSpace space = null; + /** + * true→vehicle is added to the physics space, false→not added + */ protected boolean added = false; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public VehicleControl() { } /** - * Creates a new PhysicsNode with the supplied collision shape - * @param shape + * Instantiate an enabled control with mass=1 and the specified collision + * shape. + * + * @param shape the desired shape (not null, alias created) */ public VehicleControl(CollisionShape shape) { super(shape); } + /** + * Instantiate an enabled with the specified collision shape and mass. + * + * @param shape the desired shape (not null, alias created) + * @param mass (>0) + */ public VehicleControl(CollisionShape shape, float mass) { super(shape, mass); } + /** + * 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 motionState.isApplyPhysicsLocal(); } /** - * 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→match local coordinates, + * false→match world coordinates (default=false) */ public void setApplyPhysicsLocal(boolean applyPhysicsLocal) { motionState.setApplyPhysicsLocal(applyPhysicsLocal); @@ -107,13 +143,22 @@ private Quaternion getSpatialRotation(){ return spatial.getWorldRotation(); } - @Deprecated + /** + * 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) + */ @Override public Control cloneForSpatial(Spatial spatial) { throw new UnsupportedOperationException(); } - @Override + /** + * Create a shallow clone for the JME cloner. + * + * @return a new control (not null) + */ public Object jmeClone() { VehicleControl control = new VehicleControl(collisionShape, mass); control.setAngularFactor(getAngularFactor()); @@ -161,6 +206,15 @@ public Object jmeClone() { 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); @@ -171,6 +225,11 @@ public void cloneFields( Cloner cloner, Object original ) { } } + /** + * Alter which spatial is controlled. + * + * @param spatial spatial to control (or null) + */ public void setSpatial(Spatial spatial) { this.spatial = spatial; setUserObject(spatial); @@ -181,6 +240,15 @@ public void setSpatial(Spatial spatial) { setPhysicsRotation(getSpatialRotation()); } + /** + * Enable or disable this control. + *

+ * When the control is disabled, the vehicle 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→enable the control, false→disable it + */ public void setEnabled(boolean enabled) { this.enabled = enabled; if (space != null) { @@ -198,10 +266,21 @@ public void setEnabled(boolean enabled) { } } + /** + * 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. + * + * @param tpf the time interval between frames (in seconds, ≥0) + */ public void update(float tpf) { if (enabled && spatial != null) { if (getMotionState().applyTransform(spatial)) { @@ -213,31 +292,59 @@ public void update(float tpf) { } } + /** + * 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) { - createVehicle(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. In 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 vehicle 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); @@ -247,6 +354,12 @@ public void write(JmeExporter ex) throws IOException { 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); @@ -256,4 +369,4 @@ public void read(JmeImporter im) throws IOException { motionState.setApplyPhysicsLocal(ic.readBoolean("applyLocalPhysics", false)); setUserObject(spatial); } -} +} \ No newline at end of file diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/HumanoidRagdollPreset.java b/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/HumanoidRagdollPreset.java index cd9829e612..68696090e3 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/HumanoidRagdollPreset.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/HumanoidRagdollPreset.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,17 @@ import com.jme3.math.FastMath; /** + * Example ragdoll presets for a typical humanoid skeleton. + *

+ * This class is shared between JBullet and Native Bullet. * * @author Nehon */ public class HumanoidRagdollPreset extends RagdollPreset { + /** + * Initialize the map from bone names to joint presets. + */ @Override protected void initBoneMap() { boneMap.put("head", new JointPreset(FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTER_PI)); @@ -59,6 +65,9 @@ protected void initBoneMap() { } + /** + * Initialize the lexicon. + */ @Override protected void initLexicon() { LexiconEntry entry = new LexiconEntry(); diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollPreset.java b/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollPreset.java index ab0b3ef1ab..637011c955 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollPreset.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollPreset.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,14 +43,35 @@ */ public abstract class RagdollPreset { + /** + * message logger for this class + */ protected static final Logger logger = Logger.getLogger(RagdollPreset.class.getName()); + /** + * map bone names to joint presets + */ protected Map boneMap = new HashMap(); + /** + * lexicon to map bone names to entries + */ protected Map lexicon = new HashMap(); + /** + * Initialize the map from bone names to joint presets. + */ protected abstract void initBoneMap(); + /** + * Initialize the lexicon. + */ protected abstract void initLexicon(); + /** + * Apply the preset for the named bone to the specified joint. + * + * @param boneName name + * @param joint where to apply the preset (not null, modified) + */ public void setupJointForBone(String boneName, SixDofJoint joint) { if (boneMap.isEmpty()) { @@ -87,14 +108,30 @@ public void setupJointForBone(String boneName, SixDofJoint joint) { } + /** + * Range of motion for a joint. + */ protected class JointPreset { private float maxX, minX, maxY, minY, maxZ, minZ; + /** + * Instantiate a preset with no motion allowed. + */ public JointPreset() { } public JointPreset(float maxX, float minX, float maxY, float minY, float maxZ, float minZ) { + /** + * Instantiate a preset with the specified range of motion. + * + * @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) + */ this.maxX = maxX; this.minX = minX; this.maxY = maxY; @@ -103,6 +140,11 @@ public JointPreset(float maxX, float minX, float maxY, float minY, float maxZ, f this.minZ = minZ; } + /** + * Apply this preset to the specified joint. + * + * @param joint where to apply (not null, modified) + */ public void setupJoint(SixDofJoint joint) { joint.getRotationalLimitMotor(0).setHiLimit(maxX); joint.getRotationalLimitMotor(0).setLoLimit(minX); @@ -113,13 +155,28 @@ public void setupJoint(SixDofJoint joint) { } } + /** + * One entry in a bone lexicon. + */ protected class LexiconEntry extends HashMap { + /** + * Add a synonym with the specified score. + * + * @param word a substring that might occur in a bone name (not null) + * @param score larger value means more likely to correspond + */ public void addSynonym(String word, int score) { put(word.toLowerCase(), score); } public int getScore(String word) { + /** + * Calculate a total score for the specified bone name. + * + * @param name the name of a bone (not null) + * @return total score: larger value means more likely to correspond + */ int score = 0; String searchWord = word.toLowerCase(); for (String key : this.keySet()) { diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollUtils.java b/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollUtils.java index 72921f0c71..419c337bca 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollUtils.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/control/ragdoll/RagdollUtils.java @@ -33,14 +33,13 @@ import com.jme3.animation.Bone; import com.jme3.animation.Skeleton; +import com.jme3.animation.SkeletonControl; import com.jme3.bullet.collision.shapes.HullCollisionShape; import com.jme3.bullet.joints.SixDofJoint; import com.jme3.math.Quaternion; import com.jme3.math.Transform; import com.jme3.math.Vector3f; -import com.jme3.scene.Geometry; import com.jme3.scene.Mesh; -import com.jme3.scene.Node; import com.jme3.scene.Spatial; import com.jme3.scene.VertexBuffer.Type; import java.nio.ByteBuffer; @@ -48,11 +47,31 @@ import java.util.*; /** + * Utility methods used by KinematicRagdollControl. + *

+ * This class is shared between JBullet and Native Bullet. * * @author Nehon */ public class RagdollUtils { + /** + * A private constructor to inhibit instantiation of this class. + */ + private RagdollUtils() { + } + + /** + * Alter the limits of the specified 6-DOF joint. + * + * @param joint which joint to alter (not null) + * @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 static void setJointLimit(SixDofJoint joint, float maxX, float minX, float maxY, float minY, float maxZ, float minZ) { joint.getRotationalLimitMotor(0).setHiLimit(maxX); @@ -63,22 +82,21 @@ public static void setJointLimit(SixDofJoint joint, float maxX, float minX, floa joint.getRotationalLimitMotor(2).setLoLimit(minZ); } + /** + * Build a map of mesh vertices in a subtree of the scene graph. + * + * @param model the root of the subtree (may be null) + * @return a new map (not null) + */ public static Map> buildPointMap(Spatial model) { + Map> map = new HashMap<>(); - - Map> map = new HashMap>(); - if (model instanceof Geometry) { - Geometry g = (Geometry) model; - buildPointMapForMesh(g.getMesh(), map); - } else if (model instanceof Node) { - Node node = (Node) model; - for (Spatial s : node.getChildren()) { - if (s instanceof Geometry) { - Geometry g = (Geometry) s; - buildPointMapForMesh(g.getMesh(), map); - } - } + SkeletonControl skeletonCtrl = model.getControl(SkeletonControl.class); + Mesh[] targetMeshes = skeletonCtrl.getTargets(); + for (Mesh mesh : targetMeshes) { + buildPointMapForMesh(mesh, map); } + return map; } @@ -122,14 +140,15 @@ private static Map> buildPointMapForMesh(Mesh mesh, Map> pointsMap, List boneIndices, Vector3f initialScale, Vector3f initialPosition) { @@ -151,16 +170,24 @@ public static HullCollisionShape makeShapeFromPointMap(Map> } } + assert !points.isEmpty(); float[] p = new float[points.size()]; for (int i = 0; i < points.size(); i++) { p[i] = points.get(i); } - return new HullCollisionShape(p); } - //returns the list of bone indices of the given bone and its child (if they are not in the boneList) + /** + * Enumerate the bone indices of the specified bone and all its descendents. + * + * @param bone the input bone (not null) + * @param skeleton the skeleton containing the bone (not null) + * @param boneList a set of bone names (not null, unaffected) + * + * @return a new list (not null) + */ public static List getBoneIndices(Bone bone, Skeleton skeleton, Set boneList) { List list = new LinkedList(); if (boneList.isEmpty()) { @@ -178,50 +205,51 @@ public static List getBoneIndices(Bone bone, Skeleton skeleton, Set boneIndices, Vector3f initialScale, Vector3f initialPosition, float weightThreshold) { - - ArrayList points = new ArrayList(); - if (model instanceof Geometry) { - Geometry g = (Geometry) model; + public static HullCollisionShape makeShapeFromVerticeWeights(Spatial model, + List boneIndices, Vector3f initialScale, + Vector3f initialPosition, float weightThreshold) { + List points = new ArrayList<>(100); + + SkeletonControl skeletonCtrl = model.getControl(SkeletonControl.class); + Mesh[] targetMeshes = skeletonCtrl.getTargets(); + for (Mesh mesh : targetMeshes) { for (Integer index : boneIndices) { - points.addAll(getPoints(g.getMesh(), index, initialScale, initialPosition, weightThreshold)); - } - } else if (model instanceof Node) { - Node node = (Node) model; - for (Spatial s : node.getChildren()) { - if (s instanceof Geometry) { - Geometry g = (Geometry) s; - for (Integer index : boneIndices) { - points.addAll(getPoints(g.getMesh(), index, initialScale, initialPosition, weightThreshold)); - } - - } + List bonePoints = getPoints(mesh, index, initialScale, + initialPosition, weightThreshold); + points.addAll(bonePoints); } } + + assert !points.isEmpty(); float[] p = new float[points.size()]; for (int i = 0; i < points.size(); i++) { p[i] = points.get(i); } - return new HullCollisionShape(p); } /** - * returns a list of points for the given bone - * @param mesh - * @param boneIndex - * @param offset - * @param link - * @return + * Enumerate vertices that meet the weight threshold for the indexed bone. + * + * @param mesh the mesh to analyze (not null) + * @param boneIndex the index of the bone (≥0) + * @param initialScale a scale applied to vertex positions (not null, + * unaffected) + * @param offset an offset subtracted from vertex positions (not null, + * unaffected) + * @param weightThreshold the minimum bone weight for inclusion in the + * result (≥0, ≤1) + * @return a new list of vertex coordinates (not null, length a multiple of + * 3) */ private static List getPoints(Mesh mesh, int boneIndex, Vector3f initialScale, Vector3f offset, float weightThreshold) { @@ -265,12 +293,16 @@ private static List getPoints(Mesh mesh, int boneIndex, Vector3f initialS } /** - * Updates a bone position and rotation. - * if the child bones are not in the bone list this means, they are not associated with a physics shape. - * So they have to be updated + * Updates a bone position and rotation. if the child bones are not in the + * bone list this means, they are not associated with a physics shape. So + * they have to be updated + * * @param bone the bone * @param pos the position * @param rot the rotation + * @param restoreBoneControl true → user-control flag should be set + * @param boneList the names of all bones without collision shapes (not + * null, unaffected) */ public static void setTransform(Bone bone, Vector3f pos, Quaternion rot, boolean restoreBoneControl, Set boneList) { //we ensure that we have the control @@ -292,10 +324,51 @@ public static void setTransform(Bone bone, Vector3f pos, Quaternion rot, boolean } } + /** + * Alter the user-control flags of a bone and all its descendents. + * + * @param bone the ancestor bone (not null, modified) + * @param bool true to enable user control, false to disable + */ public static void setUserControl(Bone bone, boolean bool) { bone.setUserControl(bool); for (Bone child : bone.getChildren()) { setUserControl(child, bool); } } + + /** + * Test whether the indexed bone has at least one vertex in the specified + * meshes with a weight greater than the specified threshold. + * + * @param boneIndex the index of the bone (≥0) + * @param targets the meshes to search (not null, no null elements) + * @param weightThreshold the threshold (≥0, ≤1) + * @return true if at least 1 vertex found, otherwise false + */ + public static boolean hasVertices(int boneIndex, Mesh[] targets, + float weightThreshold) { + for (Mesh mesh : targets) { + ByteBuffer boneIndices + = (ByteBuffer) mesh.getBuffer(Type.BoneIndex).getData(); + FloatBuffer boneWeight + = (FloatBuffer) mesh.getBuffer(Type.BoneWeight).getData(); + + boneIndices.rewind(); + boneWeight.rewind(); + + int vertexComponents = mesh.getVertexCount() * 3; + for (int i = 0; i < vertexComponents; i += 3) { + int start = i / 3 * 4; + for (int k = start; k < start + 4; k++) { + if (boneIndices.get(k) == boneIndex + && boneWeight.get(k) >= weightThreshold) { + return true; + } + } + } + } + + return false; + } } diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/debug/AbstractPhysicsDebugControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/debug/AbstractPhysicsDebugControl.java index 75e7bbe45a..44293d3b0c 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/debug/AbstractPhysicsDebugControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/debug/AbstractPhysicsDebugControl.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 @@ -37,14 +37,27 @@ import com.jme3.scene.control.AbstractControl; /** + * The abstract base class for physics-debug controls (such as + * BulletRigidBodyDebugControl) used to visualize individual collision objects + * and joints. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen */ public abstract class AbstractPhysicsDebugControl extends AbstractControl { private final Quaternion tmp_inverseWorldRotation = new Quaternion(); + /** + * the app state that this control serves + */ protected final BulletDebugAppState debugAppState; + /** + * Instantiate an enabled control to serve the specified debug app state. + * + * @param debugAppState which app state (not null, alias created) + */ public AbstractPhysicsDebugControl(BulletDebugAppState debugAppState) { this.debugAppState = debugAppState; } @@ -55,10 +68,27 @@ public AbstractPhysicsDebugControl(BulletDebugAppState debugAppState) { @Override protected abstract void controlUpdate(float tpf); + /** + * Apply the specified location and orientation to the controlled spatial. + * + * @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) { applyPhysicsTransform(worldLocation, worldRotation, this.spatial); } + /** + * Apply the specified location and orientation to the specified spatial. + * + * @param worldLocation location vector (in physics-space coordinates, not + * null, unaffected) + * @param worldRotation orientation (in physics-space coordinates, not null, + * unaffected) + * @param spatial where to apply (may be null) + */ protected void applyPhysicsTransform(Vector3f worldLocation, Quaternion worldRotation, Spatial spatial) { if (spatial != null) { Vector3f localLocation = spatial.getLocalTranslation(); diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletCharacterDebugControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletCharacterDebugControl.java index 43c1cfd366..687d6ba27c 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletCharacterDebugControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletCharacterDebugControl.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 @@ -42,16 +42,37 @@ import com.jme3.scene.Spatial; /** + * A physics-debug control used to visualize a PhysicsCharacter. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen */ public class BulletCharacterDebugControl extends AbstractPhysicsDebugControl { + /** + * character to visualize (not null) + */ protected final PhysicsCharacter body; + /** + * temporary storage for physics location + */ protected final Vector3f location = new Vector3f(); protected final Quaternion rotation = new Quaternion(); + /** + * shape for which geom was generated + */ protected CollisionShape myShape; + /** + * geometry to visualize myShape (not null) + */ protected Spatial geom; + /** + * Instantiate an enabled control to visualize the specified character. + * + * @param debugAppState which app state (not null, alias created) + * @param body the character to visualize (not null, alias created) + */ public BulletCharacterDebugControl(BulletDebugAppState debugAppState, PhysicsCharacter body) { super(debugAppState); @@ -61,6 +82,13 @@ public BulletCharacterDebugControl(BulletDebugAppState debugAppState, PhysicsCha geom.setMaterial(debugAppState.DEBUG_PINK); } + /** + * 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) + */ @Override public void setSpatial(Spatial spatial) { if (spatial != null && spatial instanceof Node) { @@ -73,6 +101,13 @@ public void setSpatial(Spatial spatial) { super.setSpatial(spatial); } + /** + * Update this control. Invoked once per frame during the logical-state + * update, provided the control is enabled and added to a scene. Should be + * invoked only by a subclass or by AbstractControl. + * + * @param tpf the time interval between frames (in seconds, ≥0) + */ @Override protected void controlUpdate(float tpf) { if(myShape != body.getCollisionShape()){ @@ -86,6 +121,14 @@ protected void controlUpdate(float tpf) { geom.setLocalScale(body.getCollisionShape().getScale()); } + /** + * Render this control. Invoked once per frame, provided the + * control is enabled and added to a scene. Should be invoked only by a + * subclass or by AbstractControl. + * + * @param rm the render manager (not null) + * @param vp the view port to render (not null) + */ @Override protected void controlRender(RenderManager rm, ViewPort vp) { } diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletDebugAppState.java b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletDebugAppState.java index 4019d2c2bc..3e2f6aef1b 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletDebugAppState.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletDebugAppState.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 @@ -55,31 +55,84 @@ import java.util.logging.Logger; /** + * An app state to manage a debug visualization of a physics space. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen */ public class BulletDebugAppState extends AbstractAppState { + /** + * message logger for this class + */ protected static final Logger logger = Logger.getLogger(BulletDebugAppState.class.getName()); + /** + * limit which objects are visualized, or null to visualize all objects + */ protected DebugAppStateFilter filter; protected Application app; protected AssetManager assetManager; + /** + * physics space to visualize (not null) + */ protected final PhysicsSpace space; + /** + * scene-graph node to parent the geometries + */ protected final Node physicsDebugRootNode = new Node("Physics Debug Root Node"); + /** + * view port in which to render (not null) + */ protected ViewPort viewPort; protected RenderManager rm; + /** + * material for inactive rigid bodies + */ public Material DEBUG_BLUE; public Material DEBUG_RED; + /** + * material for joints + */ public Material DEBUG_GREEN; + /** + * material for ghosts + */ public Material DEBUG_YELLOW; + /** + * material for vehicles and active rigid bodies + */ public Material DEBUG_MAGENTA; + /** + * material for physics characters + */ public Material DEBUG_PINK; + /** + * map rigid bodies to visualizations + */ protected HashMap bodies = new HashMap(); + /** + * map joints to visualizations + */ protected HashMap joints = new HashMap(); + /** + * map ghosts to visualizations + */ protected HashMap ghosts = new HashMap(); + /** + * map physics characters to visualizations + */ protected HashMap characters = new HashMap(); + /** + * map vehicles to visualizations + */ protected HashMap vehicles = new HashMap(); - + /** + * Instantiate an app state to visualize the specified space. This constructor should be invoked only by + * BulletAppState. + * + * @param space physics space to visualize (not null, alias created) + */ public BulletDebugAppState(PhysicsSpace space) { this.space = space; } @@ -88,10 +141,22 @@ public DebugTools getNewDebugTools() { return new DebugTools(assetManager); } + /** + * Alter which objects are visualized. + * + * @param filter the desired filter, or or null to visualize all objects + */ public void setFilter(DebugAppStateFilter filter) { this.filter = filter; } + /** + * 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) + */ @Override public void initialize(AppStateManager stateManager, Application app) { super.initialize(stateManager, app); @@ -105,12 +170,25 @@ public void initialize(AppStateManager stateManager, Application app) { viewPort.attachScene(physicsDebugRootNode); } + /** + * 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. + */ @Override public void cleanup() { rm.removeMainView(viewPort); super.cleanup(); } + /** + * 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, ≥0) + */ @Override public void update(float tpf) { super.update(tpf); @@ -125,6 +203,13 @@ public void update(float tpf) { physicsDebugRootNode.updateGeometricState(); } + /** + * 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) + */ @Override public void render(RenderManager rm) { super.render(rm); @@ -133,6 +218,11 @@ public void render(RenderManager rm) { } } + /** + * Initialize the materials. + * + * @param app the application which owns this state (not null) + */ private void setupMaterials(Application app) { AssetManager manager = app.getAssetManager(); DEBUG_BLUE = new Material(manager, "Common/MatDefs/Misc/Unshaded.j3md"); @@ -311,14 +401,14 @@ private void updateVehicles() { } /** - * Interface that allows filtering out objects from the debug display + * Interface to restrict which physics objects are visualized. */ public static interface DebugAppStateFilter { /** - * Queries an object to be displayed + * Test whether the specified physics object should be displayed. * - * @param obj The object to be displayed + * @param obj the joint or collision object to test (unaffected) * @return return true if the object should be displayed, false if not */ public boolean displayObject(Object obj); diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletGhostObjectDebugControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletGhostObjectDebugControl.java index 62ab7a2146..09f24c7fc7 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletGhostObjectDebugControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletGhostObjectDebugControl.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 @@ -42,17 +42,41 @@ import com.jme3.scene.Spatial; /** + * A physics-debug control used to visualize a PhysicsGhostObject. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen */ public class BulletGhostObjectDebugControl extends AbstractPhysicsDebugControl { + /** + * ghost object to visualize (not null) + */ protected final PhysicsGhostObject body; + /** + * temporary storage for physics location + */ protected final Vector3f location = new Vector3f(); + /** + * temporary storage for physics rotation + */ protected final Quaternion rotation = new Quaternion(); + /** + * shape for which geom was generated (not null) + */ protected CollisionShape myShape; + /** + * geometry to visualize myShape (not null) + */ protected Spatial geom; + /** + * Instantiate an enabled control to visualize the specified ghost object. + * + * @param debugAppState which app state (not null, alias created) + * @param body which object to visualize (not null, alias created) + */ public BulletGhostObjectDebugControl(BulletDebugAppState debugAppState, PhysicsGhostObject body) { super(debugAppState); this.body = body; @@ -63,6 +87,13 @@ public BulletGhostObjectDebugControl(BulletDebugAppState debugAppState, PhysicsG geom.setMaterial(debugAppState.DEBUG_YELLOW); } + /** + * 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) + */ @Override public void setSpatial(Spatial spatial) { if (spatial != null && spatial instanceof Node) { @@ -75,6 +106,13 @@ public void setSpatial(Spatial spatial) { super.setSpatial(spatial); } + /** + * Update this control. Invoked once per frame during the logical-state + * update, provided the control is enabled and added to a scene. Should be + * invoked only by a subclass or by AbstractControl. + * + * @param tpf the time interval between frames (in seconds, ≥0) + */ @Override protected void controlUpdate(float tpf) { if (myShape != body.getCollisionShape()) { @@ -88,6 +126,14 @@ protected void controlUpdate(float tpf) { geom.setLocalScale(body.getCollisionShape().getScale()); } + /** + * Render this control. Invoked once per frame, provided the + * control is enabled and added to a scene. Should be invoked only by a + * subclass or by AbstractControl. + * + * @param rm the render manager (not null) + * @param vp the view port to render (not null) + */ @Override protected void controlRender(RenderManager rm, ViewPort vp) { } diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletJointDebugControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletJointDebugControl.java index 571452811b..7b11a41d68 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletJointDebugControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletJointDebugControl.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,6 +43,9 @@ import com.jme3.scene.debug.Arrow; /** + * A physics-debug control used to visualize a PhysicsJoint. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen */ @@ -58,6 +61,12 @@ public class BulletJointDebugControl extends AbstractPhysicsDebugControl { protected final Vector3f offA = new Vector3f(); protected final Vector3f offB = new Vector3f(); + /** + * Instantiate an enabled control to visualize the specified joint. + * + * @param debugAppState which app state (not null, alias created) + * @param body the joint to visualize (not null, alias created) + */ public BulletJointDebugControl(BulletDebugAppState debugAppState, PhysicsJoint body) { super(debugAppState); this.body = body; @@ -71,6 +80,13 @@ public BulletJointDebugControl(BulletDebugAppState debugAppState, PhysicsJoint b geomB.setMaterial(debugAppState.DEBUG_GREEN); } + /** + * 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) + */ @Override public void setSpatial(Spatial spatial) { if (spatial != null && spatial instanceof Node) { @@ -85,6 +101,13 @@ public void setSpatial(Spatial spatial) { super.setSpatial(spatial); } + /** + * Update this control. Invoked once per frame during the logical-state + * update, provided the control is enabled and added to a scene. Should be + * invoked only by a subclass or by AbstractControl. + * + * @param tpf the time interval between frames (in seconds, ≥0) + */ @Override protected void controlUpdate(float tpf) { body.getBodyA().getPhysicsLocation(a.getTranslation()); @@ -100,6 +123,14 @@ protected void controlUpdate(float tpf) { arrowB.setArrowExtent(body.getPivotB()); } + /** + * Render this control. Invoked once per frame, provided the + * control is enabled and added to a scene. Should be invoked only by a + * subclass or by AbstractControl. + * + * @param rm the render manager (not null) + * @param vp the view port to render (not null) + */ @Override protected void controlRender(RenderManager rm, ViewPort vp) { } diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletRigidBodyDebugControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletRigidBodyDebugControl.java index 3bc10f3e6e..83e5b786fa 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletRigidBodyDebugControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletRigidBodyDebugControl.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 @@ -42,17 +42,41 @@ import com.jme3.scene.Spatial; /** + * A physics-debug control used to visualize a PhysicsRigidBody. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen */ public class BulletRigidBodyDebugControl extends AbstractPhysicsDebugControl { + /** + * rigid body to visualize (not null) + */ protected final PhysicsRigidBody body; + /** + * temporary storage for physics location + */ protected final Vector3f location = new Vector3f(); + /** + * temporary storage for physics rotation + */ protected final Quaternion rotation = new Quaternion(); + /** + * shape for which geom was generated (not null) + */ protected CollisionShape myShape; + /** + * geometry to visualize myShape (not null) + */ protected Spatial geom; + /** + * Instantiate an enabled control to visualize the specified body. + * + * @param debugAppState which app state (not null, alias created) + * @param body which body to visualize (not null, alias created) + */ public BulletRigidBodyDebugControl(BulletDebugAppState debugAppState, PhysicsRigidBody body) { super(debugAppState); this.body = body; @@ -62,6 +86,13 @@ public BulletRigidBodyDebugControl(BulletDebugAppState debugAppState, PhysicsRig geom.setMaterial(debugAppState.DEBUG_BLUE); } + /** + * 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) + */ @Override public void setSpatial(Spatial spatial) { if (spatial != null && spatial instanceof Node) { @@ -74,6 +105,13 @@ public void setSpatial(Spatial spatial) { super.setSpatial(spatial); } + /** + * Update this control. Invoked once per frame during the logical-state + * update, provided the control is enabled and added to a scene. Should be + * invoked only by a subclass or by AbstractControl. + * + * @param tpf the time interval between frames (in seconds, ≥0) + */ @Override protected void controlUpdate(float tpf) { if(myShape != body.getCollisionShape()){ @@ -91,6 +129,14 @@ protected void controlUpdate(float tpf) { geom.setLocalScale(body.getCollisionShape().getScale()); } + /** + * Render this control. Invoked once per frame, provided the + * control is enabled and added to a scene. Should be invoked only by a + * subclass or by AbstractControl. + * + * @param rm the render manager (not null) + * @param vp the view port to render (not null) + */ @Override protected void controlRender(RenderManager rm, ViewPort vp) { } diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletVehicleDebugControl.java b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletVehicleDebugControl.java index f7adf12089..c964c420b7 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletVehicleDebugControl.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/debug/BulletVehicleDebugControl.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,6 +43,9 @@ import com.jme3.scene.debug.Arrow; /** + * A physics-debug control used to visualize a PhysicsVehicle. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen */ @@ -53,6 +56,12 @@ public class BulletVehicleDebugControl extends AbstractPhysicsDebugControl { protected final Vector3f location = new Vector3f(); protected final Quaternion rotation = new Quaternion(); + /** + * Instantiate an enabled control to visualize the specified vehicle. + * + * @param debugAppState which app state (not null, alias created) + * @param body which vehicle to visualize (not null, alias created) + */ public BulletVehicleDebugControl(BulletDebugAppState debugAppState, PhysicsVehicle body) { super(debugAppState); this.body = body; @@ -60,6 +69,13 @@ public BulletVehicleDebugControl(BulletDebugAppState debugAppState, PhysicsVehic createVehicle(); } + /** + * 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) + */ @Override public void setSpatial(Spatial spatial) { if (spatial != null && spatial instanceof Node) { @@ -104,6 +120,13 @@ private void createVehicle() { } } + /** + * Update this control. Invoked once per frame during the logical-state + * update, provided the control is enabled and added to a scene. Should be + * invoked only by a subclass or by AbstractControl. + * + * @param tpf the time interval between frames (in seconds, ≥0) + */ @Override protected void controlUpdate(float tpf) { for (int i = 0; i < body.getNumWheels(); i++) { @@ -136,6 +159,14 @@ protected void controlUpdate(float tpf) { applyPhysicsTransform(body.getPhysicsLocation(location), body.getPhysicsRotation(rotation)); } + /** + * Render this control. Invoked once per frame, provided the + * control is enabled and added to a scene. Should be invoked only by a + * subclass or by AbstractControl. + * + * @param rm the render manager (not null) + * @param vp the view port to render (not null) + */ @Override protected void controlRender(RenderManager rm, ViewPort vp) { } diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/debug/DebugTools.java b/jme3-bullet/src/common/java/com/jme3/bullet/debug/DebugTools.java index 2e7246b7a7..16bc38ac8c 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/debug/DebugTools.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/debug/DebugTools.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 @@ -42,43 +42,129 @@ import com.jme3.scene.debug.Arrow; /** + * Debugging aids. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen */ public class DebugTools { protected final AssetManager manager; + /** + * unshaded blue material + */ public Material DEBUG_BLUE; + /** + * unshaded red material + */ public Material DEBUG_RED; + /** + * unshaded green material + */ public Material DEBUG_GREEN; + /** + * unshaded yellow material + */ public Material DEBUG_YELLOW; + /** + * unshaded magenta material + */ public Material DEBUG_MAGENTA; + /** + * unshaded pink material + */ public Material DEBUG_PINK; + /** + * node for attaching debug geometries + */ public Node debugNode = new Node("Debug Node"); + /** + * mesh for the blue arrow + */ public Arrow arrowBlue = new Arrow(Vector3f.ZERO); + /** + * geometry for the blue arrow + */ public Geometry arrowBlueGeom = new Geometry("Blue Arrow", arrowBlue); + /** + * mesh for the green arrow + */ public Arrow arrowGreen = new Arrow(Vector3f.ZERO); + /** + * geometry for the green arrow + */ public Geometry arrowGreenGeom = new Geometry("Green Arrow", arrowGreen); + /** + * mesh for the red arrow + */ public Arrow arrowRed = new Arrow(Vector3f.ZERO); + /** + * geometry for the red arrow + */ public Geometry arrowRedGeom = new Geometry("Red Arrow", arrowRed); + /** + * mesh for the magenta arrow + */ public Arrow arrowMagenta = new Arrow(Vector3f.ZERO); + /** + * geometry for the magenta arrow + */ public Geometry arrowMagentaGeom = new Geometry("Magenta Arrow", arrowMagenta); + /** + * mesh for the yellow arrow + */ public Arrow arrowYellow = new Arrow(Vector3f.ZERO); + /** + * geometry for the yellow arrow + */ public Geometry arrowYellowGeom = new Geometry("Yellow Arrow", arrowYellow); + /** + * mesh for the pink arrow + */ public Arrow arrowPink = new Arrow(Vector3f.ZERO); + /** + * geometry for the pink arrow + */ public Geometry arrowPinkGeom = new Geometry("Pink Arrow", arrowPink); + /** + * local copy of {@link com.jme3.math.Vector3f#UNIT_X} + */ protected static final Vector3f UNIT_X_CHECK = new Vector3f(1, 0, 0); + /** + * local copy of {@link com.jme3.math.Vector3f#UNIT_Y} + */ protected static final Vector3f UNIT_Y_CHECK = new Vector3f(0, 1, 0); + /** + * local copy of {@link com.jme3.math.Vector3f#UNIT_Z} + */ protected static final Vector3f UNIT_Z_CHECK = new Vector3f(0, 0, 1); + /** + * local copy of {@link com.jme3.math.Vector3f#UNIT_XYZ} + */ protected static final Vector3f UNIT_XYZ_CHECK = new Vector3f(1, 1, 1); + /** + * local copy of {@link com.jme3.math.Vector3f#ZERO} + */ protected static final Vector3f ZERO_CHECK = new Vector3f(0, 0, 0); + /** + * Instantiate a set of debug tools. + * + * @param manager for loading assets (not null, alias created) + */ public DebugTools(AssetManager manager) { this.manager = manager; setupMaterials(); setupDebugNode(); } + /** + * Render all the debug geometries to the specified view port. + * + * @param rm the render manager (not null) + * @param vp the view port (not null) + */ public void show(RenderManager rm, ViewPort vp) { if (!Vector3f.UNIT_X.equals(UNIT_X_CHECK) || !Vector3f.UNIT_Y.equals(UNIT_Y_CHECK) || !Vector3f.UNIT_Z.equals(UNIT_Z_CHECK) || !Vector3f.UNIT_XYZ.equals(UNIT_XYZ_CHECK) || !Vector3f.ZERO.equals(ZERO_CHECK)) { @@ -94,36 +180,75 @@ public void show(RenderManager rm, ViewPort vp) { rm.renderScene(debugNode, vp); } + /** + * Alter the location and extent of the blue arrow. + * + * @param location the coordinates of the tail (not null, unaffected) + * @param extent the offset of the tip from the tail (not null, unaffected) + */ public void setBlueArrow(Vector3f location, Vector3f extent) { arrowBlueGeom.setLocalTranslation(location); arrowBlue.setArrowExtent(extent); } + /** + * Alter the location and extent of the green arrow. + * + * @param location the coordinates of the tail (not null, unaffected) + * @param extent the offset of the tip from the tail (not null, unaffected) + */ public void setGreenArrow(Vector3f location, Vector3f extent) { arrowGreenGeom.setLocalTranslation(location); arrowGreen.setArrowExtent(extent); } + /** + * Alter the location and extent of the red arrow. + * + * @param location the coordinates of the tail (not null, unaffected) + * @param extent the offset of the tip from the tail (not null, unaffected) + */ public void setRedArrow(Vector3f location, Vector3f extent) { arrowRedGeom.setLocalTranslation(location); arrowRed.setArrowExtent(extent); } + /** + * Alter the location and extent of the magenta arrow. + * + * @param location the coordinates of the tail (not null, unaffected) + * @param extent the offset of the tip from the tail (not null, unaffected) + */ public void setMagentaArrow(Vector3f location, Vector3f extent) { arrowMagentaGeom.setLocalTranslation(location); arrowMagenta.setArrowExtent(extent); } + /** + * Alter the location and extent of the yellow arrow. + * + * @param location the coordinates of the tail (not null, unaffected) + * @param extent the offset of the tip from the tail (not null, unaffected) + */ public void setYellowArrow(Vector3f location, Vector3f extent) { arrowYellowGeom.setLocalTranslation(location); arrowYellow.setArrowExtent(extent); } + /** + * Alter the location and extent of the pink arrow. + * + * @param location the coordinates of the tail (not null, unaffected) + * @param extent the offset of the tip from the tail (not null, unaffected) + */ public void setPinkArrow(Vector3f location, Vector3f extent) { arrowPinkGeom.setLocalTranslation(location); arrowPink.setArrowExtent(extent); } + /** + * Attach all the debug geometries to the debug node. + */ protected void setupDebugNode() { arrowBlueGeom.setMaterial(DEBUG_BLUE); arrowGreenGeom.setMaterial(DEBUG_GREEN); @@ -139,6 +264,9 @@ protected void setupDebugNode() { debugNode.attachChild(arrowPinkGeom); } + /** + * Initialize all the DebugTools materials. + */ protected void setupMaterials() { DEBUG_BLUE = new Material(manager, "Common/MatDefs/Misc/Unshaded.j3md"); DEBUG_BLUE.getAdditionalRenderState().setWireframe(true); diff --git a/jme3-bullet/src/common/java/com/jme3/bullet/util/CollisionShapeFactory.java b/jme3-bullet/src/common/java/com/jme3/bullet/util/CollisionShapeFactory.java index de28aba02d..19e14d49be 100644 --- a/jme3-bullet/src/common/java/com/jme3/bullet/util/CollisionShapeFactory.java +++ b/jme3-bullet/src/common/java/com/jme3/bullet/util/CollisionShapeFactory.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 @@ -44,17 +44,21 @@ import java.util.LinkedList; /** + * A utility class for generating collision shapes from Spatials. + *

+ * This class is shared between JBullet and Native Bullet. * * @author normenhansen, tim8dev */ public class CollisionShapeFactory { /** - * returns the correct transform for a collisionshape in relation - * to the ancestor for which the collisionshape is generated + * Calculate the correct transform for a collision shape relative to the + * ancestor for which the shape was generated. + * * @param spat * @param parent - * @return + * @return a new instance (not null) */ private static Transform getTransform(Spatial spat, Spatial parent) { Transform shapeTransform = new Transform(); @@ -135,30 +139,48 @@ private static CompoundCollisionShape createCompoundShape( } /** - * This type of collision shape is mesh-accurate and meant for immovable "world objects". - * Examples include terrain, houses or whole shooter levels.
- * Objects with "mesh" type collision shape will not collide with each other. + * This type of collision shape is mesh-accurate and meant for immovable + * "world objects". Examples include terrain, houses or whole shooter + * levels. + *

+ * Objects with "mesh" type collision shape will not collide with each + * other. + * + * @param rootNode the node on which to base the shape (not null) + * @return a new shape (not null) */ private static CompoundCollisionShape createMeshCompoundShape(Node rootNode) { return createCompoundShape(rootNode, new CompoundCollisionShape(), true); } /** - * This type of collision shape creates a CompoundShape made out of boxes that - * are based on the bounds of the Geometries in the tree. - * @param rootNode - * @return + * This type of collision shape creates a CompoundShape made out of boxes + * that are based on the bounds of the Geometries in the tree. + * + * @param rootNode the node on which to base the shape (not null) + * @return a new shape (not null) */ private static CompoundCollisionShape createBoxCompoundShape(Node rootNode) { return createCompoundShape(rootNode, new CompoundCollisionShape(), false); } /** - * This type of collision shape is mesh-accurate and meant for immovable "world objects". - * Examples include terrain, houses or whole shooter levels.
- * Objects with "mesh" type collision shape will not collide with each other.
- * Creates a HeightfieldCollisionShape if the supplied spatial is a TerrainQuad. - * @return A MeshCollisionShape or a CompoundCollisionShape with MeshCollisionShapes as children if the supplied spatial is a Node. A HeightieldCollisionShape if a TerrainQuad was supplied. + * Create a mesh shape for the given Spatial. + *

+ * This type of collision shape is mesh-accurate and meant for immovable + * "world objects". Examples include terrain, houses or whole shooter + * levels. + *

+ * Objects with "mesh" type collision shape will not collide with each + * other. + *

+ * Creates a HeightfieldCollisionShape if the supplied spatial is a + * TerrainQuad. + * + * @param spatial the spatial on which to base the shape (not null) + * @return A MeshCollisionShape or a CompoundCollisionShape with + * MeshCollisionShapes as children if the supplied spatial is a Node. A + * HeightieldCollisionShape if a TerrainQuad was supplied. */ public static CollisionShape createMeshShape(Spatial spatial) { if (spatial instanceof TerrainQuad) { @@ -177,9 +199,14 @@ public static CollisionShape createMeshShape(Spatial spatial) { } /** - * This method creates a hull shape for the given Spatial.
- * If you want to have mesh-accurate dynamic shapes (CPU intense!!!) use GImpact shapes, its probably best to do so with a low-poly version of your model. - * @return A HullCollisionShape or a CompoundCollisionShape with HullCollisionShapes as children if the supplied spatial is a Node. + * Create a hull shape for the given Spatial. + *

+ * For mesh-accurate animated meshes (CPU intense!) use GImpact shapes. + * + * @param spatial the spatial on which to base the shape (not null) + * @return a HullCollisionShape (if spatial is a Geometry) or a + * CompoundCollisionShape with HullCollisionShapes as children (if spatial + * is a Node) */ public static CollisionShape createDynamicMeshShape(Spatial spatial) { if (spatial instanceof Geometry) { @@ -192,6 +219,14 @@ public static CollisionShape createDynamicMeshShape(Spatial spatial) { } + /** + * Create a box shape for the given Spatial. + * + * @param spatial the spatial on which to base the shape (not null) + * @return a BoxCollisionShape (if spatial is a Geometry) or a + * CompoundCollisionShape with BoxCollisionShapes as children (if spatial is + * a Node) + */ public static CollisionShape createBoxShape(Spatial spatial) { if (spatial instanceof Geometry) { return createSingleBoxShape((Geometry) spatial, spatial); @@ -203,9 +238,12 @@ public static CollisionShape createBoxShape(Spatial spatial) { } /** - * This type of collision shape is mesh-accurate and meant for immovable "world objects". - * Examples include terrain, houses or whole shooter levels.
- * Objects with "mesh" type collision shape will not collide with each other. + * This type of collision shape is mesh-accurate and meant for immovable + * "world objects". Examples include terrain, houses or whole shooter + * levels. + *

+ * Objects with "mesh" type collision shape will not collide with each + * other. */ private static MeshCollisionShape createSingleMeshShape(Geometry geom, Spatial parent) { Mesh mesh = geom.getMesh(); @@ -220,9 +258,13 @@ private static MeshCollisionShape createSingleMeshShape(Geometry geom, Spatial p } /** - * Uses the bounding box of the supplied spatial to create a BoxCollisionShape - * @param spatial - * @return BoxCollisionShape with the size of the spatials BoundingBox + * Use the bounding box of the supplied spatial to create a + * BoxCollisionShape. + * + * @param spatial the spatial on which to base the shape (not null) + * @param parent unused + * @return a new shape with the dimensions of the spatial's bounding box + * (not null) */ private static BoxCollisionShape createSingleBoxShape(Spatial spatial, Spatial parent) { //TODO: using world bound here instead of "local world" bound... @@ -232,7 +274,10 @@ private static BoxCollisionShape createSingleBoxShape(Spatial spatial, Spatial p } /** - * This method creates a hull collision shape for the given mesh.
+ * Create a hull collision shape for the specified geometry. + * + * @param geom the geometry on which to base the shape (not null) + * @param parent */ private static HullCollisionShape createSingleDynamicMeshShape(Geometry geom, Spatial parent) { Mesh mesh = geom.getMesh(); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/PhysicsSpace.java b/jme3-bullet/src/main/java/com/jme3/bullet/PhysicsSpace.java index f0df9740c5..ea5f74518d 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/PhysicsSpace.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/PhysicsSpace.java @@ -32,7 +32,6 @@ package com.jme3.bullet; import com.jme3.app.AppTask; -import com.jme3.asset.AssetManager; import com.jme3.bullet.collision.*; import com.jme3.bullet.collision.shapes.CollisionShape; import com.jme3.bullet.control.PhysicsControl; @@ -46,6 +45,7 @@ import com.jme3.math.Vector3f; import com.jme3.scene.Node; import com.jme3.scene.Spatial; +import com.jme3.util.SafeArrayList; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; @@ -55,6 +55,7 @@ import java.util.List; import java.util.Map; import java.util.Comparator; +import java.util.Deque; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; @@ -63,17 +64,36 @@ import java.util.logging.Logger; /** - *

PhysicsSpace - The central jbullet-jme physics space

+ * A jbullet-jme physics space with its own btDynamicsWorld. * * @author normenhansen */ public class PhysicsSpace { + /** + * message logger for this class + */ private static final Logger logger = Logger.getLogger(PhysicsSpace.class.getName()); + /** + * index of the X axis + */ public static final int AXIS_X = 0; + /** + * index of the Y axis + */ public static final int AXIS_Y = 1; + /** + * index of the Z axis + */ public static final int AXIS_Z = 2; + /** + * Bullet identifier of the physics space. The constructor sets this to a + * non-zero value. + */ private long physicsSpaceId = 0; + /** + * first-in/first-out (FIFO) queue of physics tasks for each thread + */ private static ThreadLocal>> pQueueTL = new ThreadLocal>>() { @Override @@ -81,8 +101,17 @@ protected ConcurrentLinkedQueue> initialValue() { return new ConcurrentLinkedQueue>(); } }; + /** + * first-in/first-out (FIFO) queue of physics tasks + */ private ConcurrentLinkedQueue> pQueue = new ConcurrentLinkedQueue>(); + /** + * physics space for each thread + */ private static ThreadLocal physicsSpaceTL = new ThreadLocal(); + /** + * copy of type of acceleration structure used + */ private BroadphaseType broadphaseType = BroadphaseType.DBVT; // private DiscreteDynamicsWorld dynamicsWorld = null; // private BroadphaseInterface broadphase; @@ -95,15 +124,50 @@ protected ConcurrentLinkedQueue> initialValue() { private Map physicsBodies = new ConcurrentHashMap(); private Map physicsJoints = new ConcurrentHashMap(); private Map physicsVehicles = new ConcurrentHashMap(); - private ArrayList collisionListeners = new ArrayList(); + /** + * list of registered collision listeners + */ + final private List collisionListeners + = new SafeArrayList<>(PhysicsCollisionListener.class); + /** + * queue of collision events not yet distributed to listeners + */ private ArrayDeque collisionEvents = new ArrayDeque(); + /** + * map from collision groups to registered group listeners + */ private Map collisionGroupListeners = new ConcurrentHashMap(); + /** + * queue of registered tick listeners + */ private ConcurrentLinkedQueue tickListeners = new ConcurrentLinkedQueue(); private PhysicsCollisionEventFactory eventFactory = new PhysicsCollisionEventFactory(); + /** + * copy of minimum coordinate values when using AXIS_SWEEP broadphase + * algorithms + */ private Vector3f worldMin = new Vector3f(-10000f, -10000f, -10000f); + /** + * copy of maximum coordinate values when using AXIS_SWEEP broadphase + * algorithms + */ private Vector3f worldMax = new Vector3f(10000f, 10000f, 10000f); + /** + * physics time step (in seconds, >0) + */ private float accuracy = 1f / 60f; - private int maxSubSteps = 4, rayTestFlags = 1 << 2; + /** + * maximum number of physics steps per frame (≥0, default=4) + */ + private int maxSubSteps = 4; + /** + * flags used in ray tests + */ + private int rayTestFlags = 1 << 2; + /** + * copy of number of iterations used by the contact-and-constraint solver + * (default=10) + */ private int solverNumIterations = 10; static { @@ -112,9 +176,8 @@ protected ConcurrentLinkedQueue> initialValue() { } /** - * Get the current PhysicsSpace running on this thread
For - * parallel physics, this can also be called from the OpenGL thread to - * receive the PhysicsSpace + * Access the PhysicsSpace running on this thread. For parallel + * physics, this can be invoked from the OpenGL thread. * * @return the PhysicsSpace running on this thread */ @@ -125,24 +188,47 @@ public static PhysicsSpace getPhysicsSpace() { /** * Used internally * - * @param space + * @param space which physics space to simulate on this thread */ public static void setLocalThreadPhysicsSpace(PhysicsSpace space) { physicsSpaceTL.set(space); } + /** + * Instantiate a PhysicsSpace. Must be invoked on the designated physics + * thread. + */ public PhysicsSpace() { this(new Vector3f(-10000f, -10000f, -10000f), new Vector3f(10000f, 10000f, 10000f), BroadphaseType.DBVT); } + /** + * Instantiate a PhysicsSpace. Must be invoked on the designated physics + * thread. + */ public PhysicsSpace(BroadphaseType broadphaseType) { this(new Vector3f(-10000f, -10000f, -10000f), new Vector3f(10000f, 10000f, 10000f), broadphaseType); } + /** + * Instantiate a PhysicsSpace. Must be invoked on the designated physics + * thread. + */ public PhysicsSpace(Vector3f worldMin, Vector3f worldMax) { this(worldMin, worldMax, BroadphaseType.AXIS_SWEEP_3); } + /** + * Instantiate a PhysicsSpace. Must be invoked on the designated physics + * thread. + * + * @param worldMin the desired minimum coordinates values (not null, + * unaffected, default=-10k,-10k,-10k) + * @param worldMax the desired minimum coordinates values (not null, + * unaffected, default=10k,10k,10k) + * @param broadphaseType which broadphase collision-detection algorithm to + * use (not null) + */ public PhysicsSpace(Vector3f worldMin, Vector3f worldMax, BroadphaseType broadphaseType) { this.worldMin.set(worldMin); this.worldMax.set(worldMax); @@ -151,7 +237,7 @@ public PhysicsSpace(Vector3f worldMin, Vector3f worldMax, BroadphaseType broadph } /** - * Has to be called from the (designated) physics thread + * Must be invoked on the designated physics thread. */ public void create() { physicsSpaceId = createPhysicsSpace(worldMin.x, worldMin.y, worldMin.z, worldMax.x, worldMax.y, worldMax.z, broadphaseType.ordinal(), false); @@ -192,26 +278,37 @@ public void create() { private native long createPhysicsSpace(float minX, float minY, float minZ, float maxX, float maxY, float maxZ, int broadphaseType, boolean threading); + /** + * Callback invoked just before the physics is stepped. + *

+ * This method is invoked from native code. + * + * @param timeStep the time per physics step (in seconds, ≥0) + */ private void preTick_native(float f) { - AppTask task = pQueue.poll(); - task = pQueue.poll(); - while (task != null) { - while (task.isCancelled()) { - task = pQueue.poll(); - } - try { + AppTask task; + while((task=pQueue.poll())!=null){ + if(task.isCancelled())continue; + try{ task.invoke(); } catch (Exception ex) { logger.log(Level.SEVERE, null, ex); } - task = pQueue.poll(); } + for (Iterator it = tickListeners.iterator(); it.hasNext();) { PhysicsTickListener physicsTickCallback = it.next(); physicsTickCallback.prePhysicsTick(this, f); } } + /** + * Callback invoked just after the physics is stepped. + *

+ * This method is invoked from native code. + * + * @param timeStep the time per physics step (in seconds, ≥0) + */ private void postTick_native(float f) { for (Iterator it = tickListeners.iterator(); it.hasNext();) { PhysicsTickListener physicsTickCallback = it.next(); @@ -219,6 +316,9 @@ private void postTick_native(float f) { } } + /** + * This method is invoked from native code. + */ private void addCollision_native() { } @@ -338,6 +438,9 @@ private void addCollisionEvent_native(PhysicsCollisionObject node, PhysicsCollis collisionEvents.add(eventFactory.getEvent(PhysicsCollisionEvent.TYPE_PROCESSED, node, node1, manifoldPointObjectId)); } + /** + * This method is invoked from native code. + */ private boolean notifyCollisionGroupListeners_native(PhysicsCollisionObject node, PhysicsCollisionObject node1){ PhysicsCollisionGroupListener listener = collisionGroupListeners.get(node.getCollisionGroup()); PhysicsCollisionGroupListener listener1 = collisionGroupListeners.get(node1.getCollisionGroup()); @@ -354,19 +457,21 @@ private boolean notifyCollisionGroupListeners_native(PhysicsCollisionObject node } /** - * updates the physics space + * Update this space. Invoked (by the Bullet app state) once per frame while + * the app state is attached and enabled. * - * @param time the current time value + * @param time time-per-frame multiplied by speed (in seconds, ≥0) */ public void update(float time) { update(time, maxSubSteps); } /** - * updates the physics space, uses maxSteps
+ * Simulate for the specified time interval, using no more than the + * specified number of steps. * - * @param time the current time value - * @param maxSteps + * @param time the time interval (in seconds, ≥0) + * @param maxSteps the maximum number of steps (≥1) */ public void update(float time, int maxSteps) { // if (getDynamicsWorld() == null) { @@ -378,6 +483,9 @@ public void update(float time, int maxSteps) { private native void stepSimulation(long space, float time, int maxSteps, float accuracy); + /** + * Distribute each collision event to all listeners. + */ public void distributeEvents() { //add collision callbacks int clistsize = collisionListeners.size(); @@ -391,6 +499,13 @@ public void distributeEvents() { } } + /** + * Enqueue a callable on the currently executing thread. + * + * @param the task's result type + * @param callable the task to be executed + * @return a new task (not null) + */ public static Future enqueueOnThisThread(Callable callable) { AppTask task = new AppTask(callable); System.out.println("created apptask"); @@ -399,11 +514,11 @@ public static Future enqueueOnThisThread(Callable callable) { } /** - * calls the callable on the next physics tick (ensuring e.g. force - * applying) + * Invoke the specified callable during the next physics tick. This is + * useful for applying forces. * - * @param - * @param callable + * @param the return type of the callable + * @param callable which callable to invoke * @return Future object */ public Future enqueue(Callable callable) { @@ -413,9 +528,10 @@ public Future enqueue(Callable callable) { } /** - * adds an object to the physics space + * Add the specified object to this space. * - * @param obj the PhysicsControl or Spatial with PhysicsControl to add + * @param obj the PhysicsControl, Spatial-with-PhysicsControl, + * PhysicsCollisionObject, or PhysicsJoint to add (not null, modified) */ public void add(Object obj) { if (obj instanceof PhysicsControl) { @@ -436,6 +552,11 @@ public void add(Object obj) { } } + /** + * Add the specified collision object to this space. + * + * @param obj the PhysicsCollisionObject to add (not null, modified) + */ public void addCollisionObject(PhysicsCollisionObject obj) { if (obj instanceof PhysicsGhostObject) { addGhostObject((PhysicsGhostObject) obj); @@ -449,9 +570,9 @@ public void addCollisionObject(PhysicsCollisionObject obj) { } /** - * removes an object from the physics space + * Remove the specified object from this space. * - * @param obj the PhysicsControl or Spatial with PhysicsControl to remove + * @param obj the PhysicsCollisionObject to add, or null (modified) */ public void remove(Object obj) { if (obj == null) return; @@ -473,6 +594,11 @@ public void remove(Object obj) { } } + /** + * Remove the specified collision object from this space. + * + * @param obj the PhysicsControl or Spatial with PhysicsControl to remove + */ public void removeCollisionObject(PhysicsCollisionObject obj) { if (obj instanceof PhysicsGhostObject) { removeGhostObject((PhysicsGhostObject) obj); @@ -484,9 +610,11 @@ public void removeCollisionObject(PhysicsCollisionObject obj) { } /** - * adds all physics controls and joints in the given spatial node to the physics space - * (e.g. after loading from disk) - recursive if node - * @param spatial the rootnode containing the physics objects + * Add all collision objects and joints in the specified subtree of the + * scene graph to this space (e.g. after loading from disk). Note: + * recursive! + * + * @param spatial the root of the subtree (not null) */ public void addAll(Spatial spatial) { add(spatial); @@ -514,9 +642,11 @@ public void addAll(Spatial spatial) { } /** - * Removes all physics controls and joints in the given spatial from the physics space - * (e.g. before saving to disk) - recursive if node - * @param spatial the rootnode containing the physics objects + * Remove all physics controls and joints in the specified subtree of the + * scene graph from the physics space (e.g. before saving to disk) Note: + * recursive! + * + * @param spatial the root of the subtree (not null) */ public void removeAll(Spatial spatial) { if (spatial.getControl(RigidBodyControl.class) != null) { @@ -615,6 +745,12 @@ private void removeCharacter(PhysicsCharacter node) { // dynamicsWorld.removeCollisionObject(node.getObjectId()); } + /** + * NOTE: When a rigid body is added, its gravity gets set to that of the + * physics space. + * + * @param node the body to add (not null, not already in the space) + */ private void addRigidBody(PhysicsRigidBody node) { if (physicsBodies.containsKey(node.getObjectId())) { logger.log(Level.WARNING, "RigidBody {0} already exists in PhysicsSpace, cannot add.", node); @@ -623,7 +759,7 @@ private void addRigidBody(PhysicsRigidBody node) { physicsBodies.put(node.getObjectId(), node); //Workaround - //It seems that adding a Kinematic RigidBody to the dynamicWorld prevent it from being non kinematic again afterward. + //It seems that adding a Kinematic RigidBody to the dynamicWorld prevents it from being non-kinematic again afterward. //so we add it non kinematic, then set it kinematic again. boolean kinematic = false; if (node.isKinematic()) { @@ -637,9 +773,15 @@ private void addRigidBody(PhysicsRigidBody node) { logger.log(Level.FINE, "Adding RigidBody {0} to physics space.", node.getObjectId()); if (node instanceof PhysicsVehicle) { - logger.log(Level.FINE, "Adding vehicle constraint {0} to physics space.", Long.toHexString(((PhysicsVehicle) node).getVehicleId())); - physicsVehicles.put(((PhysicsVehicle) node).getVehicleId(), (PhysicsVehicle) node); - addVehicle(physicsSpaceId, ((PhysicsVehicle) node).getVehicleId()); + PhysicsVehicle vehicle = (PhysicsVehicle) node; + vehicle.createVehicle(this); + long vehicleId = vehicle.getVehicleId(); + assert vehicleId != 0L; + logger.log(Level.FINE, + "Adding vehicle constraint {0} to physics space.", + Long.toHexString(vehicleId)); + physicsVehicles.put(vehicleId, vehicle); + addVehicle(physicsSpaceId, vehicleId); } } @@ -680,30 +822,64 @@ private void removeJoint(PhysicsJoint joint) { // dynamicsWorld.removeConstraint(joint.getObjectId()); } + /** + * Copy the list of rigid bodies that have been added to this space and not + * yet removed. + * + * @return a new list (not null) + */ public Collection getRigidBodyList() { return new LinkedList(physicsBodies.values()); } + /** + * Copy the list of ghost objects that have been added to this space and not + * yet removed. + * + * @return a new list (not null) + */ public Collection getGhostObjectList() { return new LinkedList(physicsGhostObjects.values()); } + /** + * Copy the list of physics characters that have been added to this space + * and not yet removed. + * + * @return a new list (not null) + */ public Collection getCharacterList() { return new LinkedList(physicsCharacters.values()); } + /** + * Copy the list of physics joints that have been added to this space and + * not yet removed. + * + * @return a new list (not null) + */ public Collection getJointList() { return new LinkedList(physicsJoints.values()); } + /** + * Copy the list of physics vehicles that have been added to this space and + * not yet removed. + * + * @return a new list (not null) + */ public Collection getVehicleList() { return new LinkedList(physicsVehicles.values()); } /** - * Sets the gravity of the PhysicsSpace, set before adding physics objects! + * Alter the gravitational acceleration acting on newly-added bodies. + *

+ * Whenever a rigid body is added to a space, the body's gravity gets set to + * that of the space. Thus it makes sense to set the space's vector before + * adding any bodies to the space. * - * @param gravity + * @param gravity the desired acceleration vector (not null, unaffected) */ public void setGravity(Vector3f gravity) { this.gravity.set(gravity); @@ -712,8 +888,17 @@ public void setGravity(Vector3f gravity) { private native void setGravity(long spaceId, Vector3f gravity); - //TODO: getGravity + /** + * copy of gravity-acceleration vector (default is 9.81 in the -Y direction, + * corresponding to Earth-normal in MKS units) + */ private final Vector3f gravity = new Vector3f(0,-9.81f,0); + /** + * Copy the gravitational acceleration acting on newly-added bodies. + * + * @param gravity storage for the result (not null, modified) + * @return acceleration (in the vector provided) + */ public Vector3f getGravity(Vector3f gravity) { return gravity.set(this.gravity); } @@ -733,57 +918,89 @@ public Vector3f getGravity(Vector3f gravity) { // } // /** - * Adds the specified listener to the physics tick listeners. The listeners - * are called on each physics step, which is not necessarily each frame but - * is determined by the accuracy of the physics space. + * Register the specified tick listener with this space. + *

+ * Tick listeners are notified before and after each physics step. A physics + * step is not necessarily the same as a frame; it is more influenced by the + * accuracy of the physics space. + * + * @see #setAccuracy(float) * - * @param listener + * @param listener the listener to register (not null) */ public void addTickListener(PhysicsTickListener listener) { tickListeners.add(listener); } + /** + * De-register the specified tick listener. + * + * @see #addTickListener(com.jme3.bullet.PhysicsTickListener) + * @param listener the listener to de-register (not null) + */ public void removeTickListener(PhysicsTickListener listener) { tickListeners.remove(listener); } /** - * Adds a CollisionListener that will be informed about collision events + * Register the specified collision listener with this space. + *

+ * Collision listeners are notified when collisions occur in the space. * - * @param listener the CollisionListener to add + * @param listener the listener to register (not null, alias created) */ public void addCollisionListener(PhysicsCollisionListener listener) { collisionListeners.add(listener); } /** - * Removes a CollisionListener from the list + * De-register the specified collision listener. * - * @param listener the CollisionListener to remove + * @see + * #addCollisionListener(com.jme3.bullet.collision.PhysicsCollisionListener) + * @param listener the listener to de-register (not null) */ public void removeCollisionListener(PhysicsCollisionListener listener) { collisionListeners.remove(listener); } /** - * Adds a listener for a specific collision group, such a listener can - * disable collisions when they happen.
There can be only one listener - * per collision group. + * Register the specified collision-group listener with the specified + * collision group of this space. + *

+ * Such a listener can disable collisions when they occur. There can be only + * one listener per collision group per space. * - * @param listener - * @param collisionGroup + * @param listener the listener to register (not null) + * @param collisionGroup which group it should listen for (bit mask with + * exactly one bit set) */ public void addCollisionGroupListener(PhysicsCollisionGroupListener listener, int collisionGroup) { collisionGroupListeners.put(collisionGroup, listener); } + /** + * De-register the specified collision-group listener. + * + * @see + * #addCollisionGroupListener(com.jme3.bullet.collision.PhysicsCollisionGroupListener, + * int) + * @param collisionGroup the group of the listener to de-register (bit mask + * with exactly one bit set) + */ public void removeCollisionGroupListener(int collisionGroup) { collisionGroupListeners.remove(collisionGroup); } /** - * Performs a ray collision test and returns the results as a list of - * PhysicsRayTestResults ordered by it hitFraction (lower to higher) + * Perform a ray-collision test and return the results as a list of + * PhysicsRayTestResults sorted by ascending hitFraction. + * + * @param from the starting location (physics-space coordinates, not null, + * unaffected) + * @param to the ending location (in physics-space coordinates, not null, + * unaffected) + * @return a new list of results (not null) */ public List rayTest(Vector3f from, Vector3f to) { List results = new ArrayList(); @@ -793,8 +1010,14 @@ public List rayTest(Vector3f from, Vector3f to) { } /** - * Performs a ray collision test and returns the results as a list of - * PhysicsRayTestResults without performing any sort operation + * Perform a ray-collision test and return the results as a list of + * PhysicsRayTestResults in arbitrary order. + * + * @param from the starting location (in physics-space coordinates, not + * null, unaffected) + * @param to the ending location (in physics-space coordinates, not null, + * unaffected) + * @return a new list of results (not null) */ public List rayTestRaw(Vector3f from, Vector3f to) { List results = new ArrayList(); @@ -804,17 +1027,22 @@ public List rayTestRaw(Vector3f from, Vector3f to) { } /** - * Sets m_flags for raytest, see https://code.google.com/p/bullet/source/browse/trunk/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h + * Alters the m_flags used in ray tests. see + * https://code.google.com/p/bullet/source/browse/trunk/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h * for possible options. Defaults to using the faster, approximate raytest. + * + * @param flags the desired flags, ORed together (default=0x4) */ public void SetRayTestFlags(int flags) { rayTestFlags = flags; } /** - * Gets m_flags for raytest, see https://code.google.com/p/bullet/source/browse/trunk/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h + * Reads m_flags used in ray tests. see + * https://code.google.com/p/bullet/source/browse/trunk/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h * for possible options. - * @return rayTestFlags + * + * @return which flags are used */ public int GetRayTestFlags() { return rayTestFlags; @@ -829,8 +1057,15 @@ public int compare(PhysicsRayTestResult r1, PhysicsRayTestResult r2) { }; /** - * Performs a ray collision test and returns the results as a list of - * PhysicsRayTestResults ordered by it hitFraction (lower to higher) + * Perform a ray-collision test and return the results as a list of + * PhysicsRayTestResults sorted by ascending hitFraction. + * + * @param from coordinates of the starting location (in physics space, not + * null, unaffected) + * @param to coordinates of the ending location (in physics space, not null, + * unaffected) + * @param results the list to hold results (not null, modified) + * @return results */ public List rayTest(Vector3f from, Vector3f to, List results) { results.clear(); @@ -841,8 +1076,15 @@ public List rayTest(Vector3f from, Vector3f to, List rayTestRaw(Vector3f from, Vector3f to, List results) { results.clear(); @@ -872,11 +1114,18 @@ public List rayTestRaw(Vector3f from, Vector3f to, List You have to use different Transforms for - * start and end (at least distance > 0.4f). SweepTest will not see a - * collision if it starts INSIDE an object and is moving AWAY from its - * center. + * Perform a sweep-collision test and return the results as a new list. + *

+ * The starting and ending locations must be at least 0.4f physics-space + * units apart. + *

+ * A sweep test will miss a collision if it starts inside an object and + * sweeps away from the object's center. + * + * @param shape the shape to sweep (not null) + * @param start the starting physics-space transform (not null) + * @param end the ending physics-space transform (not null) + * @return a new list of results */ public List sweepTest(CollisionShape shape, Transform start, Transform end) { List results = new LinkedList(); @@ -884,17 +1133,41 @@ public List sweepTest(CollisionShape shape, Transform st return (List) results; } + /** + * Perform a sweep-collision test and store the results in an existing list. + *

+ * The starting and ending locations must be at least 0.4f physics-space + * units apart. + *

+ * A sweep test will miss a collision if it starts inside an object and + * sweeps away from the object's center. + * + * @param shape the shape to sweep (not null) + * @param start the starting physics-space transform (not null) + * @param end the ending physics-space transform (not null) + * @param results the list to hold results (not null, modified) + * @return results + */ public List sweepTest(CollisionShape shape, Transform start, Transform end, List results) { return sweepTest(shape, start, end, results, 0.0f); } public native void sweepTest_native(long shape, Transform from, Transform to, long physicsSpaceId, List results, float allowedCcdPenetration); /** - * Performs a sweep collision test and returns the results as a list of - * PhysicsSweepTestResults
You have to use different Transforms for - * start and end (at least distance > allowedCcdPenetration). SweepTest will not see a - * collision if it starts INSIDE an object and is moving AWAY from its - * center. + * Perform a sweep-collision test and store the results in an existing list. + *

+ * The starting and ending locations must be at least 0.4f physics-space + * units apart. + *

+ * A sweep test will miss a collision if it starts inside an object and + * sweeps away from the object's center. + * + * @param shape the shape to sweep (not null) + * @param start the starting physics-space transform (not null) + * @param end the ending physics-space transform (not null) + * @param results the list to hold results (not null, modified) + * @param allowedCcdPenetration true→allow, false→disallow + * @return results */ public List sweepTest(CollisionShape shape, Transform start, Transform end, List results, float allowedCcdPenetration ) { results.clear(); @@ -921,7 +1194,7 @@ public float addSingleResult(LocalConvexResult lcr, boolean bln) { */ /** - * destroys the current PhysicsSpace so that a new one can be created + * Destroy this space so that a new one can be instantiated. */ public void destroy() { physicsBodies.clear(); @@ -940,59 +1213,87 @@ public long getSpaceId() { return physicsSpaceId; } + /** + * Read the type of acceleration structure used. + * + * @return an enum value (not null) + */ public BroadphaseType getBroadphaseType() { return broadphaseType; } + /** + * Alter the type of acceleration structure used. + * + * @param broadphaseType the desired algorithm (not null) + */ public void setBroadphaseType(BroadphaseType broadphaseType) { this.broadphaseType = broadphaseType; } /** - * Sets the maximum amount of extra steps that will be used to step the - * physics when the fps is below the physics fps. Doing this maintains - * determinism in physics. For example a maximum number of 2 can compensate - * for framerates as low as 30fps when the physics has the default accuracy - * of 60 fps. Note that setting this value too high can make the physics - * drive down its own fps in case it's overloaded. + * Alter the maximum number of physics steps per frame. + *

+ * Extra physics steps help maintain determinism when the render fps drops + * below 1/accuracy. For example a value of 2 can compensate for frame rates + * as low as 30fps, assuming the physics has an accuracy of 1/60 sec. + *

+ * Setting this value too high can depress the frame rate. * - * @param steps The maximum number of extra steps, default is 4. + * @param steps the desired maximum number of steps per frame (≥1, + * default=4) */ public void setMaxSubSteps(int steps) { maxSubSteps = steps; } /** - * get the current accuracy of the physics computation + * Read the accuracy (time step) of the physics simulation. * - * @return the current accuracy + * @return the timestep (in seconds, >0) */ public float getAccuracy() { return accuracy; } /** - * sets the accuracy of the physics computation, default=1/60s
+ * Alter the accuracy (time step) of the physics simulation. + *

+ * In general, the smaller the time step, the more accurate (and + * compute-intensive) the simulation will be. Bullet works best with a + * time step of no more than 1/60 second. * - * @param accuracy + * @param accuracy the desired time step (in seconds, >0, default=1/60) */ public void setAccuracy(float accuracy) { this.accuracy = accuracy; } + /** + * Access the minimum coordinate values for this space. + * + * @return the pre-existing vector + */ public Vector3f getWorldMin() { return worldMin; } /** - * only applies for AXIS_SWEEP broadphase + * Alter the minimum coordinate values for this space. (only affects + * AXIS_SWEEP broadphase algorithms) * - * @param worldMin + * @param worldMin the desired minimum coordinate values (not null, + * unaffected) */ public void setWorldMin(Vector3f worldMin) { this.worldMin.set(worldMin); } + /** + * Access the maximum coordinate values for this space. + * + * @return the pre-existing vector (not null) + */ public Vector3f getWorldMax() { return worldMax; } @@ -1007,11 +1308,11 @@ public void setWorldMax(Vector3f worldMax) { } /** - * Set the number of iterations used by the contact solver. - * - * The default is 10. Use 4 for low quality, 20 for high quality. - * - * @param numIterations The number of iterations used by the contact & constraint solver. + * Alter the number of iterations used by the contact-and-constraint solver. + *

+ * Use 4 for low quality, 20 for high quality. + * + * @param numIterations the desired number of iterations (≥1, default=10) */ public void setSolverNumIterations(int numIterations) { this.solverNumIterations = numIterations; @@ -1019,9 +1320,9 @@ public void setSolverNumIterations(int numIterations) { } /** - * Get the number of iterations used by the contact solver. - * - * @return The number of iterations used by the contact & constraint solver. + * Read the number of iterations used by the contact-and-constraint solver. + * + * @return the number of iterations used */ public int getSolverNumIterations() { return solverNumIterations; @@ -1032,28 +1333,40 @@ public int getSolverNumIterations() { public static native void initNativePhysics(); /** - * interface with Broadphase types + * Enumerate the available acceleration structures for broadphase collision + * detection. */ public enum BroadphaseType { /** - * basic Broadphase + * btSimpleBroadphase: a brute-force reference implementation for + * debugging purposes */ SIMPLE, /** - * better Broadphase, needs worldBounds , max Object number = 16384 + * btAxisSweep3: uses incremental 3-D sweep and prune, requires world + * bounds, limited to 16_384 objects */ AXIS_SWEEP_3, /** - * better Broadphase, needs worldBounds , max Object number = 65536 + * bt32BitAxisSweep3: uses incremental 3-D sweep and prune, requires + * world bounds, limited to 65_536 objects */ AXIS_SWEEP_3_32, /** - * Broadphase allowing quicker adding/removing of physics objects + * btDbvtBroadphase: uses a fast, dynamic bounding-volume hierarchy + * based on AABB tree to allow quicker addition/removal of physics + * objects */ DBVT; } + /** + * Finalize this physics space just before it is destroyed. Should be + * invoked only by a subclass or by the garbage collector. + * + * @throws Throwable ignored by the garbage collector + */ @Override protected void finalize() throws Throwable { super.finalize(); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionEvent.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionEvent.java index 0022ebd1cb..bb62760020 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionEvent.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionEvent.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 @@ -36,21 +36,53 @@ import java.util.EventObject; /** - * A CollisionEvent stores all information about a collision in the PhysicsWorld. - * Do not store this Object, as it will be reused after the collision() method has been called. - * Get/reference all data you need in the collide method. + * Describe a collision in the physics world. + *

+ * Do not retain this object, as it will be reused after the collision() method + * returns. Copy any data you need during the collide() method. + * * @author normenhansen */ public class PhysicsCollisionEvent extends EventObject { + /** + * type value to indicate a new event + */ public static final int TYPE_ADDED = 0; + /** + * type value to indicate an event that has been added to a PhysicsSpace + * queue + */ public static final int TYPE_PROCESSED = 1; + /** + * type value to indicate a cleaned/destroyed event + */ public static final int TYPE_DESTROYED = 2; + /** + * type value that indicates the event's status + */ private int type; + /** + * 1st involved object + */ private PhysicsCollisionObject nodeA; + /** + * 2nd involved object + */ private PhysicsCollisionObject nodeB; + /** + * Bullet identifier of the btManifoldPoint + */ private long manifoldPointObjectId = 0; + /** + * Instantiate a collision event. + * + * @param type event type (0=added/1=processed/2=destroyed) + * @param nodeA 1st involved object (alias created) + * @param nodeB 2nd involved object (alias created) + * @param manifoldPointObjectId Bullet identifier of the btManifoldPoint + */ public PhysicsCollisionEvent(int type, PhysicsCollisionObject nodeA, PhysicsCollisionObject nodeB, long manifoldPointObjectId) { super(nodeA); this.type = type; @@ -58,9 +90,9 @@ public PhysicsCollisionEvent(int type, PhysicsCollisionObject nodeA, PhysicsColl this.nodeB = nodeB; this.manifoldPointObjectId = manifoldPointObjectId; } - + /** - * used by event factory, called when event is destroyed + * Destroy this event. */ public void clean() { source = null; @@ -71,7 +103,12 @@ public void clean() { } /** - * used by event factory, called when event reused + * Reuse this event. + * + * @param type event type (added/processed/destroyed) + * @param source 1st involved object (alias created) + * @param nodeB 2nd involved object (alias created) + * @param manifoldPointObjectId Bullet identifier */ public void refactor(int type, PhysicsCollisionObject source, PhysicsCollisionObject nodeB, long manifoldPointObjectId) { this.source = source; @@ -81,12 +118,19 @@ public void refactor(int type, PhysicsCollisionObject source, PhysicsCollisionOb this.manifoldPointObjectId = manifoldPointObjectId; } + /** + * Read the type of event. + * + * @return added/processed/destroyed + */ public int getType() { return type; } /** - * @return A Spatial if the UserObject of the PhysicsCollisionObject is a Spatial + * Access the user object of collision object A, provided it's a Spatial. + * + * @return the pre-existing Spatial, or null if none */ public Spatial getNodeA() { if (nodeA.getUserObject() instanceof Spatial) { @@ -96,7 +140,9 @@ public Spatial getNodeA() { } /** - * @return A Spatial if the UserObject of the PhysicsCollisionObject is a Spatial + * Access the user object of collision object B, provided it's a Spatial. + * + * @return the pre-existing Spatial, or null if none */ public Spatial getNodeB() { if (nodeB.getUserObject() instanceof Spatial) { @@ -105,139 +151,286 @@ public Spatial getNodeB() { return null; } + /** + * Access collision object A. + * + * @return the pre-existing object (not null) + */ public PhysicsCollisionObject getObjectA() { return nodeA; } + /** + * Access collision object B. + * + * @return the pre-existing object (not null) + */ public PhysicsCollisionObject getObjectB() { return nodeB; } + /** + * Read the collision's applied impulse. + * + * @return impulse + */ public float getAppliedImpulse() { return getAppliedImpulse(manifoldPointObjectId); } private native float getAppliedImpulse(long manifoldPointObjectId); + /** + * Read the collision's applied lateral impulse #1. + * + * @return impulse + */ public float getAppliedImpulseLateral1() { return getAppliedImpulseLateral1(manifoldPointObjectId); } private native float getAppliedImpulseLateral1(long manifoldPointObjectId); + /** + * Read the collision's applied lateral impulse #2. + * + * @return impulse + */ public float getAppliedImpulseLateral2() { return getAppliedImpulseLateral2(manifoldPointObjectId); } private native float getAppliedImpulseLateral2(long manifoldPointObjectId); + /** + * Read the collision's combined friction. + * + * @return friction + */ public float getCombinedFriction() { return getCombinedFriction(manifoldPointObjectId); } private native float getCombinedFriction(long manifoldPointObjectId); + /** + * Read the collision's combined restitution. + * + * @return restitution + */ public float getCombinedRestitution() { return getCombinedRestitution(manifoldPointObjectId); } private native float getCombinedRestitution(long manifoldPointObjectId); + /** + * Read the collision's distance #1. + * + * @return distance + */ public float getDistance1() { return getDistance1(manifoldPointObjectId); } private native float getDistance1(long manifoldPointObjectId); + /** + * Read the collision's index 0. + * + * @return index + */ public int getIndex0() { return getIndex0(manifoldPointObjectId); } private native int getIndex0(long manifoldPointObjectId); + /** + * Read the collision's index 1. + * + * @return index + */ public int getIndex1() { return getIndex1(manifoldPointObjectId); } private native int getIndex1(long manifoldPointObjectId); + /** + * Copy the collision's lateral friction direction #1. + * + * @return a new vector (not null) + */ public Vector3f getLateralFrictionDir1() { return getLateralFrictionDir1(new Vector3f()); } + /** + * Copy the collision's lateral friction direction #1. + * + * @param lateralFrictionDir1 storage for the result (not null, modified) + * @return direction vector (not null) + */ public Vector3f getLateralFrictionDir1(Vector3f lateralFrictionDir1) { getLateralFrictionDir1(manifoldPointObjectId, lateralFrictionDir1); return lateralFrictionDir1; } private native void getLateralFrictionDir1(long manifoldPointObjectId, Vector3f lateralFrictionDir1); + /** + * Copy the collision's lateral friction direction #2. + * + * @return a new vector + */ public Vector3f getLateralFrictionDir2() { return getLateralFrictionDir2(new Vector3f()); } + /** + * Copy the collision's lateral friction direction #2. + * + * @param lateralFrictionDir2 storage for the result (not null, modified) + * @return direction vector (not null) + */ public Vector3f getLateralFrictionDir2(Vector3f lateralFrictionDir2) { getLateralFrictionDir2(manifoldPointObjectId, lateralFrictionDir2); return lateralFrictionDir2; } private native void getLateralFrictionDir2(long manifoldPointObjectId, Vector3f lateralFrictionDir2); + /** + * Test whether the collision's lateral friction is initialized. + * + * @return true if initialized, otherwise false + */ public boolean isLateralFrictionInitialized() { return isLateralFrictionInitialized(manifoldPointObjectId); } private native boolean isLateralFrictionInitialized(long manifoldPointObjectId); + /** + * Read the collision's lifetime. + * + * @return lifetime + */ public int getLifeTime() { return getLifeTime(manifoldPointObjectId); } private native int getLifeTime(long manifoldPointObjectId); + /** + * Copy the collision's location in the local coordinates of object A. + * + * @return a new location vector (in local coordinates, not null) + */ public Vector3f getLocalPointA() { return getLocalPointA(new Vector3f()); } + /** + * Copy the collision's location in the local coordinates of object A. + * + * @param localPointA storage for the result (not null, modified) + * @return a location vector (in local coordinates, not null) + */ public Vector3f getLocalPointA(Vector3f localPointA) { getLocalPointA(manifoldPointObjectId, localPointA); return localPointA; } private native void getLocalPointA(long manifoldPointObjectId, Vector3f localPointA); + /** + * Copy the collision's location in the local coordinates of object B. + * + * @return a new location vector (in local coordinates, not null) + */ public Vector3f getLocalPointB() { return getLocalPointB(new Vector3f()); } + /** + * Copy the collision's location in the local coordinates of object B. + * + * @param localPointB storage for the result (not null, modified) + * @return a location vector (in local coordinates, not null) + */ public Vector3f getLocalPointB(Vector3f localPointB) { getLocalPointB(manifoldPointObjectId, localPointB); return localPointB; } private native void getLocalPointB(long manifoldPointObjectId, Vector3f localPointB); + /** + * Copy the collision's normal on object B. + * + * @return a new normal vector (in physics-space coordinates, not null) + */ public Vector3f getNormalWorldOnB() { return getNormalWorldOnB(new Vector3f()); } + /** + * Copy the collision's normal on object B. + * + * @param normalWorldOnB storage for the result (not null, modified) + * @return a normal vector (in physics-space coordinates, not null) + */ public Vector3f getNormalWorldOnB(Vector3f normalWorldOnB) { getNormalWorldOnB(manifoldPointObjectId, normalWorldOnB); return normalWorldOnB; } private native void getNormalWorldOnB(long manifoldPointObjectId, Vector3f normalWorldOnB); + /** + * Read part identifier 0. + * + * @return identifier + */ public int getPartId0() { return getPartId0(manifoldPointObjectId); } private native int getPartId0(long manifoldPointObjectId); + /** + * Read part identifier 1. + * + * @return identifier + */ public int getPartId1() { return getPartId1(manifoldPointObjectId); } private native int getPartId1(long manifoldPointObjectId); + /** + * Copy the collision's location. + * + * @return a new vector (in physics-space coordinates, not null) + */ public Vector3f getPositionWorldOnA() { return getPositionWorldOnA(new Vector3f()); } + /** + * Copy the collision's location. + * + * @param positionWorldOnA storage for the result (not null, modified) + * @return a location vector (in physics-space coordinates, not null) + */ public Vector3f getPositionWorldOnA(Vector3f positionWorldOnA) { getPositionWorldOnA(manifoldPointObjectId, positionWorldOnA); return positionWorldOnA; } private native void getPositionWorldOnA(long manifoldPointObjectId, Vector3f positionWorldOnA); + /** + * Copy the collision's location. + * + * @return a new location vector (in physics-space coordinates, not null) + */ public Vector3f getPositionWorldOnB() { return getPositionWorldOnB(new Vector3f()); } + /** + * Copy the collision's location. + * + * @param positionWorldOnB storage for the result (not null, modified) + * @return a location vector (in physics-space coordinates, not null) + */ public Vector3f getPositionWorldOnB(Vector3f positionWorldOnB) { getPositionWorldOnB(manifoldPointObjectId, positionWorldOnB); return positionWorldOnB; diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionEventFactory.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionEventFactory.java index 8c328a15f6..d8eb118797 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionEventFactory.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionEventFactory.java @@ -41,6 +41,11 @@ public class PhysicsCollisionEventFactory { private ConcurrentLinkedQueue eventBuffer = new ConcurrentLinkedQueue(); + /** + * Obtain an unused event. + * + * @return an event (not null) + */ public PhysicsCollisionEvent getEvent(int type, PhysicsCollisionObject source, PhysicsCollisionObject nodeB, long manifoldPointObjectId) { PhysicsCollisionEvent event = eventBuffer.poll(); if (event == null) { @@ -51,6 +56,11 @@ public PhysicsCollisionEvent getEvent(int type, PhysicsCollisionObject source, P return event; } + /** + * Recycle the specified event. + * + * @param event + */ public void recycle(PhysicsCollisionEvent event) { event.clean(); eventBuffer.add(event); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionObject.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionObject.java index 7e268e56b5..443433623d 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionObject.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsCollisionObject.java @@ -38,67 +38,147 @@ import java.util.logging.Logger; /** - * Base class for collision objects (PhysicsRigidBody, PhysicsGhostObject) + * The abstract base class for collision objects based on Bullet's + * btCollisionObject. + *

+ * Collision objects include PhysicsCharacter, PhysicsRigidBody, and + * PhysicsGhostObject. + * * @author normenhansen */ public abstract class PhysicsCollisionObject implements Savable { + /** + * Unique identifier of the btCollisionObject. Constructors are responsible + * for setting this to a non-zero value. The id might change if the object + * gets rebuilt. + */ protected long objectId = 0; + /** + * shape associated with this object (not null) + */ protected CollisionShape collisionShape; + /** + * collideWithGroups bitmask that represents "no groups" + */ public static final int COLLISION_GROUP_NONE = 0x00000000; + /** + * collisionGroup/collideWithGroups bitmask that represents group #1 + */ public static final int COLLISION_GROUP_01 = 0x00000001; + /** + * collisionGroup/collideWithGroups bitmask that represents group #2 + */ public static final int COLLISION_GROUP_02 = 0x00000002; + /** + * collisionGroup/collideWithGroups bitmask that represents group #3 + */ public static final int COLLISION_GROUP_03 = 0x00000004; + /** + * collisionGroup/collideWithGroups bitmask that represents group #4 + */ public static final int COLLISION_GROUP_04 = 0x00000008; + /** + * collisionGroup/collideWithGroups bitmask that represents group #5 + */ public static final int COLLISION_GROUP_05 = 0x00000010; + /** + * collisionGroup/collideWithGroups bitmask that represents group #6 + */ public static final int COLLISION_GROUP_06 = 0x00000020; + /** + * collisionGroup/collideWithGroups bitmask that represents group #7 + */ public static final int COLLISION_GROUP_07 = 0x00000040; + /** + * collisionGroup/collideWithGroups bitmask that represents group #8 + */ public static final int COLLISION_GROUP_08 = 0x00000080; + /** + * collisionGroup/collideWithGroups bitmask that represents group #9 + */ public static final int COLLISION_GROUP_09 = 0x00000100; + /** + * collisionGroup/collideWithGroups bitmask that represents group #10 + */ public static final int COLLISION_GROUP_10 = 0x00000200; + /** + * collisionGroup/collideWithGroups bitmask that represents group #11 + */ public static final int COLLISION_GROUP_11 = 0x00000400; + /** + * collisionGroup/collideWithGroups bitmask that represents group #12 + */ public static final int COLLISION_GROUP_12 = 0x00000800; + /** + * collisionGroup/collideWithGroups bitmask that represents group #13 + */ public static final int COLLISION_GROUP_13 = 0x00001000; + /** + * collisionGroup/collideWithGroups bitmask that represents group #14 + */ public static final int COLLISION_GROUP_14 = 0x00002000; + /** + * collisionGroup/collideWithGroups bitmask that represents group #15 + */ public static final int COLLISION_GROUP_15 = 0x00004000; + /** + * collisionGroup/collideWithGroups bitmask that represents group #16 + */ public static final int COLLISION_GROUP_16 = 0x00008000; + /** + * collision group to which this physics object belongs (default=group #1) + */ protected int collisionGroup = 0x00000001; + /** + * collision groups with which this object can collide (default=only group + * #1) + */ protected int collisionGroupsMask = 0x00000001; private Object userObject; /** - * Sets a CollisionShape to this physics object, note that the object should - * not be in the physics space when adding a new collision shape as it is rebuilt - * on the physics side. - * @param collisionShape the CollisionShape to set + * Apply the specified CollisionShape to this object. Note that the object + * should not be in any physics space while changing shape; the object gets + * rebuilt on the physics side. + * + * @param collisionShape the shape to apply (not null, alias created) */ public void setCollisionShape(CollisionShape collisionShape) { this.collisionShape = collisionShape; } /** - * @return the CollisionShape of this PhysicsNode, to be able to reuse it with - * other physics nodes (increases performance) + * Access the shape of this physics object. + * + * @return the pre-existing instance, which can then be applied to other + * physics objects (increases performance) */ public CollisionShape getCollisionShape() { return collisionShape; } /** - * Returns the collision group for this collision shape - * @return The collision group + * Read the collision group for this physics object. + * + * @return the collision group (bit mask with exactly one bit set) */ public int getCollisionGroup() { return collisionGroup; } /** - * Sets the collision group number for this physics object.
- * The groups are integer bit masks and some pre-made variables are available in CollisionObject. - * All physics objects are by default in COLLISION_GROUP_01.
- * Two object will collide when one of the parties has the - * collisionGroup of the other in its collideWithGroups set. - * @param collisionGroup the collisionGroup to set + * Alter the collision group for this physics object. + *

+ * Groups are represented by integer bit masks with exactly 1 bit set. + * Pre-made variables are available in PhysicsCollisionObject. By default, + * physics objects are in COLLISION_GROUP_01. + *

+ * Two objects can collide only if one of them has the collisionGroup of the + * other in its collideWithGroups set. + * + * @param collisionGroup the collisionGroup to apply (bit mask with exactly + * 1 bit set) */ public void setCollisionGroup(int collisionGroup) { this.collisionGroup = collisionGroup; @@ -108,10 +188,12 @@ public void setCollisionGroup(int collisionGroup) { } /** - * Add a group that this object will collide with.
- * Two object will collide when one of the parties has the - * collisionGroup of the other in its collideWithGroups set.
- * @param collisionGroup + * Add collision groups to the set with which this object can collide. + * + * Two objects can collide only if one of them has the collisionGroup of the + * other in its collideWithGroups set. + * + * @param collisionGroup groups to add (bit mask) */ public void addCollideWithGroup(int collisionGroup) { this.collisionGroupsMask = this.collisionGroupsMask | collisionGroup; @@ -121,8 +203,9 @@ public void addCollideWithGroup(int collisionGroup) { } /** - * Remove a group from the list this object collides with. - * @param collisionGroup + * Remove collision groups from the set with which this object can collide. + * + * @param collisionGroup groups to remove, ORed together (bit mask) */ public void removeCollideWithGroup(int collisionGroup) { this.collisionGroupsMask = this.collisionGroupsMask & ~collisionGroup; @@ -132,8 +215,9 @@ public void removeCollideWithGroup(int collisionGroup) { } /** - * Directly set the bitmask for collision groups that this object collides with. - * @param collisionGroups + * Directly alter the collision groups with which this object can collide. + * + * @param collisionGroups desired groups, ORed together (bit mask) */ public void setCollideWithGroups(int collisionGroups) { this.collisionGroupsMask = collisionGroups; @@ -143,13 +227,18 @@ public void setCollideWithGroups(int collisionGroups) { } /** - * Gets the bitmask of collision groups that this object collides with. - * @return Collision groups mask + * Read the set of collision groups with which this object can collide. + * + * @return bit mask */ public int getCollideWithGroups() { return collisionGroupsMask; } + /** + * Initialize the user pointer and collision-group information of this + * object. + */ protected void initUserPointer() { Logger.getLogger(this.getClass().getName()).log(Level.FINE, "initUserPointer() objectId = {0}", Long.toHexString(objectId)); initUserPointer(objectId, collisionGroup, collisionGroupsMask); @@ -157,27 +246,51 @@ protected void initUserPointer() { native void initUserPointer(long objectId, int group, int groups); /** - * @return the userObject + * Access the user object associated with this collision object. + * + * @return the pre-existing instance, or null if none */ public Object getUserObject() { return userObject; } /** - * @param userObject the userObject to set + * Associate a user object (such as a Spatial) with this collision object. + * + * @param userObject the object to associate with this collision object + * (alias created, may be null) */ public void setUserObject(Object userObject) { this.userObject = userObject; } - public long getObjectId(){ + /** + * Read the id of the btCollisionObject. + * + * @return the unique identifier (not zero) + */ + public long getObjectId(){ return objectId; } + /** + * Attach the identified btCollisionShape to the identified + * btCollisionObject. Native method. + * + * @param objectId the unique identifier of the btCollisionObject (not zero) + * @param collisionShapeId the unique identifier of the btCollisionShape + * (not zero) + */ protected native void attachCollisionShape(long objectId, long collisionShapeId); native void setCollisionGroup(long objectId, int collisionGroup); native void setCollideWithGroups(long objectId, int collisionGroups); + /** + * Serialize this object, for example when saving to a J3O file. + * + * @param e exporter (not null) + * @throws IOException from exporter + */ @Override public void write(JmeExporter e) throws IOException { OutputCapsule capsule = e.getCapsule(this); @@ -186,6 +299,12 @@ public void write(JmeExporter e) throws IOException { capsule.write(collisionShape, "collisionShape", null); } + /** + * De-serialize this object, for example when loading from a J3O file. + * + * @param e importer (not null) + * @throws IOException from importer + */ @Override public void read(JmeImporter e) throws IOException { InputCapsule capsule = e.getCapsule(this); @@ -195,6 +314,12 @@ public void read(JmeImporter e) throws IOException { collisionShape = shape; } + /** + * Finalize this collision object just before it is destroyed. Should be + * invoked only by a subclass or by the garbage collector. + * + * @throws Throwable ignored by the garbage collector + */ @Override protected void finalize() throws Throwable { super.finalize(); @@ -202,5 +327,10 @@ protected void finalize() throws Throwable { finalizeNative(objectId); } + /** + * Finalize the identified btCollisionObject. Native method. + * + * @param objectId the unique identifier of the btCollisionObject (not zero) + */ protected native void finalizeNative(long objectId); } diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsRayTestResult.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsRayTestResult.java index bbc231fa7d..02bf0162e6 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsRayTestResult.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsRayTestResult.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,47 +34,67 @@ import com.jme3.math.Vector3f; /** - * Contains the results of a PhysicsSpace rayTest - * bulletAppState.getPhysicsSpace().rayTest(new Vector3f(0,1000,0),new Vector3f(0,-1000,0)); - javap -s java.util.List + * Represent the results of a Bullet ray test. + * * @author Empire-Phoenix,normenhansen */ public class PhysicsRayTestResult { + /** + * collision object that was hit + */ private PhysicsCollisionObject collisionObject; + /** + * normal vector at the point of contact + */ private Vector3f hitNormalLocal; + /** + * fraction of the ray's total length (from=0, to=1, ≥0, ≤1) + */ private float hitFraction; + /** + * true→need to transform normal into world space + */ private boolean normalInWorldSpace = true; /** - * allocated by native code only + * A private constructor to inhibit instantiation of this class by Java. + * These results are instantiated exclusively by native code. */ private PhysicsRayTestResult() { } /** - * @return the collisionObject + * Access the collision object that was hit. + * + * @return the pre-existing instance */ public PhysicsCollisionObject getCollisionObject() { return collisionObject; } /** - * @return the hitNormalLocal + * Access the normal vector at the point of contact. + * + * @return a pre-existing unit vector (not null) */ public Vector3f getHitNormalLocal() { return hitNormalLocal; } /** - * @return the hitFraction + * Read the fraction of the ray's total length. + * + * @return fraction (from=0, to=1, ≥0, ≤1) */ public float getHitFraction() { return hitFraction; } /** - * @return the normalInWorldSpace + * Test whether the normal is in world space. + * + * @return true if in world space, otherwise false */ public boolean isNormalInWorldSpace() { return normalInWorldSpace; diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsSweepTestResult.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsSweepTestResult.java index 8e61b66a24..9becbb1c76 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsSweepTestResult.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/PhysicsSweepTestResult.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,16 +34,33 @@ import com.jme3.math.Vector3f; /** - * Contains the results of a PhysicsSpace rayTest + * Represent the results of a Bullet sweep test. + * * @author normenhansen */ public class PhysicsSweepTestResult { + /** + * collision object that was hit + */ private PhysicsCollisionObject collisionObject; + /** + * normal vector at the point of contact + */ private Vector3f hitNormalLocal; + /** + * fraction of the way between the transforms (from=0, to=1, ≥0, ≤1) + */ private float hitFraction; + /** + * true→need to transform normal into world space + */ private boolean normalInWorldSpace; + /** + * A private constructor to inhibit instantiation of this class by Java. + * These results are instantiated exclusively by native code. + */ public PhysicsSweepTestResult() { } @@ -55,33 +72,50 @@ public PhysicsSweepTestResult(PhysicsCollisionObject collisionObject, Vector3f h } /** - * @return the collisionObject + * Access the collision object that was hit. + * + * @return the pre-existing instance */ public PhysicsCollisionObject getCollisionObject() { return collisionObject; } /** - * @return the hitNormalLocal + * Access the normal vector at the point of contact. + * + * @return the pre-existing vector (not null) */ public Vector3f getHitNormalLocal() { return hitNormalLocal; } /** - * @return the hitFraction + * Read the fraction of fraction of the way between the transforms (from=0, + * to=1, ≥0, ≤1) + * + * @return fraction (from=0, to=1, ≥0, ≤1) */ public float getHitFraction() { return hitFraction; } /** - * @return the normalInWorldSpace + * Test whether the normal is in world space. + * + * @return true if in world space, otherwise false */ public boolean isNormalInWorldSpace() { return normalInWorldSpace; } + /** + * Fill in the fields of this result. + * + * @param collisionObject + * @param hitNormalLocal + * @param hitFraction + * @param normalInWorldSpace + */ public void fill(PhysicsCollisionObject collisionObject, Vector3f hitNormalLocal, float hitFraction, boolean normalInWorldSpace) { this.collisionObject = collisionObject; this.hitNormalLocal = hitNormalLocal; diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/BoxCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/BoxCollisionShape.java index 000bb2dc7a..bec41ff97f 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/BoxCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/BoxCollisionShape.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,35 +41,63 @@ import java.util.logging.Logger; /** - * Basic box collision shape + * A rectangular-solid collision shape based on Bullet's btBoxShape. + * * @author normenhansen */ public class BoxCollisionShape extends CollisionShape { + /** + * copy of half-extents of the box on each local axis (not null, no negative + * component) + */ private Vector3f halfExtents; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public BoxCollisionShape() { } /** - * creates a collision box from the given halfExtents - * @param halfExtents the halfExtents of the CollisionBox + * Instantiate a box shape with the specified half extents. + * + * @param halfExtents the desired unscaled half extents (not null, no + * negative component, alias created) */ public BoxCollisionShape(Vector3f halfExtents) { this.halfExtents = halfExtents; createShape(); } + /** + * Access the half extents of the box. + * + * @return the pre-existing instance (not null, no negative component) + */ public final Vector3f getHalfExtents() { return halfExtents; } - + + /** + * 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 { super.write(ex); OutputCapsule capsule = ex.getCapsule(this); capsule.write(halfExtents, "halfExtents", 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 { super.read(im); InputCapsule capsule = im.getCapsule(this); @@ -78,6 +106,9 @@ public void read(JmeImporter im) throws IOException { createShape(); } + /** + * Instantiate the configured shape in Bullet. + */ protected void createShape() { objectId = createShape(halfExtents); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CapsuleCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CapsuleCollisionShape.java index 00ccdf74e1..0a15b343e3 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CapsuleCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CapsuleCollisionShape.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,20 +41,37 @@ import java.util.logging.Logger; /** - * Basic capsule collision shape + * A capsule collision shape based on Bullet's btCapsuleShapeX, btCapsuleShape, + * or btCapsuleShapeZ. These shapes have no margin and cannot be scaled. + * * @author normenhansen */ public class CapsuleCollisionShape extends CollisionShape{ - protected float radius,height; - protected int axis; + /** + * copy of height of the cylindrical portion (≥0) + */ + private float height; + /** + * copy of radius (≥0) + */ + private float radius; + /** + * copy of main (height) axis (0→X, 1→Y, 2→Z) + */ + private int axis; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public CapsuleCollisionShape() { } /** - * creates a new CapsuleCollisionShape with the given radius and height - * @param radius the radius of the capsule - * @param height the height of the capsule + * Instantiate a Y-axis capsule shape with the specified radius and height. + * + * @param radius the desired radius (≥0) + * @param height the desired height (of the cylindrical portion) (≥0) */ public CapsuleCollisionShape(float radius, float height) { this.radius=radius; @@ -64,10 +81,11 @@ public CapsuleCollisionShape(float radius, float height) { } /** - * creates a capsule shape around the given axis (0=X,1=Y,2=Z) - * @param radius - * @param height - * @param axis + * Instantiate a capsule shape around the specified main (height) axis. + * + * @param radius the desired radius (≥0) + * @param height the desired height (of the cylindrical portion) (≥0) + * @param axis which local axis: 0→X, 1→Y, 2→Z */ public CapsuleCollisionShape(float radius, float height, int axis) { this.radius=radius; @@ -76,20 +94,39 @@ public CapsuleCollisionShape(float radius, float height, int axis) { createShape(); } + /** + * Read the radius of the capsule. + * + * @return the radius (≥0) + */ public float getRadius() { return radius; } + /** + * Read the height (of the cylindrical portion) of the capsule. + * + * @return height (≥0) + */ public float getHeight() { return height; } + /** + * Determine the main (height) axis of the capsule. + * + * @return 0 for local X, 1 for local Y, or 2 for local Z + */ public int getAxis() { return axis; } /** - * WARNING - CompoundCollisionShape scaling has no effect. + * Alter the scaling factors of this shape. Scaling is disabled + * for capsule shapes. + * + * @param scale the desired scaling factor for each local axis (not null, no + * negative component, unaffected, default=1,1,1) */ @Override public void setScale(Vector3f scale) { @@ -98,6 +135,12 @@ public void setScale(Vector3f scale) { } } + /** + * 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 { super.write(ex); OutputCapsule capsule = ex.getCapsule(this); @@ -106,6 +149,12 @@ public void write(JmeExporter ex) throws IOException { capsule.write(axis, "axis", 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 { super.read(im); InputCapsule capsule = im.getCapsule(this); @@ -115,6 +164,9 @@ public void read(JmeImporter im) throws IOException { createShape(); } + /** + * Instantiate the configured shape in Bullet. + */ protected void createShape(){ objectId = createShape(axis, radius, height); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CollisionShape.java index c5b390e0e1..ea6f11be9c 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CollisionShape.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 @@ -38,15 +38,31 @@ import java.util.logging.Logger; /** - * This Object holds information about a jbullet CollisionShape to be able to reuse - * CollisionShapes (as suggested in bullet manuals) - * TODO: add static methods to create shapes from nodes (like jbullet-jme constructor) + * The abstract base class for collision shapes based on Bullet's + * btCollisionShape. + *

+ * Collision shapes include BoxCollisionShape and CapsuleCollisionShape. As + * suggested in the Bullet manual, a single collision shape can be shared among + * multiple collision objects. + * * @author normenhansen */ public abstract class CollisionShape implements Savable { + /** + * unique identifier of the btCollisionShape + *

+ * Constructors are responsible for setting this to a non-zero value. After + * that, the id never changes. + */ protected long objectId = 0; + /** + * copy of scaling factors: one for each local axis (default=1,1,1) + */ protected Vector3f scale = new Vector3f(1, 1, 1); + /** + * copy of collision margin (in physics-space units, >0, default=0) + */ protected float margin = 0.0f; public CollisionShape() { @@ -70,7 +86,9 @@ public CollisionShape() { // private native void calculateLocalInertia(long objectId, long shapeId, float mass); /** - * used internally + * Read the id of the btCollisionShape. + * + * @return the unique identifier (not zero) */ public long getObjectId() { return objectId; @@ -83,21 +101,52 @@ public void setObjectId(long id) { this.objectId = id; } + /** + * Alter the scaling factors of this shape. CAUTION: Not all shapes can be + * scaled. + *

+ * Note that if the shape is shared (between collision objects and/or + * compound shapes) changes can have unintended consequences. + * + * @param scale the desired scaling factor for each local axis (not null, no + * negative component, unaffected, default=1,1,1) + */ public void setScale(Vector3f scale) { this.scale.set(scale); setLocalScaling(objectId, scale); } - + /** + * Access the scaling factors. + * + * @return the pre-existing vector (not null) + */ public Vector3f getScale() { return scale; } + /** + * Read the collision margin for this shape. + * + * @return the margin distance (in physics-space units, ≥0) + */ public float getMargin() { return getMargin(objectId); } private native float getMargin(long objectId); + /** + * Alter the collision margin of this shape. CAUTION: Margin is applied + * differently, depending on the type of shape. Generally the collision + * margin expands the object, creating a gap. Don't set the collision margin + * to zero. + *

+ * Note that if the shape is shared (between collision objects and/or + * compound shapes) changes can have unintended consequences. + * + * @param margin the desired margin distance (in physics-space units, >0, + * default=0) + */ public void setMargin(float margin) { setMargin(objectId, margin); this.margin = margin; @@ -107,18 +156,37 @@ public void setMargin(float margin) { private native void setMargin(long objectId, float margin); + /** + * 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(scale, "scale", new Vector3f(1, 1, 1)); capsule.write(getMargin(), "margin", 0.0f); } + /** + * De-serialize this shape, 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 capsule = im.getCapsule(this); this.scale = (Vector3f) capsule.readSavable("scale", new Vector3f(1, 1, 1)); this.margin = capsule.readFloat("margin", 0.0f); } + /** + * Finalize this shape just before it is destroyed. Should be invoked only + * by a subclass or by the garbage collector. + * + * @throws Throwable ignored by the garbage collector + */ @Override protected void finalize() throws Throwable { super.finalize(); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.java index b2321afdc2..254006676e 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CompoundCollisionShape.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 @@ -46,23 +46,33 @@ import java.util.logging.Logger; /** - * A CompoundCollisionShape allows combining multiple base shapes - * to generate a more sophisticated shape. + * A collision shape formed by combining convex child shapes, based on Bullet's + * btCompoundShape. + * * @author normenhansen */ public class CompoundCollisionShape extends CollisionShape { + /** + * children of this shape + */ protected ArrayList children = new ArrayList(); + /** + * Instantiate an empty compound shape (with no children). + */ public CompoundCollisionShape() { objectId = createShape();//new CompoundShape(); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); } /** - * adds a child shape at the given local translation - * @param shape the child shape to add - * @param location the local location of the child shape + * Add a child shape with the specified local translation. + * + * @param shape the child shape to add (not null, not a compound shape, + * alias created) + * @param location the local coordinates of the child shape's center (not + * null, unaffected) */ public void addChildShape(CollisionShape shape, Vector3f location) { // Transform transA = new Transform(Converter.convert(new Matrix3f())); @@ -73,9 +83,14 @@ public void addChildShape(CollisionShape shape, Vector3f location) { } /** - * adds a child shape at the given local translation - * @param shape the child shape to add - * @param location the local location of the child shape + * Add a child shape with the specified local translation and orientation. + * + * @param shape the child shape to add (not null, not a compound shape, + * alias created) + * @param location the local coordinates of the child shape's center (not + * null, unaffected) + * @param rotation the local orientation of the child shape (not null, + * unaffected) */ public void addChildShape(CollisionShape shape, Vector3f location, Matrix3f rotation) { if(shape instanceof CompoundCollisionShape){ @@ -101,8 +116,9 @@ private void addChildShapeDirect(CollisionShape shape, Vector3f location, Matrix } /** - * removes a child shape - * @param shape the child shape to remove + * Remove a child from this shape. + * + * @param shape the child shape to remove (not null) */ public void removeChildShape(CollisionShape shape) { removeChildShape(objectId, shape.getObjectId()); @@ -115,6 +131,11 @@ public void removeChildShape(CollisionShape shape) { } } + /** + * Access the list of children. + * + * @return the pre-existing list (not null) + */ public List getChildren() { return children; } @@ -125,12 +146,24 @@ public List getChildren() { private native long removeChildShape(long objectId, long childId); + /** + * 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 { super.write(ex); OutputCapsule capsule = ex.getCapsule(this); capsule.writeSavableArrayList(children, "children", new ArrayList()); } + /** + * 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 { super.read(im); InputCapsule capsule = im.getCapsule(this); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/ConeCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/ConeCollisionShape.java index 3dd3176241..c111fbd9e2 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/ConeCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/ConeCollisionShape.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,18 +41,40 @@ import java.util.logging.Logger; /** + * A conical collision shape based on Bullet's btConeShapeX, btConeShape, or + * btConeShapeZ. * * @author normenhansen */ public class ConeCollisionShape extends CollisionShape { + /** + * copy of radius (≥0) + */ protected float radius; + /** + * copy of height (≥0) + */ protected float height; + /** + * copy of main (height) axis (0→X, 1→Y, 2→Z) + */ protected int axis; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public ConeCollisionShape() { } + /** + * Instantiate a cone shape around the specified main (height) axis. + * + * @param radius the desired radius (≥0) + * @param height the desired height (≥0) + * @param axis which local axis: 0→X, 1→Y, 2→Z + */ public ConeCollisionShape(float radius, float height, int axis) { this.radius = radius; this.height = height; @@ -60,6 +82,12 @@ public ConeCollisionShape(float radius, float height, int axis) { createShape(); } + /** + * Instantiate a cone shape oriented along the Y axis. + * + * @param radius the desired radius (≥0) + * @param height the desired height (≥0) + */ public ConeCollisionShape(float radius, float height) { this.radius = radius; this.height = height; @@ -67,14 +95,30 @@ public ConeCollisionShape(float radius, float height) { createShape(); } + /** + * Read the radius of the cone. + * + * @return radius (≥0) + */ public float getRadius() { return radius; } - + + /** + * Read the height of the cone. + * + * @return height (≥0) + */ public float getHeight() { return height; } + /** + * 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 { super.write(ex); OutputCapsule capsule = ex.getCapsule(this); @@ -83,6 +127,12 @@ public void write(JmeExporter ex) throws IOException { capsule.write(axis, "axis", PhysicsSpace.AXIS_Y); } + /** + * 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 { super.read(im); InputCapsule capsule = im.getCapsule(this); @@ -92,6 +142,9 @@ public void read(JmeImporter im) throws IOException { createShape(); } + /** + * Instantiate the configured shape in Bullet. + */ protected void createShape() { objectId = createShape(axis, radius, height); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java index 4fe48f9b71..2178899f7b 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.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,20 +41,35 @@ import java.util.logging.Logger; /** - * Basic cylinder collision shape + * A cylindrical collision shape based on Bullet's btCylinderShapeX, new + * btCylinderShape, or btCylinderShapeZ. + * * @author normenhansen */ public class CylinderCollisionShape extends CollisionShape { + /** + * copy of half-extents of the cylinder on each local axis (not null, no + * negative component) + */ protected Vector3f halfExtents; + /** + * copy of main (height) axis (0→X, 1→Y, 2→Z) + */ protected int axis; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public CylinderCollisionShape() { } /** - * creates a cylinder shape from the given halfextents - * @param halfExtents the halfextents to use + * Instantiate a Z-axis cylinder shape with the specified half extents. + * + * @param halfExtents the desired unscaled half extents (not null, no + * negative component, alias created) */ public CylinderCollisionShape(Vector3f halfExtents) { this.halfExtents = halfExtents; @@ -63,9 +78,11 @@ public CylinderCollisionShape(Vector3f halfExtents) { } /** - * Creates a cylinder shape around the given axis from the given halfextents - * @param halfExtents the halfextents to use - * @param axis (0=X,1=Y,2=Z) + * Instantiate a cylinder shape around the specified axis. + * + * @param halfExtents the desired unscaled half extents (not null, no + * negative component, alias created) + * @param axis which local axis: 0→X, 1→Y, 2→Z */ public CylinderCollisionShape(Vector3f halfExtents, int axis) { this.halfExtents = halfExtents; @@ -73,16 +90,30 @@ public CylinderCollisionShape(Vector3f halfExtents, int axis) { createShape(); } + /** + * Access the half extents of the cylinder. + * + * @return the pre-existing vector (not null, no negative component) + */ public final Vector3f getHalfExtents() { return halfExtents; } + /** + * Determine the main axis of the cylinder. + * + * @return 0→X, 1→Y, 2→Z + */ public int getAxis() { return axis; } /** - * WARNING - CompoundCollisionShape scaling has no effect. + * Alter the scaling factors of this shape. Scaling is disabled + * for cylinder shapes. + * + * @param scale the desired scaling factor for each local axis (not null, no + * negative component, unaffected, default=1,1,1) */ @Override public void setScale(Vector3f scale) { @@ -91,6 +122,12 @@ public void setScale(Vector3f scale) { } } + /** + * 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 { super.write(ex); OutputCapsule capsule = ex.getCapsule(this); @@ -98,6 +135,12 @@ public void write(JmeExporter ex) throws IOException { capsule.write(axis, "axis", 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 { super.read(im); InputCapsule capsule = im.getCapsule(this); @@ -106,6 +149,9 @@ public void read(JmeImporter im) throws IOException { createShape(); } + /** + * Instantiate the configured shape in Bullet. + */ protected void createShape() { objectId = createShape(axis, halfExtents); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/GImpactCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/GImpactCollisionShape.java index 200e6dc3bc..0f9cfc4256 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/GImpactCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/GImpactCollisionShape.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 @@ -47,7 +47,8 @@ import java.util.logging.Logger; /** - * Basic mesh collision shape + * A mesh collision shape based on Bullet's btGImpactMeshShape. + * * @author normenhansen */ public class GImpactCollisionShape extends CollisionShape { @@ -55,14 +56,23 @@ public class GImpactCollisionShape extends CollisionShape { // protected Vector3f worldScale; protected int numVertices, numTriangles, vertexStride, triangleIndexStride; protected ByteBuffer triangleIndexBase, vertexBase; + /** + * Unique identifier of the Bullet mesh. The constructor sets this to a + * non-zero value. + */ protected long meshId = 0; // protected IndexedMesh bulletMesh; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public GImpactCollisionShape() { } /** - * creates a collision shape from the given Mesh + * Instantiate a shape based on the specified JME mesh. + * * @param mesh the Mesh to use */ public GImpactCollisionShape(Mesh mesh) { @@ -105,6 +115,12 @@ private void createCollisionMesh(Mesh mesh) { // public Mesh createJmeMesh() { // return Converter.convert(bulletMesh); // } + /** + * 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 { super.write(ex); OutputCapsule capsule = ex.getCapsule(this); @@ -118,6 +134,12 @@ public void write(JmeExporter ex) throws IOException { capsule.write(vertexBase.array(), "vertexBase", new byte[0]); } + /** + * 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 { super.read(im); InputCapsule capsule = im.getCapsule(this); @@ -132,6 +154,9 @@ public void read(JmeImporter im) throws IOException { createShape(); } + /** + * Instantiate the configured shape in Bullet. + */ protected void createShape() { // bulletMesh = new IndexedMesh(); // bulletMesh.numVertices = numVertices; @@ -157,6 +182,12 @@ protected void createShape() { private native long createShape(long meshId); + /** + * Finalize this shape just before it is destroyed. Should be invoked only + * by a subclass or by the garbage collector. + * + * @throws Throwable ignored by the garbage collector + */ @Override protected void finalize() throws Throwable { super.finalize(); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/HeightfieldCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/HeightfieldCollisionShape.java index e525d3f1c2..f4fcaef6d6 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/HeightfieldCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/HeightfieldCollisionShape.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 @@ -45,36 +45,72 @@ import java.util.logging.Logger; /** - * Uses Bullet Physics Heightfield terrain collision system. This is MUCH faster - * than using a regular mesh. - * There are a couple tricks though: - * -No rotation or translation is supported. - * -The collision bbox must be centered around 0,0,0 with the height above and below the y-axis being - * equal on either side. If not, the whole collision box is shifted vertically and things don't collide - * as they should. - * + * A terrain collision shape based on Bullet's btHeightfieldTerrainShape. + *

+ * This is much more efficient than a regular mesh, but it has a couple + * limitations: + *

    + *
  • No rotation or translation.
  • + *
  • The collision bounding box must be centered on (0,0,0) with the height + * above and below the X-Z plane being equal on either side. If not, the whole + * collision box is shifted vertically and objects won't collide properly.
  • + *
+ * * @author Brent Owens */ public class HeightfieldCollisionShape extends CollisionShape { + /** + * number of rows in the heightfield (>1) + */ protected int heightStickWidth; + /** + * number of columns in the heightfield (>1) + */ protected int heightStickLength; + /** + * array of heightfield samples + */ protected float[] heightfieldData; protected float heightScale; protected float minHeight; protected float maxHeight; + /** + * index of the height axis (0→X, 1→Y, 2→Z) + */ protected int upAxis; protected boolean flipQuadEdges; + /** + * buffer for passing height data to Bullet + *

+ * A Java reference must persist after createShape() completes, or else the + * buffer might get garbage collected. + */ protected ByteBuffer bbuf; // protected FloatBuffer fbuf; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public HeightfieldCollisionShape() { } + /** + * Instantiate a new shape for the specified height map. + * + * @param heightmap (not null, length≥4, length a perfect square) + */ public HeightfieldCollisionShape(float[] heightmap) { createCollisionHeightfield(heightmap, Vector3f.UNIT_XYZ); } + /** + * Instantiate a new shape for the specified height map and scale vector. + * + * @param heightmap (not null, length≥4, length a perfect square) + * @param scale (not null, no negative component, unaffected, default=1,1,1) + */ public HeightfieldCollisionShape(float[] heightmap, Vector3f scale) { createCollisionHeightfield(heightmap, scale); } @@ -120,6 +156,9 @@ protected void createCollisionHeightfield(float[] heightmap, Vector3f worldScale createShape(); } + /** + * Instantiate the configured shape in Bullet. + */ protected void createShape() { bbuf = BufferUtils.createByteBuffer(heightfieldData.length * 4); // fbuf = bbuf.asFloatBuffer();//FloatBuffer.wrap(heightfieldData); @@ -138,11 +177,22 @@ protected void createShape() { private native long createShape(int heightStickWidth, int heightStickLength, ByteBuffer heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, boolean flipQuadEdges); + /** + * Does nothing. + * + * @return null + */ public Mesh createJmeMesh() { //TODO return Converter.convert(bulletMesh); return null; } + /** + * 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 { super.write(ex); OutputCapsule capsule = ex.getCapsule(this); @@ -156,6 +206,12 @@ public void write(JmeExporter ex) throws IOException { capsule.write(flipQuadEdges, "flipQuadEdges", false); } + /** + * 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 { super.read(im); InputCapsule capsule = im.getCapsule(this); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/HullCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/HullCollisionShape.java index db40eedac7..d20e0e51e3 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/HullCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/HullCollisionShape.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 @@ -44,24 +44,52 @@ import java.util.logging.Level; import java.util.logging.Logger; +/** + * A convex hull collision shape based on Bullet's btConvexHullShape. + */ public class HullCollisionShape extends CollisionShape { private float[] points; // protected FloatBuffer fbuf; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public HullCollisionShape() { } + /** + * Instantiate a collision shape based on the specified JME mesh. For best + * performance and stability, use the mesh should have no more than 100 + * vertices. + * + * @param mesh a mesh on which to base the shape (not null, at least one + * vertex) + */ public HullCollisionShape(Mesh mesh) { this.points = getPoints(mesh); createShape(); } + /** + * Instantiate a collision shape based on the specified array of + * coordinates. + * + * @param points an array of coordinates on which to base the shape (not + * null, not empty, length a multiple of 3) + */ public HullCollisionShape(float[] points) { this.points = points; createShape(); } + /** + * Serialize this shape, 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); @@ -70,6 +98,12 @@ public void write(JmeExporter ex) throws IOException { capsule.write(points, "points", null); } + /** + * De-serialize this shape, 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); @@ -89,6 +123,9 @@ public void read(JmeImporter im) throws IOException { createShape(); } + /** + * Instantiate the configured shape in Bullet. + */ protected void createShape() { // ObjectArrayList pointList = new ObjectArrayList(); // for (int i = 0; i < points.length; i += 3) { @@ -114,6 +151,12 @@ protected void createShape() { private native long createShape(ByteBuffer points); + /** + * Copy the vertex positions from a JME mesh. + * + * @param mesh the mesh to read (not null) + * @return a new array (not null, length a multiple of 3) + */ protected float[] getPoints(Mesh mesh) { FloatBuffer vertices = mesh.getFloatBuffer(Type.Position); vertices.rewind(); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/MeshCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/MeshCollisionShape.java index 3c5dbbb495..dead3294ca 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/MeshCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/MeshCollisionShape.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,7 +49,7 @@ import com.jme3.util.BufferUtils; /** - * Basic mesh collision shape + * A mesh collision shape based on Bullet's btBvhTriangleMeshShape. * * @author normenhansen */ @@ -64,38 +64,45 @@ public class MeshCollisionShape extends CollisionShape { private static final String NATIVE_BVH = "nativeBvh"; protected int numVertices, numTriangles, vertexStride, triangleIndexStride; protected ByteBuffer triangleIndexBase, vertexBase; + /** + * Unique identifier of the Bullet mesh. The constructor sets this to a + * non-zero value. + */ protected long meshId = 0; protected long nativeBVHBuffer = 0; private boolean memoryOptimized; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public MeshCollisionShape() { } /** - * Creates a collision shape from the given Mesh. - * Default behavior, more optimized for memory usage. + * Instantiate a collision shape based on the specified JME mesh, optimized + * for memory usage. * - * @param mesh + * @param mesh the mesh on which to base the shape (not null) */ public MeshCollisionShape(Mesh mesh) { this(mesh, true); } /** - * Creates a collision shape from the given Mesh. - * memoryOptimized determines if optimized instead of - * quantized BVH will be used. - * Internally, memoryOptimized BVH is slower to calculate (~4x) - * but also smaller (~0.5x). - * It is preferable to use the memory optimized version and then serialize - * the resulting MeshCollisionshape as this will also save the - * generated BVH. - * An exception can be procedurally / generated collision shapes, where - * the generation time is more of a concern + * Instantiate a collision shape based on the specified JME mesh. + *

+ * memoryOptimized determines if optimized instead of quantized + * BVH will be used. Internally, memoryOptimized BVH is slower + * to calculate (~4x) but also smaller (~0.5x). It is preferable to use the + * memory optimized version and then serialize the resulting + * MeshCollisionshape as this will also save the generated BVH. An exception + * can be procedurally / generated collision shapes, where the generation + * time is more of a concern * - * @param mesh the Mesh to use - * @param memoryOptimized True to generate a memory optimized BVH, - * false to generate quantized BVH. + * @param mesh the mesh on which to base the shape (not null) + * @param memoryOptimized true to generate a memory-optimized BVH, false to + * generate quantized BVH */ public MeshCollisionShape(final Mesh mesh, final boolean memoryOptimized) { this.memoryOptimized = memoryOptimized; @@ -103,16 +110,15 @@ public MeshCollisionShape(final Mesh mesh, final boolean memoryOptimized) { } /** - * Advanced constructor, usually you don’t want to use this, but the Mesh - * based one. Passing false values can lead to a crash, use at own risk - * + * An advanced constructor. Passing false values can lead to a crash. + * Usually you don’t want to use this. Use at own risk. + *

* This constructor bypasses all copy logic normally used, this allows for - * faster bullet shape generation when using procedurally generated Meshes. - * + * faster Bullet shape generation when using procedurally generated Meshes. * * @param indices the raw index buffer * @param vertices the raw vertex buffer - * @param memoryOptimized use quantisize BVH, uses less memory, but slower + * @param memoryOptimized use quantized BVH, uses less memory, but slower */ public MeshCollisionShape(ByteBuffer indices, ByteBuffer vertices, boolean memoryOptimized) { this.triangleIndexBase = indices; @@ -153,6 +159,12 @@ private void createCollisionMesh(Mesh mesh) { this.createShape(null); } + /** + * Serialize this shape, for example when saving to a J3O file. + * + * @param ex exporter (not null) + * @throws IOException from exporter + */ @Override public void write(final JmeExporter ex) throws IOException { super.write(ex); @@ -178,6 +190,12 @@ public void write(final JmeExporter ex) throws IOException { } } + /** + * De-serialize this shape, for example when loading from a J3O file. + * + * @param im importer (not null) + * @throws IOException from importer + */ @Override public void read(final JmeImporter im) throws IOException { super.read(im); @@ -195,6 +213,9 @@ public void read(final JmeImporter im) throws IOException { createShape(nativeBvh); } + /** + * Instantiate the configured shape in Bullet. + */ private void createShape(byte bvh[]) { boolean buildBvh=bvh==null||bvh.length==0; this.meshId = NativeMeshUtil.createTriangleIndexVertexArray(this.triangleIndexBase, this.vertexBase, this.numTriangles, this.numVertices, this.vertexStride, this.triangleIndexStride); @@ -216,6 +237,12 @@ private void createShape(byte bvh[]) { private native long createShape(boolean memoryOptimized, boolean buildBvt, long meshId); + /** + * Finalize this shape just before it is destroyed. Should be invoked only + * by a subclass or by the garbage collector. + * + * @throws Throwable ignored by the garbage collector + */ @Override public void finalize() throws Throwable { super.finalize(); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/PlaneCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/PlaneCollisionShape.java index caf6548998..6b8bb88bbe 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/PlaneCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/PlaneCollisionShape.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 @@ -42,34 +42,60 @@ import java.util.logging.Logger; /** + * A planar collision shape based on Bullet's btStaticPlaneShape. * * @author normenhansen */ public class PlaneCollisionShape extends CollisionShape{ + /** + * description of the plane + */ private Plane plane; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public PlaneCollisionShape() { } /** - * Creates a plane Collision shape - * @param plane the plane that defines the shape + * Instantiate a plane shape defined by the specified plane. + * + * @param plane the desired plane (not null, alias created) */ public PlaneCollisionShape(Plane plane) { this.plane = plane; createShape(); } + /** + * Access the defining plane. + * + * @return the pre-existing instance (not null) + */ public final Plane getPlane() { return plane; } + /** + * 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 { super.write(ex); OutputCapsule capsule = ex.getCapsule(this); capsule.write(plane, "collisionPlane", new Plane()); } + /** + * 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 { super.read(im); InputCapsule capsule = im.getCapsule(this); @@ -77,6 +103,9 @@ public void read(JmeImporter im) throws IOException { createShape(); } + /** + * Instantiate the configured shape in Bullet. + */ protected void createShape() { objectId = createShape(plane.getNormal(), plane.getConstant()); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/SimplexCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/SimplexCollisionShape.java index fff1c70584..6a538a1c04 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/SimplexCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/SimplexCollisionShape.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,16 +41,33 @@ import java.util.logging.Logger; /** - * A simple point, line, triangle or quad collisionShape based on one to four points- + * A simple point, line-segment, triangle, or tetrahedron collision shape based + * on Bullet's btBU_Simplex1to4. + * * @author normenhansen */ public class SimplexCollisionShape extends CollisionShape { + /** + * vertex positions + */ private Vector3f vector1, vector2, vector3, vector4; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public SimplexCollisionShape() { } + /** + * Instantiate a tetrahedral collision shape based on the specified points. + * + * @param point1 the coordinates of 1st point (not null, alias created) + * @param point2 the coordinates of 2nd point (not null, alias created) + * @param point3 the coordinates of 3rd point (not null, alias created) + * @param point4 the coordinates of 4th point (not null, alias created) + */ public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3, Vector3f point4) { vector1 = point1; vector2 = point2; @@ -59,6 +76,13 @@ public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3, createShape(); } + /** + * Instantiate a triangular collision shape based on the specified points. + * + * @param point1 the coordinates of 1st point (not null, alias created) + * @param point2 the coordinates of 2nd point (not null, alias created) + * @param point3 the coordinates of 3rd point (not null, alias created) + */ public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3) { vector1 = point1; vector2 = point2; @@ -66,17 +90,34 @@ public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3) createShape(); } + /** + * Instantiate a line-segment collision shape based on the specified points. + * + * @param point1 the coordinates of 1st point (not null, alias created) + * @param point2 the coordinates of 2nd point (not null, alias created) + */ public SimplexCollisionShape(Vector3f point1, Vector3f point2) { vector1 = point1; vector2 = point2; createShape(); } + /** + * Instantiate a point collision shape based on the specified points. + * + * @param point1 the coordinates of point (not null, alias created) + */ public SimplexCollisionShape(Vector3f point1) { vector1 = point1; createShape(); } + /** + * 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 { super.write(ex); OutputCapsule capsule = ex.getCapsule(this); @@ -86,6 +127,12 @@ public void write(JmeExporter ex) throws IOException { capsule.write(vector4, "simplexPoint4", null); } + /** + * 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 { super.read(im); InputCapsule capsule = im.getCapsule(this); @@ -96,6 +143,9 @@ public void read(JmeImporter im) throws IOException { createShape(); } + /** + * Instantiate the configured shape in Bullet. + */ protected void createShape() { if (vector4 != null) { objectId = createShape(vector1, vector2, vector3, vector4); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/SphereCollisionShape.java b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/SphereCollisionShape.java index 4ba6152c9f..dd4228e37d 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/SphereCollisionShape.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/collision/shapes/SphereCollisionShape.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,35 +41,62 @@ import java.util.logging.Logger; /** - * Basic sphere collision shape + * A spherical collision shape based on Bullet's btSphereShape. These shapes + * have no margin and cannot be scaled. + * * @author normenhansen */ public class SphereCollisionShape extends CollisionShape { + /** + * copy of radius (≥0) + */ protected float radius; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public SphereCollisionShape() { } /** - * creates a SphereCollisionShape with the given radius - * @param radius + * Instantiate a sphere shape with the specified radius. + * + * @param radius the desired radius (≥0) */ public SphereCollisionShape(float radius) { this.radius = radius; createShape(); } + /** + * Read the radius of the sphere. + * + * @return the radius (≥0) + */ public float getRadius() { return radius; } + /** + * 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 { super.write(ex); OutputCapsule capsule = ex.getCapsule(this); capsule.write(radius, "radius", 0.5f); } + /** + * 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 { super.read(im); InputCapsule capsule = im.getCapsule(this); @@ -78,7 +105,11 @@ public void read(JmeImporter im) throws IOException { } /** - * WARNING - CompoundCollisionShape scaling has no effect. + * Alter the scaling factors of this shape. Scaling is disabled + * for sphere shapes. + * + * @param scale the desired scaling factor for each local axis (not null, no + * negative component, unaffected, default=1,1,1) */ @Override public void setScale(Vector3f scale) { @@ -87,6 +118,9 @@ public void setScale(Vector3f scale) { } } + /** + * Instantiate the configured shape in Bullet. + */ protected void createShape() { objectId = createShape(radius); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Shape {0}", Long.toHexString(objectId)); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/joints/ConeJoint.java b/jme3-bullet/src/main/java/com/jme3/bullet/joints/ConeJoint.java index faf7396323..d3ec3534ac 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/joints/ConeJoint.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/joints/ConeJoint.java @@ -43,10 +43,13 @@ import java.util.logging.Logger; /** - * From bullet manual:
- * To create ragdolls, the cone twist constraint is very useful for limbs like the upper arm. - * It is a special point to point constraint that adds cone and twist axis limits. - * The x-axis serves as twist axis. + * A joint based on Bullet's btConeTwistConstraint. + *

+ * From the Bullet manual:
+ * To create ragdolls, the cone twist constraint is very useful for limbs like + * the upper arm. It is a special point to point constraint that adds cone and + * twist axis limits. The x-axis serves as twist axis. + * * @author normenhansen */ public class ConeJoint extends PhysicsJoint { @@ -57,12 +60,25 @@ public class ConeJoint extends PhysicsJoint { protected float twistSpan = 1e30f; protected boolean angularOnly = false; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public ConeJoint() { } /** - * @param pivotA local translation of the joint connection point in node A - * @param pivotB local translation of the joint connection point in node B + * Instantiate a ConeJoint. To be effective, the joint must be added to a + * physics space. + * + * @param nodeA the 1st body connected by the joint (not null, alias + * created) + * @param nodeB the 2nd body connected by the joint (not null, alias + * created) + * @param pivotA the local offset of the connection point in node A (not + * null, alias created) + * @param pivotB the local offset of the connection point in node B (not + * null, alias created) */ public ConeJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB) { super(nodeA, nodeB, pivotA, pivotB); @@ -72,8 +88,21 @@ public ConeJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA } /** + * Instantiate a ConeJoint. To be effective, the joint must be added to a + * physics space. + * + * @param nodeA the 1st body connected by the joint (not null, alias + * created) + * @param nodeB the 2nd body connected by the joint (not null, alias + * created) * @param pivotA local translation of the joint connection point in node A + * (not null, alias created) * @param pivotB local translation of the joint connection point in node B + * (not null, alias created) + * @param rotA the local orientation of the connection to node A (not null, + * alias created) + * @param rotB the local orientation of the connection to node B (not null, + * alias created) */ public ConeJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, Matrix3f rotA, Matrix3f rotB) { super(nodeA, nodeB, pivotA, pivotB); @@ -82,6 +111,13 @@ public ConeJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA createJoint(); } + /** + * Alter the angular limits for this joint. + * + * @param swingSpan1 angle (in radians) + * @param swingSpan2 angle (in radians) + * @param twistSpan angle (in radians) + */ public void setLimit(float swingSpan1, float swingSpan2, float twistSpan) { this.swingSpan1 = swingSpan1; this.swingSpan2 = swingSpan2; @@ -91,6 +127,11 @@ public void setLimit(float swingSpan1, float swingSpan2, float twistSpan) { private native void setLimit(long objectId, float swingSpan1, float swingSpan2, float twistSpan); + /** + * Alter whether this joint is angular only. + * + * @param value the desired setting (default=false) + */ public void setAngularOnly(boolean value) { angularOnly = value; setAngularOnly(objectId, value); @@ -98,6 +139,12 @@ public void setAngularOnly(boolean value) { private native void setAngularOnly(long objectId, boolean value); + /** + * Serialize this joint, 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); @@ -111,6 +158,12 @@ public void write(JmeExporter ex) throws IOException { capsule.write(twistSpan, "twistSpan", 1e30f); } + /** + * De-serialize this joint, 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); @@ -125,6 +178,9 @@ public void read(JmeImporter im) throws IOException { createJoint(); } + /** + * Create the configured joint in Bullet. + */ protected void createJoint() { objectId = createJoint(nodeA.getObjectId(), nodeB.getObjectId(), pivotA, rotA, pivotB, rotB); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Joint {0}", Long.toHexString(objectId)); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/joints/HingeJoint.java b/jme3-bullet/src/main/java/com/jme3/bullet/joints/HingeJoint.java index 352517df7c..609516287e 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/joints/HingeJoint.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/joints/HingeJoint.java @@ -42,29 +42,63 @@ import java.util.logging.Logger; /** - * From bullet manual:
- * Hinge constraint, or revolute joint restricts two additional angular degrees of freedom, - * so the body can only rotate around one axis, the hinge axis. - * This can be useful to represent doors or wheels rotating around one axis. - * The user can specify limits and motor for the hinge. + * A joint based on Bullet's btHingeConstraint. + *

+ * From the Bullet manual:
+ * Hinge constraint, or revolute joint restricts two additional angular degrees + * of freedom, so the body can only rotate around one axis, the hinge axis. This + * can be useful to represent doors or wheels rotating around one axis. The user + * can specify limits and motor for the hinge. + * * @author normenhansen */ public class HingeJoint extends PhysicsJoint { protected Vector3f axisA; protected Vector3f axisB; + /** + * copy of the angular-only flag (default=false) + */ protected boolean angularOnly = false; + /** + * copy of the limit's bias factor, how strictly position errors (drift) is + * corrected (default=0.3) + */ protected float biasFactor = 0.3f; + /** + * copy of the limit's relaxation factor, the rate at which velocity errors + * are corrected (default=1) + */ protected float relaxationFactor = 1.0f; + /** + * copy of the limit's softness, the range fraction at which velocity-error + * correction starts operating (default=0.9) + */ protected float limitSoftness = 0.9f; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public HingeJoint() { } /** - * Creates a new HingeJoint - * @param pivotA local translation of the joint connection point in node A - * @param pivotB local translation of the joint connection point in node B + * Instantiate a HingeJoint. To be effective, the joint must be added to a + * physics space. + * + * @param nodeA the 1st body connected by the joint (not null, alias + * created) + * @param nodeB the 2nd body connected by the joint (not null, alias + * created) + * @param pivotA the local offset of the connection point in node A (not + * null, alias created) + * @param pivotB the local offset of the connection point in node B (not + * null, alias created) + * @param axisA the local axis of the connection to node A (not null, alias + * created) + * @param axisB the local axis of the connection to node B (not null, alias + * created) */ public HingeJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, Vector3f axisA, Vector3f axisB) { super(nodeA, nodeB, pivotA, pivotB); @@ -74,10 +108,11 @@ public HingeJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivot } /** - * Enables the motor. - * @param enable if true, motor is enabled. - * @param targetVelocity the target velocity of the rotation. - * @param maxMotorImpulse the max force applied to the hinge to rotate it. + * Enable or disable this joint's motor. + * + * @param enable true to enable, false to disable + * @param targetVelocity the desired target velocity + * @param maxMotorImpulse the desired maximum rotational force */ public void enableMotor(boolean enable, float targetVelocity, float maxMotorImpulse) { enableMotor(objectId, enable, targetVelocity, maxMotorImpulse); @@ -85,18 +120,33 @@ public void enableMotor(boolean enable, float targetVelocity, float maxMotorImpu private native void enableMotor(long objectId, boolean enable, float targetVelocity, float maxMotorImpulse); + /** + * Test whether this joint's motor is enabled. + * + * @return true if enabled, otherwise false + */ public boolean getEnableMotor() { return getEnableAngularMotor(objectId); } private native boolean getEnableAngularMotor(long objectId); + /** + * Read the motor's target velocity. + * + * @return velocity + */ public float getMotorTargetVelocity() { return getMotorTargetVelocity(objectId); } private native float getMotorTargetVelocity(long objectId); + /** + * Read the motor's maximum impulse. + * + * @return impulse + */ public float getMaxMotorImpulse() { return getMaxMotorImpulse(objectId); } @@ -104,9 +154,10 @@ public float getMaxMotorImpulse() { private native float getMaxMotorImpulse(long objectId); /** - * Sets the limits of this joint. - * @param low the low limit in radians. - * @param high the high limit in radians. + * Alter this joint's limits. + * + * @param low the desired lower limit of the hinge angle (in radians) + * @param high the desired upper limit of the joint angle (in radians) */ public void setLimit(float low, float high) { setLimit(objectId, low, high); @@ -115,13 +166,20 @@ public void setLimit(float low, float high) { private native void setLimit(long objectId, float low, float high); /** - * Sets the limits of this joint. - * If you're above the softness, velocities that would shoot through the actual limit are slowed down. The bias be in the range of 0.2 - 0.5. - * @param low the low limit in radians. - * @param high the high limit in radians. - * @param _softness the factor at which the velocity error correction starts operating,i.e a softness of 0.9 means that the vel. corr starts at 90% of the limit range. - * @param _biasFactor the magnitude of the position correction. It tells you how strictly the position error (drift ) is corrected. - * @param _relaxationFactor the rate at which velocity errors are corrected. This can be seen as the strength of the limits. A low value will make the limits more spongy. + * Alter this joint's limits. If you're above the softness, velocities that + * would shoot through the actual limit are slowed down. The bias should be + * in the range of 0.2 - 0.5. + * + * @param low the desired lower limit of the hinge angle (in radians) + * @param high the desired upper limit of the joint angle (in radians) + * @param _softness the desired range fraction at which velocity-error + * correction starts operating. A softness of 0.9 means that the correction + * starts at 90% of the limit range. (default=0.9) + * @param _biasFactor the desired magnitude of the position correction, how + * strictly position errors (drift) is corrected. (default=0.3) + * @param _relaxationFactor the desired rate at which velocity errors are + * corrected. This can be seen as the strength of the limits. A low value + * will make the limits more spongy. (default=1) */ public void setLimit(float low, float high, float _softness, float _biasFactor, float _relaxationFactor) { biasFactor = _biasFactor; @@ -132,18 +190,34 @@ public void setLimit(float low, float high, float _softness, float _biasFactor, private native void setLimit(long objectId, float low, float high, float _softness, float _biasFactor, float _relaxationFactor); + /** + * Read the upper limit of the hinge angle. + * + * @return angle (in radians) + */ public float getUpperLimit() { return getUpperLimit(objectId); } private native float getUpperLimit(long objectId); + /** + * Read the lower limit of the hinge angle. + * + * @return the angle (in radians) + */ public float getLowerLimit() { return getLowerLimit(objectId); } private native float getLowerLimit(long objectId); + /** + * Alter the hinge translation flag. + * + * @param angularOnly true→rotate only, false→rotate and translate + * (default=false) + */ public void setAngularOnly(boolean angularOnly) { this.angularOnly = angularOnly; setAngularOnly(objectId, angularOnly); @@ -151,12 +225,23 @@ public void setAngularOnly(boolean angularOnly) { private native void setAngularOnly(long objectId, boolean angularOnly); + /** + * Read the hinge angle. + * + * @return the angle (in radians) + */ public float getHingeAngle() { return getHingeAngle(objectId); } private native float getHingeAngle(long objectId); + /** + * Serialize this joint, for example when saving to a J3O file. + * + * @param ex exporter (not null) + * @throws IOException from exporter + */ public void write(JmeExporter ex) throws IOException { super.write(ex); OutputCapsule capsule = ex.getCapsule(this); @@ -177,6 +262,12 @@ public void write(JmeExporter ex) throws IOException { capsule.write(getMaxMotorImpulse(), "maxMotorImpulse", 0.0f); } + /** + * De-serialize this joint, for example when loading from a J3O file. + * + * @param im importer (not null) + * @throws IOException from importer + */ public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule capsule = im.getCapsule(this); @@ -200,9 +291,13 @@ public void read(JmeImporter im) throws IOException { setLimit(lowerLimit, upperLimit, limitSoftness, biasFactor, relaxationFactor); } + /** + * Create the configured joint in Bullet. + */ protected void createJoint() { objectId = createJoint(nodeA.getObjectId(), nodeB.getObjectId(), pivotA, axisA, pivotB, axisB); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Joint {0}", Long.toHexString(objectId)); + setAngularOnly(objectId, angularOnly); } private native long createJoint(long objectIdA, long objectIdB, Vector3f pivotA, Vector3f axisA, Vector3f pivotB, Vector3f axisB); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/joints/PhysicsJoint.java b/jme3-bullet/src/main/java/com/jme3/bullet/joints/PhysicsJoint.java index 256036ff74..f3087dfaed 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/joints/PhysicsJoint.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/joints/PhysicsJoint.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,59 @@ import java.util.logging.Logger; /** - *

PhysicsJoint - Basic Phyiscs Joint

+ * The abstract base class for physics joints based on Bullet's + * btTypedConstraint, used to connect 2 dynamic rigid bodies in the same + * physics space. + *

+ * Joints include ConeJoint, HingeJoint, Point2PointJoint, and SixDofJoint. + * * @author normenhansen */ public abstract class PhysicsJoint implements Savable { + /** + * Unique identifier of the Bullet constraint. Constructors are responsible + * for setting this to a non-zero value. After that, the id never changes. + */ protected long objectId = 0; + /** + * one of the connected rigid bodies + */ protected PhysicsRigidBody nodeA; + /** + * the other connected rigid body + */ protected PhysicsRigidBody nodeB; + /** + * local offset of this joint's connection point in node A + */ protected Vector3f pivotA; + /** + * local offset of this joint's connection point in node B + */ protected Vector3f pivotB; protected boolean collisionBetweenLinkedBodys = true; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public PhysicsJoint() { } /** - * @param pivotA local translation of the joint connection point in node A - * @param pivotB local translation of the joint connection point in node B + * Instantiate a PhysicsJoint. To be effective, the joint must be added to + * the physics space of the two bodies. Also, the bodies must be dynamic and + * distinct. + * + * @param nodeA the 1st body connected by the joint (not null, alias + * created) + * @param nodeB the 2nd body connected by the joint (not null, alias + * created) + * @param pivotA local offset of the joint connection point in node A (not + * null, alias created) + * @param pivotB local offset of the joint connection point in node B (not + * null, alias created) */ public PhysicsJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB) { this.nodeA = nodeA; @@ -67,6 +102,11 @@ public PhysicsJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f piv nodeB.addJoint(this); } + /** + * Read the magnitude of the applied impulse. + * + * @return impulse + */ public float getAppliedImpulse() { return getAppliedImpulse(objectId); } @@ -74,52 +114,84 @@ public float getAppliedImpulse() { private native float getAppliedImpulse(long objectId); /** - * @return the constraint + * Read the id of the Bullet constraint. + * + * @return the unique identifier (not zero) */ public long getObjectId() { return objectId; } /** - * @return the collisionBetweenLinkedBodys + * Test whether collisions are allowed between the linked bodies. + * + * @return true if collision are allowed, otherwise false */ public boolean isCollisionBetweenLinkedBodys() { return collisionBetweenLinkedBodys; } /** - * toggles collisions between linked bodys
- * joint has to be removed from and added to PhyiscsSpace to apply this. - * @param collisionBetweenLinkedBodys set to false to have no collisions between linked bodys + * Enable or disable collisions between the linked bodies. The joint must be + * removed from and added to PhysicsSpace for this change to be effective. + * + * @param collisionBetweenLinkedBodys true → allow collisions, false → prevent them */ public void setCollisionBetweenLinkedBodys(boolean collisionBetweenLinkedBodys) { this.collisionBetweenLinkedBodys = collisionBetweenLinkedBodys; } + /** + * Access the 1st body specified in during construction. + * + * @return the pre-existing body + */ public PhysicsRigidBody getBodyA() { return nodeA; } + /** + * Access the 2nd body specified in during construction. + * + * @return the pre-existing body + */ public PhysicsRigidBody getBodyB() { return nodeB; } + /** + * Access the local offset of the joint connection point in node A. + * + * @return the pre-existing vector (not null) + */ public Vector3f getPivotA() { return pivotA; } + /** + * Access the local offset of the joint connection point in node A. + * + * @return the pre-existing vector (not null) + */ public Vector3f getPivotB() { return pivotB; } /** - * destroys this joint and removes it from its connected PhysicsRigidBodys joint lists + * Destroy this joint and remove it from the joint lists of its connected + * bodies. */ public void destroy() { getBodyA().removeJoint(this); getBodyB().removeJoint(this); } + /** + * Serialize this joint, 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(nodeA, "nodeA", null); @@ -128,6 +200,12 @@ public void write(JmeExporter ex) throws IOException { capsule.write(pivotB, "pivotB", null); } + /** + * De-serialize this joint, 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); this.nodeA = ((PhysicsRigidBody) capsule.readSavable("nodeA", new PhysicsRigidBody())); @@ -136,6 +214,12 @@ public void read(JmeImporter im) throws IOException { this.pivotB = (Vector3f) capsule.readSavable("pivotB", new Vector3f()); } + /** + * Finalize this physics joint just before it is destroyed. Should be + * invoked only by a subclass or by the garbage collector. + * + * @throws Throwable ignored by the garbage collector + */ @Override protected void finalize() throws Throwable { super.finalize(); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/joints/Point2PointJoint.java b/jme3-bullet/src/main/java/com/jme3/bullet/joints/Point2PointJoint.java index 312293e997..932f41f7b3 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/joints/Point2PointJoint.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/joints/Point2PointJoint.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 @@ -42,62 +42,116 @@ import java.util.logging.Logger; /** - * From bullet manual:
- * Point to point constraint, also known as ball socket joint limits the translation - * so that the local pivot points of 2 rigidbodies match in worldspace. - * A chain of rigidbodies can be connected using this constraint. + * A joint based on Bullet's btPoint2PointConstraint. + *

+ * From the Bullet manual:
+ * Point to point constraint limits the translation so that the local pivot + * points of 2 rigidbodies match in worldspace. A chain of rigidbodies can be + * connected using this constraint. + * * @author normenhansen */ public class Point2PointJoint extends PhysicsJoint { + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public Point2PointJoint() { } /** - * @param pivotA local translation of the joint connection point in node A - * @param pivotB local translation of the joint connection point in node B + * Instantiate a Point2PointJoint. To be effective, the joint must be added + * to a physics space. + * + * @param nodeA the 1st body connected by the joint (not null, alias + * created) + * @param nodeB the 2nd body connected by the joint (not null, alias + * created) + * @param pivotA the local offset of the connection point in node A (not + * null, alias created) + * @param pivotB the local offset of the connection point in node B (not + * null, alias created) */ public Point2PointJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB) { super(nodeA, nodeB, pivotA, pivotB); createJoint(); } + /** + * Alter the joint's damping. + * + * @param value the desired viscous damping ratio (0→no damping, + * 1→critically damped, default=1) + */ public void setDamping(float value) { setDamping(objectId, value); } private native void setDamping(long objectId, float value); + /** + * Alter the joint's impulse clamp. + * + * @param value the desired impulse clamp value (default=0) + */ public void setImpulseClamp(float value) { setImpulseClamp(objectId, value); } private native void setImpulseClamp(long objectId, float value); + /** + * Alter the joint's tau value. + * + * @param value the desired tau value (default=0.3) + */ public void setTau(float value) { setTau(objectId, value); } private native void setTau(long objectId, float value); + /** + * Read the joint's damping ratio. + * + * @return the viscous damping ratio (0→no damping, 1→critically + * damped) + */ public float getDamping() { return getDamping(objectId); } private native float getDamping(long objectId); + /** + * Read the joint's impulse clamp. + * + * @return the clamp value + */ public float getImpulseClamp() { return getImpulseClamp(objectId); } private native float getImpulseClamp(long objectId); + /** + * Read the joint's tau value. + * + * @return the tau value + */ public float getTau() { return getTau(objectId); } private native float getTau(long objectId); + /** + * Serialize this joint, 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); @@ -107,6 +161,12 @@ public void write(JmeExporter ex) throws IOException { cap.write(getImpulseClamp(), "impulseClamp", 0f); } + /** + * De-serialize this joint, 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); @@ -117,6 +177,9 @@ public void read(JmeImporter im) throws IOException { setDamping(cap.readFloat("impulseClamp", 0f)); } + /** + * Create the configured joint in Bullet. + */ protected void createJoint() { objectId = createJoint(nodeA.getObjectId(), nodeB.getObjectId(), pivotA, pivotB); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Joint {0}", Long.toHexString(objectId)); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/joints/SixDofJoint.java b/jme3-bullet/src/main/java/com/jme3/bullet/joints/SixDofJoint.java index 648398149d..660319a18e 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/joints/SixDofJoint.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/joints/SixDofJoint.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 @@ -47,33 +47,79 @@ import java.util.logging.Logger; /** - * From bullet manual:
- * This generic constraint can emulate a variety of standard constraints, - * by configuring each of the 6 degrees of freedom (dof). - * The first 3 dof axis are linear axis, which represent translation of rigidbodies, - * and the latter 3 dof axis represent the angular motion. Each axis can be either locked, - * free or limited. On construction of a new btGeneric6DofConstraint, all axis are locked. - * Afterwards the axis can be reconfigured. Note that several combinations that - * include free and/or limited angular degrees of freedom are undefined. + * A joint based on Bullet's btGeneric6DofConstraint. + *

+ * From the Bullet manual:
+ * This generic constraint can emulate a variety of standard constraints, by + * configuring each of the 6 degrees of freedom (dof). The first 3 dof axis are + * linear axis, which represent translation of rigidbodies, and the latter 3 dof + * axis represent the angular motion. Each axis can be either locked, free or + * limited. On construction of a new btGeneric6DofSpring2Constraint, all axis + * are locked. Afterwards the axis can be reconfigured. Note that several + * combinations that include free and/or limited angular degrees of freedom are + * undefined. + *

+ * For each axis:

    + *
  • Lowerlimit = Upperlimit → axis is locked
  • + *
  • Lowerlimit > Upperlimit → axis is free
  • + *
  • Lowerlimit < Upperlimit → axis it limited in that range
  • + *
+ * * @author normenhansen */ public class SixDofJoint extends PhysicsJoint { Matrix3f rotA, rotB; + /** + * true→limits give the allowable range of movement of frameB in frameA + * space, false→limits give the allowable range of movement of frameA + * in frameB space + */ boolean useLinearReferenceFrameA; LinkedList rotationalMotors = new LinkedList(); TranslationalLimitMotor translationalMotor; + /** + * upper limits for rotation of all 3 axes + */ Vector3f angularUpperLimit = new Vector3f(Vector3f.POSITIVE_INFINITY); + /** + * lower limits for rotation of all 3 axes + */ Vector3f angularLowerLimit = new Vector3f(Vector3f.NEGATIVE_INFINITY); + /** + * upper limit for translation of all 3 axes + */ Vector3f linearUpperLimit = new Vector3f(Vector3f.POSITIVE_INFINITY); + /** + * lower limits for translation of all 3 axes + */ Vector3f linearLowerLimit = new Vector3f(Vector3f.NEGATIVE_INFINITY); + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public SixDofJoint() { } /** - * @param pivotA local translation of the joint connection point in node A - * @param pivotB local translation of the joint connection point in node B + * Instantiate a SixDofJoint. To be effective, the joint must be added to a + * physics space. + * + * @param nodeA the 1st body connected by the joint (not null, alias + * created) + * @param nodeB the 2nd body connected by the joint (not null, alias + * created) + * @param pivotA the local offset of the connection point in node A (not + * null, alias created) + * @param pivotB the local offset of the connection point in node B (not + * null, alias created) + * @param rotA the local orientation of the connection to node A (not null, + * alias created) + * @param rotB the local orientation of the connection to node B (not null, + * alias created) + * @param useLinearReferenceFrameA true→use node A, false→use node + * B */ public SixDofJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, Matrix3f rotA, Matrix3f rotB, boolean useLinearReferenceFrameA) { super(nodeA, nodeB, pivotA, pivotB); @@ -87,8 +133,19 @@ public SixDofJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivo } /** - * @param pivotA local translation of the joint connection point in node A - * @param pivotB local translation of the joint connection point in node B + * Instantiate a SixDofJoint. To be effective, the joint must be added to a + * physics space. + * + * @param nodeA the 1st body connected by the joint (not null, alias + * created) + * @param nodeB the 2nd body connected by the joint (not null, alias + * created) + * @param pivotA the local offset of the connection point in node A (not + * null, alias created) + * @param pivotB the local offset of the connection point in node B (not + * null, alias created) + * @param useLinearReferenceFrameA true→use node A, false→use node + * B */ public SixDofJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, boolean useLinearReferenceFrameA) { super(nodeA, nodeB, pivotA, pivotB); @@ -114,24 +171,32 @@ private void gatherMotors() { private native long getTranslationalLimitMotor(long objectId); /** - * returns the TranslationalLimitMotor of this 6DofJoint which allows - * manipulating the translational axis - * @return the TranslationalLimitMotor + * Access the TranslationalLimitMotor of this joint, the motor which + * influences translation on all 3 axes. + * + * @return the pre-existing instance */ public TranslationalLimitMotor getTranslationalLimitMotor() { return translationalMotor; } /** - * returns one of the three RotationalLimitMotors of this 6DofJoint which - * allow manipulating the rotational axes - * @param index the index of the RotationalLimitMotor - * @return the RotationalLimitMotor at the given index + * Access the indexed RotationalLimitMotor of this joint, the motor which + * influences rotation around one axis. + * + * @param index the axis index of the desired motor: 0→X, 1→Y, + * 2→Z + * @return the pre-existing instance */ public RotationalLimitMotor getRotationalLimitMotor(int index) { return rotationalMotors.get(index); } + /** + * Alter the joint's upper limits for translation of all 3 axes. + * + * @param vector the desired upper limits (not null, unaffected) + */ public void setLinearUpperLimit(Vector3f vector) { linearUpperLimit.set(vector); setLinearUpperLimit(objectId, vector); @@ -139,6 +204,11 @@ public void setLinearUpperLimit(Vector3f vector) { private native void setLinearUpperLimit(long objctId, Vector3f vector); + /** + * Alter the joint's lower limits for translation of all 3 axes. + * + * @param vector the desired lower limits (not null, unaffected) + */ public void setLinearLowerLimit(Vector3f vector) { linearLowerLimit.set(vector); setLinearLowerLimit(objectId, vector); @@ -146,6 +216,11 @@ public void setLinearLowerLimit(Vector3f vector) { private native void setLinearLowerLimit(long objctId, Vector3f vector); + /** + * Alter the joint's upper limits for rotation of all 3 axes. + * + * @param vector the desired upper limits (in radians, not null, unaffected) + */ public void setAngularUpperLimit(Vector3f vector) { angularUpperLimit.set(vector); setAngularUpperLimit(objectId, vector); @@ -153,6 +228,11 @@ public void setAngularUpperLimit(Vector3f vector) { private native void setAngularUpperLimit(long objctId, Vector3f vector); + /** + * Alter the joint's lower limits for rotation of all 3 axes. + * + * @param vector the desired lower limits (in radians, not null, unaffected) + */ public void setAngularLowerLimit(Vector3f vector) { angularLowerLimit.set(vector); setAngularLowerLimit(objectId, vector); @@ -162,6 +242,12 @@ public void setAngularLowerLimit(Vector3f vector) { native long createJoint(long objectIdA, long objectIdB, Vector3f pivotA, Matrix3f rotA, Vector3f pivotB, Matrix3f rotB, boolean useLinearReferenceFrameA); + /** + * De-serialize this joint, 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); @@ -197,6 +283,12 @@ public void read(JmeImporter im) throws IOException { getTranslationalLimitMotor().setUpperLimit((Vector3f) capsule.readSavable("transMotor_UpperLimit", Vector3f.ZERO)); } + /** + * Serialize this joint, 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); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/joints/SixDofSpringJoint.java b/jme3-bullet/src/main/java/com/jme3/bullet/joints/SixDofSpringJoint.java index e52f9836c7..a9479d1e7f 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/joints/SixDofSpringJoint.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/joints/SixDofSpringJoint.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 @@ -36,14 +36,24 @@ import com.jme3.math.Vector3f; /** - * From bullet manual:
- * This generic constraint can emulate a variety of standard constraints, - * by configuring each of the 6 degrees of freedom (dof). - * The first 3 dof axis are linear axis, which represent translation of rigidbodies, - * and the latter 3 dof axis represent the angular motion. Each axis can be either locked, - * free or limited. On construction of a new btGeneric6DofConstraint, all axis are locked. - * Afterwards the axis can be reconfigured. Note that several combinations that - * include free and/or limited angular degrees of freedom are undefined. + * A 6 degree-of-freedom joint based on Bullet's btGeneric6DofSpringConstraint. + *

+ * From the Bullet manual:
+ * This generic constraint can emulate a variety of standard constraints, by + * configuring each of the 6 degrees of freedom (dof). The first 3 dof axis are + * linear axis, which represent translation of rigidbodies, and the latter 3 dof + * axis represent the angular motion. Each axis can be either locked, free or + * limited. On construction of a new btGeneric6DofSpring2Constraint, all axis + * are locked. Afterwards the axis can be reconfigured. Note that several + * combinations that include free and/or limited angular degrees of freedom are + * undefined. + *

+ * For each axis:

    + *
  • Lowerlimit = Upperlimit → axis is locked
  • + *
  • Lowerlimit > Upperlimit → axis is free
  • + *
  • Lowerlimit < Upperlimit → axis it limited in that range
  • + *
+ * * @author normenhansen */ public class SixDofSpringJoint extends SixDofJoint { @@ -53,35 +63,84 @@ public class SixDofSpringJoint extends SixDofJoint { final float springStiffness[] = new float[6]; final float springDamping[] = new float[6]; // between 0 and 1 (1 == no damping) + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public SixDofSpringJoint() { } /** - * @param pivotA local translation of the joint connection point in node A - * @param pivotB local translation of the joint connection point in node B + * Instantiate a SixDofSpringJoint. To be effective, the joint must be added + * to a physics space. + * + * @param nodeA the 1st body connected by the joint (not null, alias + * created) + * @param nodeB the 2nd body connected by the joint (not null, alias + * created) + * @param pivotA the local offset of the connection point in node A (not + * null, alias created) + * @param pivotB the local offset of the connection point in node B (not + * null, alias created) + * @param rotA the local orientation of the connection to node A (not + * null, alias created) + * @param rotB the local orientation of the connection to node B (not + * null, alias created) + * @param useLinearReferenceFrameA true→use node A, false→use node + * B */ public SixDofSpringJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, Matrix3f rotA, Matrix3f rotB, boolean useLinearReferenceFrameA) { super(nodeA, nodeB, pivotA, pivotB, rotA, rotB, useLinearReferenceFrameA); } + + /** + * Enable or disable the spring for the indexed degree of freedom. + * + * @param index which degree of freedom (≥0, <6) + * @param onOff true → enable, false → disable + */ public void enableSpring(int index, boolean onOff) { enableSpring(objectId, index, onOff); } native void enableSpring(long objctId, int index, boolean onOff); + /** + * Alter the spring stiffness for the indexed degree of freedom. + * + * @param index which degree of freedom (≥0, <6) + * @param stiffness the desired stiffness + */ public void setStiffness(int index, float stiffness) { setStiffness(objectId, index, stiffness); } native void setStiffness(long objctId, int index, float stiffness); + /** + * Alter the damping for the indexed degree of freedom. + * + * @param index which degree of freedom (≥0, <6) + * @param damping the desired viscous damping ratio (0→no damping, + * 1→critically damped, default=1) + */ public void setDamping(int index, float damping) { setDamping(objectId, index, damping); } native void setDamping(long objctId, int index, float damping); + /** + * Alter the equilibrium points for all degrees of freedom, based on the + * current constraint position/orientation. + */ public void setEquilibriumPoint() { // set the current constraint position/orientation as an equilibrium point for all DOF setEquilibriumPoint(objectId); } native void setEquilibriumPoint(long objctId); + /** + * Alter the equilibrium point of the indexed degree of freedom, based on + * the current constraint position/orientation. + * + * @param index which degree of freedom (≥0, <6) + */ public void setEquilibriumPoint(int index){ // set the current constraint position/orientation as an equilibrium point for given DOF setEquilibriumPoint(objectId, index); } diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/joints/SliderJoint.java b/jme3-bullet/src/main/java/com/jme3/bullet/joints/SliderJoint.java index b51c5d849b..8299fbd659 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/joints/SliderJoint.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/joints/SliderJoint.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,8 +43,12 @@ import java.util.logging.Logger; /** - * From bullet manual:
- * The slider constraint allows the body to rotate around one axis and translate along this axis. + * A slider joint based on Bullet's btSliderConstraint. + *

+ * From the Bullet manual:
+ * The slider constraint allows the body to rotate around one axis and translate + * along this axis. + * * @author normenhansen */ public class SliderJoint extends PhysicsJoint { @@ -52,12 +56,29 @@ public class SliderJoint extends PhysicsJoint { protected Matrix3f rotA, rotB; protected boolean useLinearReferenceFrameA; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public SliderJoint() { } /** - * @param pivotA local translation of the joint connection point in node A - * @param pivotB local translation of the joint connection point in node B + * Instantiate a SliderJoint. To be effective, the joint must be added to a + * physics space. + * + * @param nodeA the 1st body connected by the joint (not null, alias + * created) + * @param nodeB the 2nd body connected by the joint (not null, alias + * created) + * @param pivotA the local offset of the connection point in node A (not + * null, alias created) + * @param pivotB the local offset of the connection point in node B (not + * null, alias created) + * @param rotA the local orientation of the connection to node A (not null, alias created) + * @param rotB the local orientation of the connection to node B (not null, alias created) + * @param useLinearReferenceFrameA true→use node A, false→use node + * B */ public SliderJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, Matrix3f rotA, Matrix3f rotB, boolean useLinearReferenceFrameA) { super(nodeA, nodeB, pivotA, pivotB); @@ -68,8 +89,19 @@ public SliderJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivo } /** - * @param pivotA local translation of the joint connection point in node A - * @param pivotB local translation of the joint connection point in node B + * Instantiate a SliderJoint. To be effective, the joint must be added to a + * physics space. + * + * @param nodeA the 1st body connected by the joint (not null, alias + * created) + * @param nodeB the 2nd body connected by the joint (not null, alias + * created) + * @param pivotA the local offset of the connection point in node A (not + * null, alias created) + * @param pivotB the local offset of the connection point in node B (not + * null, alias created) + * @param useLinearReferenceFrameA true→use node A, false→use node + * B */ public SliderJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, boolean useLinearReferenceFrameA) { super(nodeA, nodeB, pivotA, pivotB); @@ -79,342 +111,651 @@ public SliderJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivo createJoint(); } + /** + * Read the joint's lower limit for on-axis translation. + * + * @return the lower limit + */ public float getLowerLinLimit() { return getLowerLinLimit(objectId); } private native float getLowerLinLimit(long objectId); + /** + * Alter the joint's lower limit for on-axis translation. + * + * @param lowerLinLimit the desired lower limit (default=-1) + */ public void setLowerLinLimit(float lowerLinLimit) { setLowerLinLimit(objectId, lowerLinLimit); } private native void setLowerLinLimit(long objectId, float value); + /** + * Read the joint's upper limit for on-axis translation. + * + * @return the upper limit + */ public float getUpperLinLimit() { return getUpperLinLimit(objectId); } private native float getUpperLinLimit(long objectId); + /** + * Alter the joint's upper limit for on-axis translation. + * + * @param upperLinLimit the desired upper limit (default=1) + */ public void setUpperLinLimit(float upperLinLimit) { setUpperLinLimit(objectId, upperLinLimit); } private native void setUpperLinLimit(long objectId, float value); + /** + * Read the joint's lower limit for on-axis rotation. + * + * @return the lower limit angle (in radians) + */ public float getLowerAngLimit() { return getLowerAngLimit(objectId); } private native float getLowerAngLimit(long objectId); + /** + * Alter the joint's lower limit for on-axis rotation. + * + * @param lowerAngLimit the desired lower limit angle (in radians, + * default=0) + */ public void setLowerAngLimit(float lowerAngLimit) { setLowerAngLimit(objectId, lowerAngLimit); } private native void setLowerAngLimit(long objectId, float value); + /** + * Read the joint's upper limit for on-axis rotation. + * + * @return the upper limit angle (in radians) + */ public float getUpperAngLimit() { return getUpperAngLimit(objectId); } private native float getUpperAngLimit(long objectId); + /** + * Alter the joint's upper limit for on-axis rotation. + * + * @param upperAngLimit the desired upper limit angle (in radians, + * default=0) + */ public void setUpperAngLimit(float upperAngLimit) { setUpperAngLimit(objectId, upperAngLimit); } private native void setUpperAngLimit(long objectId, float value); + /** + * Read the joint's softness for on-axis translation between the limits. + * + * @return the softness + */ public float getSoftnessDirLin() { return getSoftnessDirLin(objectId); } private native float getSoftnessDirLin(long objectId); + /** + * Alter the joint's softness for on-axis translation between the limits. + * + * @param softnessDirLin the desired softness (default=1) + */ public void setSoftnessDirLin(float softnessDirLin) { setSoftnessDirLin(objectId, softnessDirLin); } private native void setSoftnessDirLin(long objectId, float value); + /** + * Read the joint's restitution for on-axis translation between the limits. + * + * @return the restitution (bounce) factor + */ public float getRestitutionDirLin() { return getRestitutionDirLin(objectId); } private native float getRestitutionDirLin(long objectId); + /** + * Alter the joint's restitution for on-axis translation between the limits. + * + * @param restitutionDirLin the desired restitution (bounce) factor + * (default=0.7) + */ public void setRestitutionDirLin(float restitutionDirLin) { setRestitutionDirLin(objectId, restitutionDirLin); } private native void setRestitutionDirLin(long objectId, float value); + /** + * Read the joint's damping for on-axis translation between the limits. + * + * @return the viscous damping ratio (0→no damping, 1→critically + * damped) + */ public float getDampingDirLin() { return getDampingDirLin(objectId); } private native float getDampingDirLin(long objectId); + /** + * Alter the joint's damping for on-axis translation between the limits. + * + * @param dampingDirLin the desired viscous damping ratio (0→no + * damping, 1→critically damped, default=0) + */ public void setDampingDirLin(float dampingDirLin) { setDampingDirLin(objectId, dampingDirLin); } private native void setDampingDirLin(long objectId, float value); + /** + * Read the joint's softness for on-axis rotation between the limits. + * + * @return the softness + */ public float getSoftnessDirAng() { return getSoftnessDirAng(objectId); } private native float getSoftnessDirAng(long objectId); + /** + * Alter the joint's softness for on-axis rotation between the limits. + * + * @param softnessDirAng the desired softness (default=1) + */ public void setSoftnessDirAng(float softnessDirAng) { setSoftnessDirAng(objectId, softnessDirAng); } private native void setSoftnessDirAng(long objectId, float value); + /** + * Read the joint's restitution for on-axis rotation between the limits. + * + * @return the restitution (bounce) factor + */ public float getRestitutionDirAng() { return getRestitutionDirAng(objectId); } private native float getRestitutionDirAng(long objectId); + /** + * Alter the joint's restitution for on-axis rotation between the limits. + * + * @param restitutionDirAng the desired restitution (bounce) factor + * (default=0.7) + */ public void setRestitutionDirAng(float restitutionDirAng) { setRestitutionDirAng(objectId, restitutionDirAng); } private native void setRestitutionDirAng(long objectId, float value); + /** + * Read the joint's damping for on-axis rotation between the limits. + * + * @return the viscous damping ratio (0→no damping, 1→critically + * damped) + */ public float getDampingDirAng() { return getDampingDirAng(objectId); } private native float getDampingDirAng(long objectId); + /** + * Alter the joint's damping for on-axis rotation between the limits. + * + * @param dampingDirAng the desired viscous damping ratio (0→no + * damping, 1→critically damped, default=0) + */ public void setDampingDirAng(float dampingDirAng) { setDampingDirAng(objectId, dampingDirAng); } private native void setDampingDirAng(long objectId, float value); + /** + * Read the joint's softness for on-axis translation hitting the limits. + * + * @return the softness + */ public float getSoftnessLimLin() { return getSoftnessLimLin(objectId); } private native float getSoftnessLimLin(long objectId); + /** + * Alter the joint's softness for on-axis translation hitting the limits. + * + * @param softnessLimLin the desired softness (default=1) + */ public void setSoftnessLimLin(float softnessLimLin) { setSoftnessLimLin(objectId, softnessLimLin); } private native void setSoftnessLimLin(long objectId, float value); + /** + * Read the joint's restitution for on-axis translation hitting the limits. + * + * @return the restitution (bounce) factor + */ public float getRestitutionLimLin() { return getRestitutionLimLin(objectId); } private native float getRestitutionLimLin(long objectId); + /** + * Alter the joint's restitution for on-axis translation hitting the limits. + * + * @param restitutionLimLin the desired restitution (bounce) factor + * (default=0.7) + */ public void setRestitutionLimLin(float restitutionLimLin) { setRestitutionLimLin(objectId, restitutionLimLin); } private native void setRestitutionLimLin(long objectId, float value); + /** + * Read the joint's damping for on-axis translation hitting the limits. + * + * @return the viscous damping ratio (0→no damping, 1→critically + * damped) + */ public float getDampingLimLin() { return getDampingLimLin(objectId); } private native float getDampingLimLin(long objectId); + /** + * Alter the joint's damping for on-axis translation hitting the limits. + * + * @param dampingLimLin the desired viscous damping ratio (0→no + * damping, 1→critically damped, default=1) + */ public void setDampingLimLin(float dampingLimLin) { setDampingLimLin(objectId, dampingLimLin); } private native void setDampingLimLin(long objectId, float value); + /** + * Read the joint's softness for on-axis rotation hitting the limits. + * + * @return the softness + */ public float getSoftnessLimAng() { return getSoftnessLimAng(objectId); } private native float getSoftnessLimAng(long objectId); + /** + * Alter the joint's softness for on-axis rotation hitting the limits. + * + * @param softnessLimAng the desired softness (default=1) + */ public void setSoftnessLimAng(float softnessLimAng) { setSoftnessLimAng(objectId, softnessLimAng); } private native void setSoftnessLimAng(long objectId, float value); + /** + * Read the joint's restitution for on-axis rotation hitting the limits. + * + * @return the restitution (bounce) factor + */ public float getRestitutionLimAng() { return getRestitutionLimAng(objectId); } private native float getRestitutionLimAng(long objectId); + /** + * Alter the joint's restitution for on-axis rotation hitting the limits. + * + * @param restitutionLimAng the desired restitution (bounce) factor + * (default=0.7) + */ public void setRestitutionLimAng(float restitutionLimAng) { setRestitutionLimAng(objectId, restitutionLimAng); } private native void setRestitutionLimAng(long objectId, float value); + /** + * Read the joint's damping for on-axis rotation hitting the limits. + * + * @return the viscous damping ratio (0→no damping, 1→critically + * damped) + */ public float getDampingLimAng() { return getDampingLimAng(objectId); } private native float getDampingLimAng(long objectId); + /** + * Alter the joint's damping for on-axis rotation hitting the limits. + * + * @param dampingLimAng the desired viscous damping ratio (0→no + * damping, 1→critically damped, default=1) + */ public void setDampingLimAng(float dampingLimAng) { setDampingLimAng(objectId, dampingLimAng); } private native void setDampingLimAng(long objectId, float value); + /** + * Read the joint's softness for off-axis translation. + * + * @return the softness + */ public float getSoftnessOrthoLin() { return getSoftnessOrthoLin(objectId); } private native float getSoftnessOrthoLin(long objectId); + /** + * Alter the joint's softness for off-axis translation. + * + * @param softnessOrthoLin the desired softness (default=1) + */ public void setSoftnessOrthoLin(float softnessOrthoLin) { setSoftnessOrthoLin(objectId, softnessOrthoLin); } private native void setSoftnessOrthoLin(long objectId, float value); + /** + * Read the joint's restitution for off-axis translation. + * + * @return the restitution (bounce) factor + */ public float getRestitutionOrthoLin() { return getRestitutionOrthoLin(objectId); } private native float getRestitutionOrthoLin(long objectId); + /** + * Alter the joint's restitution for off-axis translation. + * + * @param restitutionOrthoLin the desired restitution (bounce) factor + * (default=0.7) + */ public void setRestitutionOrthoLin(float restitutionOrthoLin) { - setDampingOrthoLin(objectId, restitutionOrthoLin); + setRestitutionOrthoLin(objectId, restitutionOrthoLin); } private native void setRestitutionOrthoLin(long objectId, float value); + /** + * Read the joint's damping for off-axis translation. + * + * @return the viscous damping ratio (0→no damping, 1→critically + * damped) + */ public float getDampingOrthoLin() { return getDampingOrthoLin(objectId); } private native float getDampingOrthoLin(long objectId); + /** + * Alter the joint's damping for off-axis translation. + * + * @param dampingOrthoLin the desired viscous damping ratio (0→no + * damping, 1→critically damped, default=1) + */ public void setDampingOrthoLin(float dampingOrthoLin) { setDampingOrthoLin(objectId, dampingOrthoLin); } private native void setDampingOrthoLin(long objectId, float value); + /** + * Read the joint's softness for off-axis rotation. + * + * @return the softness + */ public float getSoftnessOrthoAng() { return getSoftnessOrthoAng(objectId); } private native float getSoftnessOrthoAng(long objectId); + /** + * Alter the joint's softness for off-axis rotation. + * + * @param softnessOrthoAng the desired softness (default=1) + */ public void setSoftnessOrthoAng(float softnessOrthoAng) { setSoftnessOrthoAng(objectId, softnessOrthoAng); } private native void setSoftnessOrthoAng(long objectId, float value); + /** + * Read the joint's restitution for off-axis rotation. + * + * @return the restitution (bounce) factor + */ public float getRestitutionOrthoAng() { return getRestitutionOrthoAng(objectId); } private native float getRestitutionOrthoAng(long objectId); + /** + * Alter the joint's restitution for off-axis rotation. + * + * @param restitutionOrthoAng the desired restitution (bounce) factor + * (default=0.7) + */ public void setRestitutionOrthoAng(float restitutionOrthoAng) { setRestitutionOrthoAng(objectId, restitutionOrthoAng); } private native void setRestitutionOrthoAng(long objectId, float value); + /** + * Read the joint's damping for off-axis rotation. + * + * @return the viscous damping ratio (0→no damping, 1→critically + * damped) + */ public float getDampingOrthoAng() { return getDampingOrthoAng(objectId); } private native float getDampingOrthoAng(long objectId); + /** + * Alter the joint's damping for off-axis rotation. + * + * @param dampingOrthoAng the desired viscous damping ratio (0→no + * damping, 1→critically damped, default=1) + */ public void setDampingOrthoAng(float dampingOrthoAng) { setDampingOrthoAng(objectId, dampingOrthoAng); } private native void setDampingOrthoAng(long objectId, float value); + /** + * Test whether the translation motor is powered. + * + * @return true if powered, otherwise false + */ public boolean isPoweredLinMotor() { return isPoweredLinMotor(objectId); } private native boolean isPoweredLinMotor(long objectId); + /** + * Alter whether the translation motor is powered. + * + * @param poweredLinMotor true to power the motor, false to de-power it + * (default=false) + */ public void setPoweredLinMotor(boolean poweredLinMotor) { setPoweredLinMotor(objectId, poweredLinMotor); } private native void setPoweredLinMotor(long objectId, boolean value); + /** + * Read the velocity target of the translation motor. + * + * @return the velocity target + */ public float getTargetLinMotorVelocity() { return getTargetLinMotorVelocity(objectId); } private native float getTargetLinMotorVelocity(long objectId); + /** + * Alter the velocity target of the translation motor. + * + * @param targetLinMotorVelocity the desired velocity target (default=0) + */ public void setTargetLinMotorVelocity(float targetLinMotorVelocity) { setTargetLinMotorVelocity(objectId, targetLinMotorVelocity); } private native void setTargetLinMotorVelocity(long objectId, float value); + /** + * Read the maximum force of the translation motor. + * + * @return the maximum force + */ public float getMaxLinMotorForce() { return getMaxLinMotorForce(objectId); } private native float getMaxLinMotorForce(long objectId); + /** + * Alter the maximum force of the translation motor. + * + * @param maxLinMotorForce the desired maximum force (default=0) + */ public void setMaxLinMotorForce(float maxLinMotorForce) { setMaxLinMotorForce(objectId, maxLinMotorForce); } private native void setMaxLinMotorForce(long objectId, float value); + /** + * Test whether the rotation motor is powered. + * + * @return true if powered, otherwise false + */ public boolean isPoweredAngMotor() { return isPoweredAngMotor(objectId); } private native boolean isPoweredAngMotor(long objectId); + /** + * Alter whether the rotation motor is powered. + * + * @param poweredAngMotor true to power the motor, false to de-power it + * (default=false) + */ public void setPoweredAngMotor(boolean poweredAngMotor) { setPoweredAngMotor(objectId, poweredAngMotor); } private native void setPoweredAngMotor(long objectId, boolean value); + /** + * Read the velocity target of the rotation motor. + * + * @return the velocity target (in radians per second) + */ public float getTargetAngMotorVelocity() { return getTargetAngMotorVelocity(objectId); } private native float getTargetAngMotorVelocity(long objectId); + /** + * Alter the velocity target of the rotation motor. + * + * @param targetAngMotorVelocity the desired velocity target (in radians per + * second, default=0) + */ public void setTargetAngMotorVelocity(float targetAngMotorVelocity) { setTargetAngMotorVelocity(objectId, targetAngMotorVelocity); } private native void setTargetAngMotorVelocity(long objectId, float value); + /** + * Read the maximum force of the rotation motor. + * + * @return the maximum force + */ public float getMaxAngMotorForce() { return getMaxAngMotorForce(objectId); } private native float getMaxAngMotorForce(long objectId); + /** + * Alter the maximum force of the rotation motor. + * + * @param maxAngMotorForce the desired maximum force (default=0) + */ public void setMaxAngMotorForce(float maxAngMotorForce) { setMaxAngMotorForce(objectId, maxAngMotorForce); } private native void setMaxAngMotorForce(long objectId, float value); + /** + * Serialize this joint, 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); @@ -455,6 +796,12 @@ public void write(JmeExporter ex) throws IOException { capsule.write(useLinearReferenceFrameA, "useLinearReferenceFrameA", false); } + /** + * De-serialize this joint, 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); @@ -528,6 +875,9 @@ public void read(JmeImporter im) throws IOException { setUpperLinLimit(upperLinLimit); } + /** + * Instantiate the configured constraint in Bullet. + */ protected void createJoint() { objectId = createJoint(nodeA.getObjectId(), nodeB.getObjectId(), pivotA, rotA, pivotB, rotB, useLinearReferenceFrameA); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created Joint {0}", Long.toHexString(objectId)); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/joints/motors/RotationalLimitMotor.java b/jme3-bullet/src/main/java/com/jme3/bullet/joints/motors/RotationalLimitMotor.java index 4b4b4aa956..88db32aba6 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/joints/motors/RotationalLimitMotor.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/joints/motors/RotationalLimitMotor.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,135 +32,253 @@ package com.jme3.bullet.joints.motors; /** + * A motor based on Bullet's btRotationalLimitMotor. Motors are used to drive + * joints. * * @author normenhansen */ public class RotationalLimitMotor { + /** + * Unique identifier of the btRotationalLimitMotor. The constructor sets + * this to a non-zero value. + */ private long motorId = 0; + /** + * Instantiate a motor for the identified btRotationalLimitMotor. + * + * @param motor the unique identifier (not zero) + */ public RotationalLimitMotor(long motor) { this.motorId = motor; } + /** + * Read the id of the btRotationalLimitMotor. + * + * @return the identifier of the btRotationalLimitMotor (not zero) + */ public long getMotor() { return motorId; } + /** + * Read this motor's constraint lower limit. + * + * @return the limit value + */ public float getLoLimit() { return getLoLimit(motorId); } private native float getLoLimit(long motorId); + /** + * Alter this motor's constraint lower limit. + * + * @param loLimit the desired limit value + */ public void setLoLimit(float loLimit) { setLoLimit(motorId, loLimit); } private native void setLoLimit(long motorId, float loLimit); + /** + * Read this motor's constraint upper limit. + * + * @return the limit value + */ public float getHiLimit() { return getHiLimit(motorId); } private native float getHiLimit(long motorId); + /** + * Alter this motor's constraint upper limit. + * + * @param hiLimit the desired limit value + */ public void setHiLimit(float hiLimit) { setHiLimit(motorId, hiLimit); } private native void setHiLimit(long motorId, float hiLimit); + /** + * Read this motor's target velocity. + * + * @return the target velocity (in radians per second) + */ public float getTargetVelocity() { return getTargetVelocity(motorId); } private native float getTargetVelocity(long motorId); + /** + * Alter this motor's target velocity. + * + * @param targetVelocity the desired target velocity (in radians per second) + */ public void setTargetVelocity(float targetVelocity) { setTargetVelocity(motorId, targetVelocity); } private native void setTargetVelocity(long motorId, float targetVelocity); + /** + * Read this motor's maximum force. + * + * @return the maximum force + */ public float getMaxMotorForce() { return getMaxMotorForce(motorId); } private native float getMaxMotorForce(long motorId); + /** + * Alter this motor's maximum force. + * + * @param maxMotorForce the desired maximum force on the motor + */ public void setMaxMotorForce(float maxMotorForce) { setMaxMotorForce(motorId, maxMotorForce); } private native void setMaxMotorForce(long motorId, float maxMotorForce); + /** + * Read the limit's maximum force. + * + * @return the maximum force on the limit + */ public float getMaxLimitForce() { return getMaxLimitForce(motorId); } private native float getMaxLimitForce(long motorId); + /** + * Alter the limit's maximum force. + * + * @param maxLimitForce the desired maximum force on the limit + */ public void setMaxLimitForce(float maxLimitForce) { setMaxLimitForce(motorId, maxLimitForce); } private native void setMaxLimitForce(long motorId, float maxLimitForce); + /** + * Read this motor's damping. + * + * @return the viscous damping ratio (0→no damping, 1→critically + * damped) + */ public float getDamping() { return getDamping(motorId); } private native float getDamping(long motorId); + /** + * Alter this motor's damping. + * + * @param damping the desired viscous damping ratio (0→no damping, + * 1→critically damped, default=1) + */ public void setDamping(float damping) { setDamping(motorId, damping); } private native void setDamping(long motorId, float damping); + /** + * Read this motor's limit softness. + * + * @return the limit softness + */ public float getLimitSoftness() { return getLimitSoftness(motorId); } private native float getLimitSoftness(long motorId); + /** + * Alter this motor's limit softness. + * + * @param limitSoftness the desired limit softness + */ public void setLimitSoftness(float limitSoftness) { setLimitSoftness(motorId, limitSoftness); } private native void setLimitSoftness(long motorId, float limitSoftness); + /** + * Read this motor's error tolerance at limits. + * + * @return the error tolerance (>0) + */ public float getERP() { return getERP(motorId); } private native float getERP(long motorId); + /** + * Alter this motor's error tolerance at limits. + * + * @param ERP the desired error tolerance (>0) + */ public void setERP(float ERP) { setERP(motorId, ERP); } private native void setERP(long motorId, float ERP); + /** + * Read this motor's bounce. + * + * @return the bounce (restitution factor) + */ public float getBounce() { return getBounce(motorId); } private native float getBounce(long motorId); + /** + * Alter this motor's bounce. + * + * @param bounce the desired bounce (restitution factor) + */ public void setBounce(float bounce) { setBounce(motorId, bounce); } private native void setBounce(long motorId, float limitSoftness); + /** + * Test whether this motor is enabled. + * + * @return true if enabled, otherwise false + */ public boolean isEnableMotor() { return isEnableMotor(motorId); } private native boolean isEnableMotor(long motorId); + /** + * Enable or disable this motor. + * + * @param enableMotor true→enable, false→disable + */ public void setEnableMotor(boolean enableMotor) { setEnableMotor(motorId, enableMotor); } diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/joints/motors/TranslationalLimitMotor.java b/jme3-bullet/src/main/java/com/jme3/bullet/joints/motors/TranslationalLimitMotor.java index 3b7690697f..97993edd3a 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/joints/motors/TranslationalLimitMotor.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/joints/motors/TranslationalLimitMotor.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,21 +34,42 @@ import com.jme3.math.Vector3f; /** + * A motor based on Bullet's btTranslationalLimitMotor. Motors are used to drive + * joints. * * @author normenhansen */ public class TranslationalLimitMotor { + /** + * Unique identifier of the btTranslationalLimitMotor. The constructor sets + * this to a non-zero value. After that, the id never changes. + */ private long motorId = 0; + /** + * Instantiate a motor for the identified btTranslationalLimitMotor. + * + * @param motor the unique identifier (not zero) + */ public TranslationalLimitMotor(long motor) { this.motorId = motor; } + /** + * Read the id of the btTranslationalLimitMotor. + * + * @return the unique identifier (not zero) + */ public long getMotor() { return motorId; } + /** + * Copy this motor's constraint lower limits. + * + * @return a new vector (not null) + */ public Vector3f getLowerLimit() { Vector3f vec = new Vector3f(); getLowerLimit(motorId, vec); @@ -57,12 +78,22 @@ public Vector3f getLowerLimit() { private native void getLowerLimit(long motorId, Vector3f vector); + /** + * Alter the constraint lower limits. + * + * @param lowerLimit (unaffected, not null) + */ public void setLowerLimit(Vector3f lowerLimit) { setLowerLimit(motorId, lowerLimit); } private native void setLowerLimit(long motorId, Vector3f vector); + /** + * Copy this motor's constraint upper limits. + * + * @return a new vector (not null) + */ public Vector3f getUpperLimit() { Vector3f vec = new Vector3f(); getUpperLimit(motorId, vec); @@ -71,12 +102,22 @@ public Vector3f getUpperLimit() { private native void getUpperLimit(long motorId, Vector3f vector); + /** + * Alter the constraint upper limits. + * + * @param upperLimit (unaffected, not null) + */ public void setUpperLimit(Vector3f upperLimit) { setUpperLimit(motorId, upperLimit); } private native void setUpperLimit(long motorId, Vector3f vector); + /** + * Copy the accumulated impulse. + * + * @return a new vector (not null) + */ public Vector3f getAccumulatedImpulse() { Vector3f vec = new Vector3f(); getAccumulatedImpulse(motorId, vec); @@ -85,42 +126,79 @@ public Vector3f getAccumulatedImpulse() { private native void getAccumulatedImpulse(long motorId, Vector3f vector); + /** + * Alter the accumulated impulse. + * + * @param accumulatedImpulse the desired vector (not null, unaffected) + */ public void setAccumulatedImpulse(Vector3f accumulatedImpulse) { setAccumulatedImpulse(motorId, accumulatedImpulse); } private native void setAccumulatedImpulse(long motorId, Vector3f vector); + /** + * Read this motor's limit softness. + * + * @return the softness + */ public float getLimitSoftness() { return getLimitSoftness(motorId); } private native float getLimitSoftness(long motorId); + /** + * Alter the limit softness. + * + * @param limitSoftness the desired limit softness (default=0.5) + */ public void setLimitSoftness(float limitSoftness) { setLimitSoftness(motorId, limitSoftness); } private native void setLimitSoftness(long motorId, float limitSoftness); + /** + * Read this motor's damping. + * + * @return the viscous damping ratio (0→no damping, 1→critically + * damped) + */ public float getDamping() { return getDamping(motorId); } private native float getDamping(long motorId); + /** + * Alter this motor's damping. + * + * @param damping the desired viscous damping ratio (0→no damping, + * 1→critically damped, default=1) + */ public void setDamping(float damping) { setDamping(motorId, damping); } private native void setDamping(long motorId, float damping); + /** + * Read this motor's restitution. + * + * @return the restitution (bounce) factor + */ public float getRestitution() { return getRestitution(motorId); } private native float getRestitution(long motorId); + /** + * Alter this motor's restitution. + * + * @param restitution the desired restitution (bounce) factor + */ public void setRestitution(float restitution) { setRestitution(motorId, restitution); } diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsCharacter.java b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsCharacter.java index bf55a29096..148199b75b 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsCharacter.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsCharacter.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 @@ -44,11 +44,19 @@ import java.util.logging.Logger; /** - * Basic Bullet Character + * A collision object for simplified character simulation, based on Bullet's + * btKinematicCharacterController. + * * @author normenhansen */ public class PhysicsCharacter extends PhysicsCollisionObject { + /** + * Unique identifier of btKinematicCharacterController (as opposed to its + * collision object, which is a ghost). Constructors are responsible for + * setting this to a non-zero value. The id might change if the character + * gets rebuilt. + */ protected long characterId = 0; protected float stepHeight; protected Vector3f walkDirection = new Vector3f(); @@ -59,12 +67,19 @@ public class PhysicsCharacter extends PhysicsCollisionObject { //TEMP VARIABLES protected final Quaternion tmp_inverseWorldRotation = new Quaternion(); + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public PhysicsCharacter() { } /** - * @param shape The CollisionShape (no Mesh or CompoundCollisionShapes) - * @param stepHeight The quantization size for vertical movement + * Instantiate a character with the specified collision shape and step + * height. + * + * @param shape the desired shape (not null, alias created) + * @param stepHeight the quantization size for vertical movement */ public PhysicsCharacter(CollisionShape shape, float stepHeight) { this.collisionShape = shape; @@ -75,6 +90,9 @@ public PhysicsCharacter(CollisionShape shape, float stepHeight) { buildObject(); } + /** + * Create the configured character in Bullet. + */ protected void buildObject() { if (objectId == 0) { objectId = createGhostObject(); @@ -98,8 +116,9 @@ protected void buildObject() { private native long createCharacterObject(long objectId, long shapeId, float stepHeight); /** - * Sets the location of this physics character - * @param location + * Directly alter the location of this character's center of mass. + * + * @param location the desired physics location (not null, unaffected) */ public void warp(Vector3f location) { warp(characterId, location); @@ -108,11 +127,11 @@ public void warp(Vector3f location) { private native void warp(long characterId, Vector3f location); /** - * Set the walk direction, works continuously. - * This should probably be called setPositionIncrementPerSimulatorStep. - * This is neither a direction nor a velocity, but the amount to - * increment the position each physics tick. So vector length = accuracy*speed in m/s - * @param vec the walk direction to set + * Alter the walk offset. The offset will continue to be applied until + * altered again. + * + * @param vec the desired position increment for each physics tick (not + * null, unaffected) */ public void setWalkDirection(Vector3f vec) { walkDirection.set(vec); @@ -122,7 +141,9 @@ public void setWalkDirection(Vector3f vec) { private native void setWalkDirection(long characterId, Vector3f vec); /** - * @return the currently set walkDirection + * Access the walk offset. + * + * @return the pre-existing instance */ public Vector3f getWalkDirection() { return walkDirection; @@ -130,6 +151,7 @@ public Vector3f getWalkDirection() { /** * @deprecated Deprecated in bullet 2.86.1 use setUp(Vector3f) instead + * @param axis which axis: 0→X, 1→Y, 2→Z */ @Deprecated public void setUpAxis(int axis) { @@ -147,6 +169,11 @@ public void setUpAxis(int axis) { } } + /** + * Alter this character's "up" direction. + * + * @param axis the desired direction (not null, not zero, unaffected) + */ public void setUp(Vector3f axis) { setUp(characterId, axis); } @@ -154,6 +181,11 @@ public void setUp(Vector3f axis) { private native void setUp(long characterId, Vector3f axis); + /** + * Alter this character's angular velocity. + * + * @param v the desired angular velocity vector (not null, unaffected) + */ public void setAngularVelocity(Vector3f v){ setAngularVelocity(characterId,v); @@ -161,7 +193,13 @@ public void setAngularVelocity(Vector3f v){ private native void setAngularVelocity(long characterId, Vector3f v); - + /** + * Copy this character's angular velocity. + * + * @param out storage for the result (modified if not null) + * @return the velocity vector (either the provided storage or a new vector, + * not null) + */ public Vector3f getAngularVelocity(Vector3f out){ if(out==null)out=new Vector3f(); getAngularVelocity(characterId,out); @@ -171,13 +209,23 @@ public Vector3f getAngularVelocity(Vector3f out){ private native void getAngularVelocity(long characterId, Vector3f out); + /** + * Alter the linear velocity of this character's center of mass. + * + * @param v the desired velocity vector (not null) + */ public void setLinearVelocity(Vector3f v){ setLinearVelocity(characterId,v); } private native void setLinearVelocity(long characterId, Vector3f v); - + /** + * Copy the linear velocity of this character's center of mass. + * + * @param out storage for the result (modified if not null) + * @return a vector (either the provided storage or a new vector, not null) + */ public Vector3f getLinearVelocity(Vector3f out){ if(out==null)out=new Vector3f(); getLinearVelocity(characterId,out); @@ -187,10 +235,20 @@ public Vector3f getLinearVelocity(Vector3f out){ private native void getLinearVelocity(long characterId, Vector3f out); + /** + * Read the index of the "up" axis. + * + * @return which axis: 0→X, 1→Y, 2→Z + */ public int getUpAxis() { return upAxis; } + /** + * Alter this character's fall speed. + * + * @param fallSpeed the desired speed (default=55) + */ public void setFallSpeed(float fallSpeed) { this.fallSpeed = fallSpeed; setFallSpeed(characterId, fallSpeed); @@ -198,10 +256,20 @@ public void setFallSpeed(float fallSpeed) { private native void setFallSpeed(long characterId, float fallSpeed); + /** + * Read this character's fall speed. + * + * @return speed + */ public float getFallSpeed() { return fallSpeed; } + /** + * Alter this character's jump speed. + * + * @param jumpSpeed the desired speed (default=10) + */ public void setJumpSpeed(float jumpSpeed) { this.jumpSpeed = jumpSpeed; setJumpSpeed(characterId, jumpSpeed); @@ -209,18 +277,31 @@ public void setJumpSpeed(float jumpSpeed) { private native void setJumpSpeed(long characterId, float jumpSpeed); + /** + * Read this character's jump speed. + * + * @return speed + */ public float getJumpSpeed() { return jumpSpeed; } /** - * @deprecated Deprecated in bullet 2.86.1. Use setGravity(Vector3f) instead. + * @deprecated Deprecated in bullet 2.86.1. Use setGravity(Vector3f) + * instead. + * @param value the desired upward component of the acceleration (typically + * negative) */ @Deprecated public void setGravity(float value) { setGravity(new Vector3f(0,value,0)); } + /** + * Alter this character's gravitational acceleration. + * + * @param value the desired acceleration vector (not null, unaffected) + */ public void setGravity(Vector3f value) { setGravity(characterId, value); } @@ -228,13 +309,22 @@ public void setGravity(Vector3f value) { private native void setGravity(long characterId, Vector3f gravity); /** - * @deprecated Deprecated in bullet 2.86.1. Use getGravity(Vector3f) instead. + * @deprecated Deprecated in bullet 2.86.1. Use getGravity(Vector3f) + * instead. + * @return the upward component of the acceleration (typically negative) */ @Deprecated public float getGravity() { return getGravity(null).y; } + /** + * Copy this character's gravitational acceleration. + * + * @param out storage for the result (modified if not null) + * @return the acceleration vector (either the provided storage or a new + * vector, not null) + */ public Vector3f getGravity(Vector3f out) { if(out==null)out=new Vector3f(); getGravity(characterId,out); @@ -244,12 +334,24 @@ public Vector3f getGravity(Vector3f out) { private native void getGravity(long characterId,Vector3f out); + /** + * Read this character's linear damping. + * + * @return the viscous damping ratio (0→no damping, 1→critically + * damped) + */ public float getLinearDamping(){ return getLinearDamping(characterId); } private native float getLinearDamping(long characterId); + /** + * Alter this character's linear damping. + * + * @param v the desired viscous damping ratio (0→no damping, + * 1→critically damped) + */ public void setLinearDamping(float v ){ setLinearDamping(characterId,v ); @@ -258,13 +360,24 @@ public void setLinearDamping(float v ){ private native void setLinearDamping(long characterId,float v); + /** + * Read this character's angular damping. + * + * @return the viscous damping ratio (0→no damping, 1→critically + * damped) + */ public float getAngularDamping(){ return getAngularDamping(characterId); } private native float getAngularDamping(long characterId); - + /** + * Alter this character's angular damping. + * + * @param v the desired viscous damping ratio (0→no damping, + * 1→critically damped, default=0) + */ public void setAngularDamping(float v ){ setAngularDamping(characterId,v ); } @@ -272,13 +385,22 @@ public void setAngularDamping(float v ){ private native void setAngularDamping(long characterId,float v); + /** + * Read this character's step height. + * + * @return the height (in physics-space units) + */ public float getStepHeight(){ return getStepHeight(characterId); } private native float getStepHeight(long characterId); - + /** + * Alter this character's step height. + * + * @param v the desired height (in physics-space units) + */ public void setStepHeight(float v ){ setStepHeight(characterId,v ); } @@ -286,13 +408,22 @@ public void setStepHeight(float v ){ private native void setStepHeight(long characterId,float v); + /** + * Read this character's maximum penetration depth. + * + * @return the depth (in physics-space units) + */ public float getMaxPenetrationDepth(){ return getMaxPenetrationDepth(characterId); } private native float getMaxPenetrationDepth(long characterId); - + /** + * Alter this character's maximum penetration depth. + * + * @param v the desired depth (in physics-space units) + */ public void setMaxPenetrationDepth(float v ){ setMaxPenetrationDepth(characterId,v ); } @@ -303,18 +434,33 @@ public void setMaxPenetrationDepth(float v ){ + /** + * Alter this character's maximum slope angle. + * + * @param slopeRadians the desired angle (in radians) + */ public void setMaxSlope(float slopeRadians) { setMaxSlope(characterId, slopeRadians); } private native void setMaxSlope(long characterId, float slopeRadians); + /** + * Read this character's maximum slope angle. + * + * @return the angle (in radians) + */ public float getMaxSlope() { return getMaxSlope(characterId); } private native float getMaxSlope(long characterId); + /** + * Test whether this character is on the ground. + * + * @return true if on the ground, otherwise false + */ public boolean onGround() { return onGround(characterId); } @@ -330,12 +476,24 @@ public void jump() { } + /** + * Jump in the specified direction. + * + * @param dir desired jump direction (not null, unaffected) + */ public void jump(Vector3f dir) { jump(characterId,dir); } private native void jump(long characterId,Vector3f v); + /** + * Apply the specified CollisionShape to this character. Note that the + * character should not be in any physics space while changing shape; the + * character gets rebuilt on the physics side. + * + * @param collisionShape the shape to apply (not null, alias created) + */ @Override public void setCollisionShape(CollisionShape collisionShape) { // if (!(collisionShape.getObjectId() instanceof ConvexShape)) { @@ -350,15 +508,21 @@ public void setCollisionShape(CollisionShape collisionShape) { } /** - * Set the physics location (same as warp()) - * @param location the location of the actual physics object + * Directly alter this character's location. (Same as + * {@link #warp(com.jme3.math.Vector3f)}).) + * + * @param location the desired location (not null, unaffected) */ public void setPhysicsLocation(Vector3f location) { warp(location); } /** - * @return the physicsLocation + * Copy the location of this character's center of mass. + * + * @param trans storage for the result (modified if not null) + * @return the location vector (either the provided storage or a new vector, + * not null) */ public Vector3f getPhysicsLocation(Vector3f trans) { if (trans == null) { @@ -371,36 +535,72 @@ public Vector3f getPhysicsLocation(Vector3f trans) { private native void getPhysicsLocation(long objectId, Vector3f vec); /** - * @return the physicsLocation + * Copy the location of this character's center of mass. + * + * @return a new location vector (not null) */ public Vector3f getPhysicsLocation() { return getPhysicsLocation(null); } + /** + * Alter this character's continuous collision detection (CCD) swept sphere + * radius. + * + * @param radius (≥0, default=0) + */ public void setCcdSweptSphereRadius(float radius) { setCcdSweptSphereRadius(objectId, radius); } private native void setCcdSweptSphereRadius(long objectId, float radius); + /** + * Alter the amount of motion required to activate continuous collision + * detection (CCD). + *

+ * This addresses the issue of fast objects passing through other objects + * with no collision detected. + * + * @param threshold the desired threshold velocity (>0) or zero to + * disable CCD (default=0) + */ public void setCcdMotionThreshold(float threshold) { setCcdMotionThreshold(objectId, threshold); } private native void setCcdMotionThreshold(long objectId, float threshold); + /** + * Read the radius of the sphere used for continuous collision detection + * (CCD). + * + * @return radius (≥0) + */ public float getCcdSweptSphereRadius() { return getCcdSweptSphereRadius(objectId); } private native float getCcdSweptSphereRadius(long objectId); + /** + * Calculate this character's continuous collision detection (CCD) motion + * threshold. + * + * @return the threshold velocity (≥0) + */ public float getCcdMotionThreshold() { return getCcdMotionThreshold(objectId); } private native float getCcdMotionThreshold(long objectId); + /** + * Calculate the square of this character's continuous collision detection + * (CCD) motion threshold. + * + * @return the threshold velocity squared (≥0) + */ public float getCcdSquareMotionThreshold() { return getCcdSquareMotionThreshold(objectId); } @@ -409,14 +609,25 @@ public float getCcdSquareMotionThreshold() { /** * used internally + * + * @return the Bullet id */ public long getControllerId() { return characterId; } + /** + * Has no effect. + */ public void destroy() { } + /** + * Serialize this character, for example when saving to a J3O file. + * + * @param e exporter (not null) + * @throws IOException from exporter + */ @Override public void write(JmeExporter e) throws IOException { super.write(e); @@ -432,6 +643,13 @@ public void write(JmeExporter e) throws IOException { capsule.write(getPhysicsLocation(new Vector3f()), "physicsLocation", new Vector3f()); } + /** + * De-serialize this character from the specified importer, for example when + * loading from a J3O file. + * + * @param e importer (not null) + * @throws IOException from importer + */ @Override public void read(JmeImporter e) throws IOException { super.read(e); @@ -448,6 +666,12 @@ public void read(JmeImporter e) throws IOException { setPhysicsLocation((Vector3f) capsule.readSavable("physicsLocation", new Vector3f())); } + /** + * Finalize this physics character just before it is destroyed. Should be + * invoked only by a subclass or by the garbage collector. + * + * @throws Throwable ignored by the garbage collector + */ @Override protected void finalize() throws Throwable { super.finalize(); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsGhostObject.java b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsGhostObject.java index 052e280e43..acb3752e6a 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsGhostObject.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsGhostObject.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,11 +48,14 @@ import java.util.logging.Logger; /** + * A collision object for intangibles, based on Bullet's + * btPairCachingGhostObject. This is useful for creating a character controller, + * collision sensors/triggers, explosions etc. + *

* From Bullet manual:
- * GhostObject can keep track of all objects that are overlapping. - * By default, this overlap is based on the AABB. - * This is useful for creating a character controller, - * collision sensors/triggers, explosions etc.
+ * btGhostObject is a special btCollisionObject, useful for fast localized + * collision queries. + * * @author normenhansen */ public class PhysicsGhostObject extends PhysicsCollisionObject { @@ -61,9 +64,18 @@ public class PhysicsGhostObject extends PhysicsCollisionObject { protected final Quaternion tmp_inverseWorldRotation = new Quaternion(); private List overlappingObjects = new LinkedList(); + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public PhysicsGhostObject() { } + /** + * Instantiate an object with the specified collision shape. + * + * @param shape the desired shape (not null, alias created) + */ public PhysicsGhostObject(CollisionShape shape) { collisionShape = shape; buildObject(); @@ -74,6 +86,9 @@ public PhysicsGhostObject(Spatial child, CollisionShape shape) { buildObject(); } + /** + * Create the configured object in Bullet. + */ protected void buildObject() { if (objectId == 0) { // gObject = new PairCachingGhostObject(); @@ -93,6 +108,13 @@ protected void buildObject() { private native void setGhostFlags(long objectId); + /** + * Apply the specified CollisionShape to this object. Note that the object + * should not be in any physics space while changing shape; the object gets + * rebuilt on the physics side. + * + * @param collisionShape the shape to apply (not null, alias created) + */ @Override public void setCollisionShape(CollisionShape collisionShape) { super.setCollisionShape(collisionShape); @@ -104,8 +126,10 @@ public void setCollisionShape(CollisionShape collisionShape) { } /** - * Sets the physics object location - * @param location the location of the actual physics object + * Directly alter the location of this object's center. + * + * @param location the desired location (in physics-space coordinates, not + * null, unaffected) */ public void setPhysicsLocation(Vector3f location) { setPhysicsLocation(objectId, location); @@ -114,8 +138,10 @@ public void setPhysicsLocation(Vector3f location) { private native void setPhysicsLocation(long objectId, Vector3f location); /** - * Sets the physics object rotation - * @param rotation the rotation of the actual physics object + * Directly alter this object's orientation. + * + * @param rotation the desired orientation (a rotation matrix in + * physics-space coordinates, not null, unaffected) */ public void setPhysicsRotation(Matrix3f rotation) { setPhysicsRotation(objectId, rotation); @@ -124,8 +150,10 @@ public void setPhysicsRotation(Matrix3f rotation) { private native void setPhysicsRotation(long objectId, Matrix3f rotation); /** - * Sets the physics object rotation - * @param rotation the rotation of the actual physics object + * Directly alter this object's orientation. + * + * @param rotation the desired orientation (quaternion, not null, + * unaffected) */ public void setPhysicsRotation(Quaternion rotation) { setPhysicsRotation(objectId, rotation); @@ -134,7 +162,11 @@ public void setPhysicsRotation(Quaternion rotation) { private native void setPhysicsRotation(long objectId, Quaternion rotation); /** - * @return the physicsLocation + * Copy the location of this object's center. + * + * @param trans storage for the result (modified if not null) + * @return a location vector (in physics-space coordinates, either + * the provided storage or a new vector, not null) */ public Vector3f getPhysicsLocation(Vector3f trans) { if (trans == null) { @@ -147,7 +179,11 @@ public Vector3f getPhysicsLocation(Vector3f trans) { private native void getPhysicsLocation(long objectId, Vector3f vector); /** - * @return the physicsLocation + * Copy this object's orientation to a quaternion. + * + * @param rot storage for the result (modified if not null) + * @return an orientation (in physics-space coordinates, either the provided + * storage or a new quaternion, not null) */ public Quaternion getPhysicsRotation(Quaternion rot) { if (rot == null) { @@ -160,7 +196,11 @@ public Quaternion getPhysicsRotation(Quaternion rot) { private native void getPhysicsRotation(long objectId, Quaternion rot); /** - * @return the physicsLocation + * Copy this object's orientation to a matrix. + * + * @param rot storage for the result (modified if not null) + * @return an orientation (in physics-space coordinates, either the provided + * storage or a new matrix, not null) */ public Matrix3f getPhysicsRotationMatrix(Matrix3f rot) { if (rot == null) { @@ -173,7 +213,9 @@ public Matrix3f getPhysicsRotationMatrix(Matrix3f rot) { private native void getPhysicsRotationMatrix(long objectId, Matrix3f rot); /** - * @return the physicsLocation + * Copy the location of this object's center. + * + * @return a new location vector (not null) */ public Vector3f getPhysicsLocation() { Vector3f vec = new Vector3f(); @@ -182,7 +224,9 @@ public Vector3f getPhysicsLocation() { } /** - * @return the physicsLocation + * Copy this object's orientation to a quaternion. + * + * @return a new quaternion (not null) */ public Quaternion getPhysicsRotation() { Quaternion quat = new Quaternion(); @@ -190,6 +234,11 @@ public Quaternion getPhysicsRotation() { return quat; } + /** + * Copy this object's orientation to a matrix. + * + * @return a new matrix (not null) + */ public Matrix3f getPhysicsRotationMatrix() { Matrix3f mtx = new Matrix3f(); getPhysicsRotationMatrix(objectId, mtx); @@ -203,16 +252,15 @@ public Matrix3f getPhysicsRotationMatrix() { // return gObject; // } /** - * destroys this PhysicsGhostNode and removes it from memory + * Has no effect. */ public void destroy() { } /** - * Another Object is overlapping with this GhostNode, - * if and if only there CollisionShapes overlaps. - * They could be both regular PhysicsRigidBodys or PhysicsGhostObjects. - * @return All CollisionObjects overlapping with this GhostNode. + * Access a list of overlapping objects. + * + * @return an internal list which may get reused (not null) */ public List getOverlappingObjects() { overlappingObjects.clear(); @@ -225,13 +273,19 @@ public List getOverlappingObjects() { protected native void getOverlappingObjects(long objectId); + /** + * This method is invoked from native code. + * + * @param co the collision object to add + */ private void addOverlappingObject_native(PhysicsCollisionObject co) { overlappingObjects.add(co); } /** + * Count how many collision objects this object overlaps. * - * @return With how many other CollisionObjects this GhostNode is currently overlapping. + * @return count (≥0) */ public int getOverlappingCount() { return getOverlappingCount(objectId); @@ -240,44 +294,84 @@ public int getOverlappingCount() { private native int getOverlappingCount(long objectId); /** + * Access an overlapping collision object by its position in the list. * - * @param index The index of the overlapping Node to retrieve. - * @return The Overlapping CollisionObject at the given index. + * @param index which list position (≥0, <count) + * @return the pre-existing object */ public PhysicsCollisionObject getOverlapping(int index) { return overlappingObjects.get(index); } + /** + * Alter the continuous collision detection (CCD) swept sphere radius for + * this object. + * + * @param radius (≥0) + */ public void setCcdSweptSphereRadius(float radius) { setCcdSweptSphereRadius(objectId, radius); } private native void setCcdSweptSphereRadius(long objectId, float radius); + /** + * Alter the amount of motion required to trigger continuous collision + * detection (CCD). + *

+ * This addresses the issue of fast objects passing through other objects + * with no collision detected. + * + * @param threshold the desired threshold value (squared velocity, >0) or + * zero to disable CCD (default=0) + */ public void setCcdMotionThreshold(float threshold) { setCcdMotionThreshold(objectId, threshold); } private native void setCcdMotionThreshold(long objectId, float threshold); + /** + * Read the radius of the sphere used for continuous collision detection + * (CCD). + * + * @return radius (≥0) + */ public float getCcdSweptSphereRadius() { return getCcdSweptSphereRadius(objectId); } private native float getCcdSweptSphereRadius(long objectId); + /** + * Read the continuous collision detection (CCD) motion threshold for this + * object. + * + * @return threshold value (squared velocity, ≥0) + */ public float getCcdMotionThreshold() { return getCcdMotionThreshold(objectId); } private native float getCcdMotionThreshold(long objectId); + /** + * Read the CCD square motion threshold for this object. + * + * @return threshold value (≥0) + */ public float getCcdSquareMotionThreshold() { return getCcdSquareMotionThreshold(objectId); } private native float getCcdSquareMotionThreshold(long objectId); + /** + * Serialize this object, for example when saving to a J3O file. + * + * @param e exporter (not null) + * @throws IOException from exporter + */ @Override public void write(JmeExporter e) throws IOException { super.write(e); @@ -288,6 +382,13 @@ public void write(JmeExporter e) throws IOException { capsule.write(getCcdSweptSphereRadius(), "ccdSweptSphereRadius", 0); } + /** + * De-serialize this object from the specified importer, for example when + * loading from a J3O file. + * + * @param e importer (not null) + * @throws IOException from importer + */ @Override public void read(JmeImporter e) throws IOException { super.read(e); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java index 1330ae09d6..303060fe3f 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsRigidBody.java @@ -51,29 +51,56 @@ import java.util.logging.Logger; /** - *

PhysicsRigidBody - Basic physics object

+ * A collision object for a rigid body, based on Bullet's btRigidBody. + * * @author normenhansen */ public class PhysicsRigidBody extends PhysicsCollisionObject { + /** + * motion state + */ protected RigidBodyMotionState motionState = new RigidBodyMotionState(); + /** + * copy of mass (>0) of a dynamic body, or 0 for a static body + * (default=1) + */ protected float mass = 1.0f; + /** + * copy of kinematic flag: true→set kinematic mode (spatial controls + * body), false→dynamic/static mode (body controls spatial) + * (default=false) + */ protected boolean kinematic = false; - protected ArrayList joints = new ArrayList(); + /** + * joint list + */ + protected ArrayList joints = new ArrayList(4); + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public PhysicsRigidBody() { } /** - * Creates a new PhysicsRigidBody with the supplied collision shape - * @param child - * @param shape + * Instantiate a dynamic body with mass=1 and the specified collision shape. + * + * @param shape the desired shape (not null, alias created) */ public PhysicsRigidBody(CollisionShape shape) { collisionShape = shape; rebuildRigidBody(); } + /** + * Instantiate a body with the specified collision shape and mass. + * + * @param shape the desired shape (not null, alias created) + * @param mass if 0, a static body is created; otherwise a dynamic body is + * created (≥0) + */ public PhysicsRigidBody(CollisionShape shape, float mass) { collisionShape = shape; this.mass = mass; @@ -81,7 +108,7 @@ public PhysicsRigidBody(CollisionShape shape, float mass) { } /** - * Builds/rebuilds the phyiscs body when parameters have changed + * Build/rebuild this body after parameters have changed. */ protected void rebuildRigidBody() { boolean removed = false; @@ -105,11 +132,17 @@ protected void rebuildRigidBody() { } } + /** + * For use by subclasses. + */ protected void preRebuild() { } private native long createRigidBody(float mass, long motionStateId, long collisionShapeId); + /** + * For use by subclasses. + */ protected void postRebuild() { if (mass == 0.0f) { setStatic(objectId, true); @@ -120,12 +153,19 @@ protected void postRebuild() { } /** - * @return the motionState + * Access this body's motion state. + * + * @return the pre-existing instance */ public RigidBodyMotionState getMotionState() { return motionState; } + /** + * Test whether this body is in a physics space. + * + * @return true→in a space, false→not in a space + */ public boolean isInWorld() { return isInWorld(objectId); } @@ -133,8 +173,9 @@ public boolean isInWorld() { private native boolean isInWorld(long objectId); /** - * Sets the physics object location - * @param location the location of the actual physics object + * Directly alter the location of this body's center of mass. + * + * @param location the desired location (not null, unaffected) */ public void setPhysicsLocation(Vector3f location) { setPhysicsLocation(objectId, location); @@ -143,8 +184,10 @@ public void setPhysicsLocation(Vector3f location) { private native void setPhysicsLocation(long objectId, Vector3f location); /** - * Sets the physics object rotation - * @param rotation the rotation of the actual physics object + * Directly alter this body's orientation. + * + * @param rotation the desired orientation (rotation matrix, not null, + * unaffected) */ public void setPhysicsRotation(Matrix3f rotation) { setPhysicsRotation(objectId, rotation); @@ -153,8 +196,10 @@ public void setPhysicsRotation(Matrix3f rotation) { private native void setPhysicsRotation(long objectId, Matrix3f rotation); /** - * Sets the physics object rotation - * @param rotation the rotation of the actual physics object + * Directly alter this body's orientation. + * + * @param rotation the desired orientation (quaternion, in physics-space + * coordinates, not null, unaffected) */ public void setPhysicsRotation(Quaternion rotation) { setPhysicsRotation(objectId, rotation); @@ -163,7 +208,11 @@ public void setPhysicsRotation(Quaternion rotation) { private native void setPhysicsRotation(long objectId, Quaternion rotation); /** - * @return the physicsLocation + * Copy the location of this body's center of mass. + * + * @param trans storage for the result (modified if not null) + * @return the location (in physics-space coordinates, either the provided + * storage or a new vector, not null) */ public Vector3f getPhysicsLocation(Vector3f trans) { if (trans == null) { @@ -176,7 +225,11 @@ public Vector3f getPhysicsLocation(Vector3f trans) { private native void getPhysicsLocation(long objectId, Vector3f vector); /** - * @return the physicsLocation + * Copy this body's orientation to a quaternion. + * + * @param rot storage for the result (modified if not null) + * @return the orientation (either the provided storage or a new quaternion, + * not null) */ public Quaternion getPhysicsRotation(Quaternion rot) { if (rot == null) { @@ -185,12 +238,23 @@ public Quaternion getPhysicsRotation(Quaternion rot) { getPhysicsRotation(objectId, rot); return rot; } - + + /** + * Alter the principal components of the local inertia tensor. + * + * @param gravity (not null, unaffected) + */ public void setInverseInertiaLocal(Vector3f gravity) { setInverseInertiaLocal(objectId, gravity); } private native void setInverseInertiaLocal(long objectId, Vector3f gravity); - + + /** + * Copy the principal components of the local inverse inertia tensor. + * + * @param trans storage for the result (modified if not null) + * @return a vector (either the provided storage or a new vector, not null) + */ public Vector3f getInverseInertiaLocal(Vector3f trans) { if (trans == null) { trans = new Vector3f(); @@ -204,7 +268,11 @@ public Vector3f getInverseInertiaLocal(Vector3f trans) { private native void getPhysicsRotation(long objectId, Quaternion rot); /** - * @return the physicsLocation + * Copy this body's orientation to a matrix. + * + * @param rot storage for the result (modified if not null) + * @return the orientation (in physics-space coordinates, either the + * provided storage or a new matrix, not null) */ public Matrix3f getPhysicsRotationMatrix(Matrix3f rot) { if (rot == null) { @@ -217,7 +285,9 @@ public Matrix3f getPhysicsRotationMatrix(Matrix3f rot) { private native void getPhysicsRotationMatrix(long objectId, Matrix3f rot); /** - * @return the physicsLocation + * Copy the location of this body's center of mass. + * + * @return a new location vector (not null) */ public Vector3f getPhysicsLocation() { Vector3f vec = new Vector3f(); @@ -226,7 +296,9 @@ public Vector3f getPhysicsLocation() { } /** - * @return the physicsLocation + * Copy this body's orientation to a quaternion. + * + * @return a new quaternion (not null) */ public Quaternion getPhysicsRotation() { Quaternion quat = new Quaternion(); @@ -234,6 +306,11 @@ public Quaternion getPhysicsRotation() { return quat; } + /** + * Copy this body's orientation to a matrix. + * + * @return a new matrix (not null) + */ public Matrix3f getPhysicsRotationMatrix() { Matrix3f mtx = new Matrix3f(); getPhysicsRotationMatrix(objectId, mtx); @@ -264,10 +341,14 @@ public Matrix3f getPhysicsRotationMatrix() { // return Converter.convert(tempTrans.basis, rotation); // } /** - * Sets the node to kinematic mode. in this mode the node is not affected by physics - * but affects other physics objects. Its kinetic force is calculated by the amount - * of movement it is exposed to and its weight. - * @param kinematic + * Put this body into kinematic mode or take it out of kinematic mode. + *

+ * In kinematic mode, the body is not influenced by physics but can affect + * other physics objects. Its kinetic force is calculated based on its + * movement and weight. + * + * @param kinematic true→set kinematic mode, false→set + * dynamic/static mode (default=false) */ public void setKinematic(boolean kinematic) { this.kinematic = kinematic; @@ -276,10 +357,25 @@ public void setKinematic(boolean kinematic) { private native void setKinematic(long objectId, boolean kinematic); + /** + * Test whether this body is in kinematic mode. + *

+ * In kinematic mode, the body is not influenced by physics but can affect + * other physics objects. Its kinetic force is calculated based on its + * movement and weight. + * + * @return true if in kinematic mode, otherwise false (dynamic/static mode) + */ public boolean isKinematic() { return kinematic; } + /** + * Alter the radius of the swept sphere used for continuous collision + * detection (CCD). + * + * @param radius the desired radius (≥0, default=0) + */ public void setCcdSweptSphereRadius(float radius) { setCcdSweptSphereRadius(objectId, radius); } @@ -287,9 +383,14 @@ public void setCcdSweptSphereRadius(float radius) { private native void setCcdSweptSphereRadius(long objectId, float radius); /** - * Sets the amount of motion that has to happen in one physics tick to trigger the continuous motion detection
- * This avoids the problem of fast objects moving through other objects, set to zero to disable (default) - * @param threshold + * Alter the amount of motion required to activate continuous collision + * detection (CCD). + *

+ * This addresses the issue of fast objects passing through other objects + * with no collision detected. + * + * @param threshold the desired threshold velocity (>0) or zero to + * disable CCD (default=0) */ public void setCcdMotionThreshold(float threshold) { setCcdMotionThreshold(objectId, threshold); @@ -297,31 +398,56 @@ public void setCcdMotionThreshold(float threshold) { private native void setCcdMotionThreshold(long objectId, float threshold); + /** + * Read the radius of the swept sphere used for continuous collision + * detection (CCD). + * + * @return radius (≥0) + */ public float getCcdSweptSphereRadius() { return getCcdSweptSphereRadius(objectId); } private native float getCcdSweptSphereRadius(long objectId); + /** + * Calculate this body's continuous collision detection (CCD) motion + * threshold. + * + * @return the threshold velocity (≥0) + */ public float getCcdMotionThreshold() { return getCcdMotionThreshold(objectId); } private native float getCcdMotionThreshold(long objectId); + /** + * Calculate the square of this body's continuous collision detection (CCD) + * motion threshold. + * + * @return the threshold velocity squared (≥0) + */ public float getCcdSquareMotionThreshold() { return getCcdSquareMotionThreshold(objectId); } private native float getCcdSquareMotionThreshold(long objectId); + /** + * Read this body's mass. + * + * @return the mass (>0) or zero for a static body + */ public float getMass() { return mass; } /** - * Sets the mass of this PhysicsRigidBody, objects with mass=0 are static. - * @param mass + * Alter this body's mass. Bodies with mass=0 are static. For dynamic + * bodies, it is best to keep the mass around 1. + * + * @param mass the desired mass (>0) or 0 for a static body (default=1) */ public void setMass(float mass) { this.mass = mass; @@ -344,10 +470,23 @@ public void setMass(float mass) { private native long updateMassProps(long objectId, long collisionShapeId, float mass); + /** + * Copy this body's gravitational acceleration. + * + * @return a new acceleration vector (in physics-space coordinates, not + * null) + */ public Vector3f getGravity() { return getGravity(null); } + /** + * Copy this body's gravitational acceleration. + * + * @param gravity storage for the result (modified if not null) + * @return an acceleration vector (in physics-space coordinates, either the + * provided storage or a new vector, not null) + */ public Vector3f getGravity(Vector3f gravity) { if (gravity == null) { gravity = new Vector3f(); @@ -359,16 +498,23 @@ public Vector3f getGravity(Vector3f gravity) { private native void getGravity(long objectId, Vector3f gravity); /** - * Set the local gravity of this PhysicsRigidBody
- * Set this after adding the node to the PhysicsSpace, - * the PhysicsSpace assigns its current gravity to the physics node when its added. - * @param gravity the gravity vector to set + * Alter this body's gravitational acceleration. + *

+ * Invoke this after adding the body to a PhysicsSpace. Adding a body to a + * PhysicsSpace alters its gravity. + * + * @param gravity the desired acceleration vector (not null, unaffected) */ public void setGravity(Vector3f gravity) { setGravity(objectId, gravity); } private native void setGravity(long objectId, Vector3f gravity); + /** + * Read this body's friction. + * + * @return friction value + */ public float getFriction() { return getFriction(objectId); } @@ -376,8 +522,9 @@ public float getFriction() { private native float getFriction(long objectId); /** - * Sets the friction of this physics object - * @param friction the friction of this physics object + * Alter this body's friction. + * + * @param friction the desired friction value (default=0.5) */ public void setFriction(float friction) { setFriction(objectId, friction); @@ -385,6 +532,12 @@ public void setFriction(float friction) { private native void setFriction(long objectId, float friction); + /** + * Alter this body's damping. + * + * @param linearDamping the desired linear damping value (default=0) + * @param angularDamping the desired angular damping value (default=0) + */ public void setDamping(float linearDamping, float angularDamping) { setDamping(objectId, linearDamping, angularDamping); } @@ -400,27 +553,52 @@ public void setDamping(float linearDamping, float angularDamping) { // // private native void setRestitution(long objectId, float factor); // + /** + * Alter this body's linear damping. + * + * @param linearDamping the desired linear damping value (default=0) + */ public void setLinearDamping(float linearDamping) { setDamping(objectId, linearDamping, getAngularDamping()); } - + + /** + * Alter this body's angular damping. + * + * @param angularDamping the desired angular damping value (default=0) + */ public void setAngularDamping(float angularDamping) { setAngularDamping(objectId, angularDamping); } private native void setAngularDamping(long objectId, float factor); + /** + * Read this body's linear damping. + * + * @return damping value + */ public float getLinearDamping() { return getLinearDamping(objectId); } private native float getLinearDamping(long objectId); + /** + * Read this body's angular damping. + * + * @return damping value + */ public float getAngularDamping() { return getAngularDamping(objectId); } private native float getAngularDamping(long objectId); + /** + * Read this body's restitution (bounciness). + * + * @return restitution value + */ public float getRestitution() { return getRestitution(objectId); } @@ -428,8 +606,10 @@ public float getRestitution() { private native float getRestitution(long objectId); /** - * The "bouncyness" of the PhysicsRigidBody, best performance if restitution=0 - * @param restitution + * Alter this body's restitution (bounciness). For best performance, set + * restitution=0. + * + * @param restitution the desired value (default=0) */ public void setRestitution(float restitution) { setRestitution(objectId, restitution); @@ -438,8 +618,9 @@ public void setRestitution(float restitution) { private native void setRestitution(long objectId, float factor); /** - * Get the current angular velocity of this PhysicsRigidBody - * @return the current linear velocity + * Copy this body's angular velocity. + * + * @return a new velocity vector (in physics-space coordinates, not null) */ public Vector3f getAngularVelocity() { Vector3f vec = new Vector3f(); @@ -450,16 +631,19 @@ public Vector3f getAngularVelocity() { private native void getAngularVelocity(long objectId, Vector3f vec); /** - * Get the current angular velocity of this PhysicsRigidBody - * @param vec the vector to store the velocity in + * Copy this body's angular velocity. + * + * @param vec storage for the result (in physics-space coordinates, not + * null, modified) */ public void getAngularVelocity(Vector3f vec) { getAngularVelocity(objectId, vec); } /** - * Sets the angular velocity of this PhysicsRigidBody - * @param vec the angular velocity of this PhysicsRigidBody + * Alter this body's angular velocity. + * + * @param vec the desired angular velocity vector (not null, unaffected) */ public void setAngularVelocity(Vector3f vec) { setAngularVelocity(objectId, vec); @@ -469,8 +653,9 @@ public void setAngularVelocity(Vector3f vec) { private native void setAngularVelocity(long objectId, Vector3f vec); /** - * Get the current linear velocity of this PhysicsRigidBody - * @return the current linear velocity + * Copy the linear velocity of this body's center of mass. + * + * @return a new velocity vector (in physics-space coordinates, not null) */ public Vector3f getLinearVelocity() { Vector3f vec = new Vector3f(); @@ -481,16 +666,19 @@ public Vector3f getLinearVelocity() { private native void getLinearVelocity(long objectId, Vector3f vec); /** - * Get the current linear velocity of this PhysicsRigidBody - * @param vec the vector to store the velocity in + * Copy the linear velocity of this body's center of mass. + * + * @param vec storage for the result (in physics-space coordinates, not + * null, modified) */ public void getLinearVelocity(Vector3f vec) { getLinearVelocity(objectId, vec); } /** - * Sets the linear velocity of this PhysicsRigidBody - * @param vec the linear velocity of this PhysicsRigidBody + * Alter the linear velocity of this body's center of mass. + * + * @param vec the desired velocity vector (not null) */ public void setLinearVelocity(Vector3f vec) { setLinearVelocity(objectId, vec); @@ -500,10 +688,13 @@ public void setLinearVelocity(Vector3f vec) { private native void setLinearVelocity(long objectId, Vector3f vec); /** - * Apply a force to the PhysicsRigidBody, only applies force if the next physics update call - * updates the physics space.
- * To apply an impulse, use applyImpulse, use applyContinuousForce to apply continuous force. - * @param force the force + * Apply a force to the PhysicsRigidBody. Effective only if the next physics + * update steps the physics space. + *

+ * To apply an impulse, use applyImpulse, use applyContinuousForce to apply + * continuous force. + * + * @param force the force (not null, unaffected) * @param location the location of the force */ public void applyForce(Vector3f force, Vector3f location) { @@ -514,11 +705,13 @@ public void applyForce(Vector3f force, Vector3f location) { private native void applyForce(long objectId, Vector3f force, Vector3f location); /** - * Apply a force to the PhysicsRigidBody, only applies force if the next physics update call - * updates the physics space.
- * To apply an impulse, use applyImpulse. - * - * @param force the force + * Apply a force to the PhysicsRigidBody. Effective only if the next physics + * update steps the physics space. + *

+ * To apply an impulse, use + * {@link #applyImpulse(com.jme3.math.Vector3f, com.jme3.math.Vector3f)}. + * + * @param force the force (not null, unaffected) */ public void applyCentralForce(Vector3f force) { applyCentralForce(objectId, force); @@ -528,11 +721,13 @@ public void applyCentralForce(Vector3f force) { private native void applyCentralForce(long objectId, Vector3f force); /** - * Apply a force to the PhysicsRigidBody, only applies force if the next physics update call - * updates the physics space.
- * To apply an impulse, use applyImpulse. - * - * @param torque the torque + * Apply a force to the PhysicsRigidBody. Effective only if the next physics + * update steps the physics space. + *

+ * To apply an impulse, use + * {@link #applyImpulse(com.jme3.math.Vector3f, com.jme3.math.Vector3f)}. + * + * @param torque the torque (not null, unaffected) */ public void applyTorque(Vector3f torque) { applyTorque(objectId, torque); @@ -542,9 +737,10 @@ public void applyTorque(Vector3f torque) { private native void applyTorque(long objectId, Vector3f vec); /** - * Apply an impulse to the PhysicsRigidBody in the next physics update. - * @param impulse applied impulse - * @param rel_pos location relative to object + * Apply an impulse to the body the next physics update. + * + * @param impulse applied impulse (not null, unaffected) + * @param rel_pos location relative to object (not null, unaffected) */ public void applyImpulse(Vector3f impulse, Vector3f rel_pos) { applyImpulse(objectId, impulse, rel_pos); @@ -554,8 +750,9 @@ public void applyImpulse(Vector3f impulse, Vector3f rel_pos) { private native void applyImpulse(long objectId, Vector3f impulse, Vector3f rel_pos); /** - * Apply a torque impulse to the PhysicsRigidBody in the next physics update. - * @param vec + * Apply a torque impulse to the body in the next physics update. + * + * @param vec the torque to apply */ public void applyTorqueImpulse(Vector3f vec) { applyTorqueImpulse(objectId, vec); @@ -565,8 +762,7 @@ public void applyTorqueImpulse(Vector3f vec) { private native void applyTorqueImpulse(long objectId, Vector3f vec); /** - * Clear all forces from the PhysicsRigidBody - * + * Clear all forces acting on this body. */ public void clearForces() { clearForces(objectId); @@ -574,6 +770,14 @@ public void clearForces() { private native void clearForces(long objectId); + /** + * Apply the specified CollisionShape to this body. + *

+ * Note that the body should not be in any physics space while changing + * shape; the body gets rebuilt on the physics side. + * + * @param collisionShape the shape to apply (not null, alias created) + */ public void setCollisionShape(CollisionShape collisionShape) { super.setCollisionShape(collisionShape); if (collisionShape instanceof MeshCollisionShape && mass != 0) { @@ -590,7 +794,7 @@ public void setCollisionShape(CollisionShape collisionShape) { private native void setCollisionShape(long objectId, long collisionShapeId); /** - * reactivates this PhysicsRigidBody when it has been deactivated because it was not moving + * Reactivates this body if it has been deactivated due to lack of motion. */ public void activate() { activate(objectId); @@ -598,6 +802,11 @@ public void activate() { private native void activate(long objectId); + /** + * Test whether this body has been deactivated due to lack of motion. + * + * @return true if still active, false if deactivated + */ public boolean isActive() { return isActive(objectId); } @@ -605,10 +814,13 @@ public boolean isActive() { private native boolean isActive(long objectId); /** - * sets the sleeping thresholds, these define when the object gets deactivated - * to save ressources. Low values keep the object active when it barely moves - * @param linear the linear sleeping threshold - * @param angular the angular sleeping threshold + * Alter this body's sleeping thresholds. + *

+ * These thresholds determine when the body can be deactivated to save + * resources. Low values keep the body active when it barely moves. + * + * @param linear the desired linear sleeping threshold (≥0, default=0.8) + * @param angular the desired angular sleeping threshold (≥0, default=1) */ public void setSleepingThresholds(float linear, float angular) { setSleepingThresholds(objectId, linear, angular); @@ -616,36 +828,68 @@ public void setSleepingThresholds(float linear, float angular) { private native void setSleepingThresholds(long objectId, float linear, float angular); + /** + * Alter this body's linear sleeping threshold. + * + * @param linearSleepingThreshold the desired threshold (≥0, default=0.8) + */ public void setLinearSleepingThreshold(float linearSleepingThreshold) { setLinearSleepingThreshold(objectId, linearSleepingThreshold); } private native void setLinearSleepingThreshold(long objectId, float linearSleepingThreshold); + /** + * Alter this body's angular sleeping threshold. + * + * @param angularSleepingThreshold the desired threshold (≥0, default=1) + */ public void setAngularSleepingThreshold(float angularSleepingThreshold) { setAngularSleepingThreshold(objectId, angularSleepingThreshold); } private native void setAngularSleepingThreshold(long objectId, float angularSleepingThreshold); + /** + * Read this body's linear sleeping threshold. + * + * @return the linear sleeping threshold (≥0) + */ public float getLinearSleepingThreshold() { return getLinearSleepingThreshold(objectId); } private native float getLinearSleepingThreshold(long objectId); + /** + * Read this body's angular sleeping threshold. + * + * @return the angular sleeping threshold (≥0) + */ public float getAngularSleepingThreshold() { return getAngularSleepingThreshold(objectId); } private native float getAngularSleepingThreshold(long objectId); + /** + * Read this body's angular factor for the X axis. + * + * @return the angular factor + */ public float getAngularFactor() { return getAngularFactor(null).getX(); } + /** + * Copy this body's angular factors. + * + * @param store storage for the result (modified if not null) + * @return the angular factor for each axis (either the provided storage or + * new vector, not null) + */ public Vector3f getAngularFactor(Vector3f store) { - // doing like this prevent from breaking the API + // Done this way to prevent breaking the API. if (store == null) { store = new Vector3f(); } @@ -655,16 +899,33 @@ public Vector3f getAngularFactor(Vector3f store) { private native void getAngularFactor(long objectId, Vector3f vec); + /** + * Alter this body's angular factor. + * + * @param factor the desired angular factor for all axes (not null, + * unaffected, default=1) + */ public void setAngularFactor(float factor) { setAngularFactor(objectId, new Vector3f(factor, factor, factor)); } + /** + * Alter this body's angular factors. + * + * @param factor the desired angular factor for each axis (not null, + * unaffected, default=(1,1,1)) + */ public void setAngularFactor(Vector3f factor) { setAngularFactor(objectId, factor); } private native void setAngularFactor(long objectId, Vector3f factor); + /** + * Copy this body's linear factors. + * + * @return the linear factor for each axis (not null) + */ public Vector3f getLinearFactor() { Vector3f vec = new Vector3f(); getLinearFactor(objectId, vec); @@ -673,6 +934,12 @@ public Vector3f getLinearFactor() { private native void getLinearFactor(long objectId, Vector3f vec); + /** + * Alter this body's linear factors. + * + * @param factor the desired linear factor for each axis (not null, + * unaffected, default=(1,1,1)) + */ public void setLinearFactor(Vector3f factor) { setLinearFactor(objectId, factor); } @@ -681,7 +948,9 @@ public void setLinearFactor(Vector3f factor) { /** - * do not use manually, joints are added automatically + * Do not invoke directly! Joints are added automatically when created. + * + * @param joint the joint to add (not null) */ public void addJoint(PhysicsJoint joint) { if (!joints.contains(joint)) { @@ -690,21 +959,32 @@ public void addJoint(PhysicsJoint joint) { } /** - * + * Do not invoke directly! Joints are removed automatically when destroyed. + * + * @param joint the joint to remove (not null) */ public void removeJoint(PhysicsJoint joint) { joints.remove(joint); } /** - * Returns a list of connected joints. This list is only filled when - * the PhysicsRigidBody is actually added to the physics space or loaded from disk. - * @return list of active joints connected to this PhysicsRigidBody + * Access the list of joints connected with this body. + *

+ * This list is only filled when the PhysicsRigidBody is added to a physics + * space. + * + * @return the pre-existing list (not null) */ public List getJoints() { return joints; } + /** + * Serialize this body, for example when saving to a J3O file. + * + * @param e exporter (not null) + * @throws IOException from exporter + */ @Override public void write(JmeExporter e) throws IOException { super.write(e); @@ -738,6 +1018,12 @@ public void write(JmeExporter e) throws IOException { capsule.writeSavableArrayList(joints, "joints", null); } + /** + * De-serialize this body, for example when loading from a J3O file. + * + * @param e importer (not null) + * @throws IOException from importer + */ @Override public void read(JmeImporter e) throws IOException { super.read(e); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.java b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.java index d18fd04015..541f68281a 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/objects/PhysicsVehicle.java @@ -46,34 +46,68 @@ import java.util.logging.Logger; /** - *

PhysicsVehicleNode - Special PhysicsNode that implements vehicle functions

+ * A collision object for simplified vehicle simulation based on Bullet's + * btRaycastVehicle. *

- * From bullet manual:
- * For most vehicle simulations, it is recommended to use the simplified Bullet - * vehicle model as provided in btRaycastVehicle. Instead of simulation each wheel - * and chassis as separate rigid bodies, connected by constraints, it uses a simplified model. - * This simplified model has many benefits, and is widely used in commercial driving games.
- * The entire vehicle is represented as a single rigidbody, the chassis. - * The collision detection of the wheels is approximated by ray casts, - * and the tire friction is a basic anisotropic friction model. - *

+ * From Bullet manual:
+ * For arcade style vehicle simulations, it is recommended to use the simplified + * Bullet vehicle model as provided in btRaycastVehicle. Instead of simulation + * each wheel and chassis as separate rigid bodies, connected by constraints, it + * uses a simplified model. This simplified model has many benefits, and is + * widely used in commercial driving games. + *

+ * The entire vehicle is represented as a single rigidbody, the chassis. The + * collision detection of the wheels is approximated by ray casts, and the tire + * friction is a basic anisotropic friction model. + * * @author normenhansen */ public class PhysicsVehicle extends PhysicsRigidBody { + /** + * Unique identifier of the btRaycastVehicle. The constructor sets this to a + * non-zero value. + */ protected long vehicleId = 0; + /** + * Unique identifier of the ray caster. + */ protected long rayCasterId = 0; + /** + * tuning parameters applied when a wheel is created + */ protected VehicleTuning tuning = new VehicleTuning(); + /** + * list of wheels + */ protected ArrayList wheels = new ArrayList(); + /** + * physics space where this vehicle is added, or null if none + */ protected PhysicsSpace physicsSpace; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public PhysicsVehicle() { } + /** + * Instantiate a vehicle with the specified collision shape and mass=1. + * + * @param shape the desired shape (not null, alias created) + */ public PhysicsVehicle(CollisionShape shape) { super(shape); } + /** + * Instantiate a vehicle with the specified collision shape and mass. + * + * @param shape the desired shape (not null, alias created) + * @param mass (>0) + */ public PhysicsVehicle(CollisionShape shape, float mass) { super(shape, mass); } @@ -111,7 +145,10 @@ protected void postRebuild() { } /** - * Used internally, creates the actual vehicle constraint when vehicle is added to phyicsspace + * Used internally, creates the actual vehicle constraint when vehicle is + * added to physics space. + * + * @param space which physics space */ public void createVehicle(PhysicsSpace space) { physicsSpace = space; @@ -145,14 +182,20 @@ public void createVehicle(PhysicsSpace space) { private native int addWheel(long objectId, Vector3f location, Vector3f direction, Vector3f axle, float restLength, float radius, VehicleTuning tuning, boolean frontWheel); /** - * Add a wheel to this vehicle - * @param connectionPoint The starting point of the ray, where the suspension connects to the chassis (chassis space) - * @param direction the direction of the wheel (should be -Y / 0,-1,0 for a normal car) - * @param axle The axis of the wheel, pointing right in vehicle direction (should be -X / -1,0,0 for a normal car) - * @param suspensionRestLength The current length of the suspension (metres) - * @param wheelRadius the wheel radius - * @param isFrontWheel sets if this wheel is a front wheel (steering) - * @return the PhysicsVehicleWheel object to get/set infos on the wheel + * Add a wheel to this vehicle. + * + * @param connectionPoint the location where the suspension connects to the + * chassis (in chassis coordinates, not null, unaffected) + * @param direction the suspension direction (in chassis coordinates, not + * null, unaffected, typically down/0,-1,0) + * @param axle the axis direction (in chassis coordinates, not null, + * unaffected, typically -1,0,0) + * @param suspensionRestLength the rest length of the suspension (in + * physics-space units) + * @param wheelRadius the wheel radius (in physics-space units, >0) + * @param isFrontWheel true→front (steering) wheel, + * false→non-front wheel + * @return a new VehicleWheel for access (not null) */ public VehicleWheel addWheel(Vector3f connectionPoint, Vector3f direction, Vector3f axle, float suspensionRestLength, float wheelRadius, boolean isFrontWheel) { return addWheel(null, connectionPoint, direction, axle, suspensionRestLength, wheelRadius, isFrontWheel); @@ -160,14 +203,20 @@ public VehicleWheel addWheel(Vector3f connectionPoint, Vector3f direction, Vecto /** * Add a wheel to this vehicle - * @param spat the wheel Geometry - * @param connectionPoint The starting point of the ray, where the suspension connects to the chassis (chassis space) - * @param direction the direction of the wheel (should be -Y / 0,-1,0 for a normal car) - * @param axle The axis of the wheel, pointing right in vehicle direction (should be -X / -1,0,0 for a normal car) - * @param suspensionRestLength The current length of the suspension (metres) - * @param wheelRadius the wheel radius - * @param isFrontWheel sets if this wheel is a front wheel (steering) - * @return the PhysicsVehicleWheel object to get/set infos on the wheel + * + * @param spat the associated spatial, or null if none + * @param connectionPoint the location where the suspension connects to the + * chassis (in chassis coordinates, not null, unaffected) + * @param direction the suspension direction (in chassis coordinates, not + * null, unaffected, typically down/0,-1,0) + * @param axle the axis direction (in chassis coordinates, not null, + * unaffected, typically -1,0,0) + * @param suspensionRestLength the rest length of the suspension (in + * physics-space units) + * @param wheelRadius the wheel radius (in physics-space units, >0) + * @param isFrontWheel true→front (steering) wheel, + * false→non-front wheel + * @return a new VehicleWheel for access (not null) */ public VehicleWheel addWheel(Spatial spat, Vector3f connectionPoint, Vector3f direction, Vector3f axle, float suspensionRestLength, float wheelRadius, boolean isFrontWheel) { VehicleWheel wheel = null; @@ -190,8 +239,9 @@ public VehicleWheel addWheel(Spatial spat, Vector3f connectionPoint, Vector3f di } /** - * This rebuilds the vehicle as there is no way in bullet to remove a wheel. - * @param wheel + * Remove a wheel. + * + * @param wheel the index of the wheel to remove (≥0) */ public void removeWheel(int wheel) { wheels.remove(wheel); @@ -200,195 +250,276 @@ public void removeWheel(int wheel) { } /** - * You can get access to the single wheels via this method. - * @param wheel the wheel index - * @return the WheelInfo of the selected wheel + * Access the indexed wheel of this vehicle. + * + * @param wheel the index of the wheel to access (≥0, <count) + * @return the pre-existing instance */ public VehicleWheel getWheel(int wheel) { return wheels.get(wheel); } + /** + * Read the number of wheels on this vehicle. + * + * @return count (≥0) + */ public int getNumWheels() { return wheels.size(); } /** - * @return the frictionSlip + * Read the initial friction for new wheels. + * + * @return the coefficient of friction between tyre and ground + * (0.8→realistic car, 10000→kart racer) */ public float getFrictionSlip() { return tuning.frictionSlip; } /** - * Use before adding wheels, this is the default used when adding wheels. - * After adding the wheel, use direct wheel access.
- * The coefficient of friction between the tyre and the ground. - * Should be about 0.8 for realistic cars, but can increased for better handling. - * Set large (10000.0) for kart racers - * @param frictionSlip the frictionSlip to set + * Alter the initial friction for new wheels. Effective only before adding + * wheels. After adding a wheel, use {@link #setFrictionSlip(int, float)}. + *

+ * For better handling, increase the friction. + * + * @param frictionSlip the desired coefficient of friction between tyre and + * ground (0.8→realistic car, 10000→kart racer, default=10.5) */ public void setFrictionSlip(float frictionSlip) { tuning.frictionSlip = frictionSlip; } /** - * The coefficient of friction between the tyre and the ground. - * Should be about 0.8 for realistic cars, but can increased for better handling. - * Set large (10000.0) for kart racers - * @param wheel - * @param frictionSlip + * Alter the friction of the indexed wheel. + *

+ * For better handling, increase the friction. + * + * @param wheel the index of the wheel to modify (≥0) + * @param frictionSlip the desired coefficient of friction between tyre and + * ground (0.8→realistic car, 10000→kart racer) */ public void setFrictionSlip(int wheel, float frictionSlip) { wheels.get(wheel).setFrictionSlip(frictionSlip); } /** - * Reduces the rolling torque applied from the wheels that cause the vehicle to roll over. - * This is a bit of a hack, but it's quite effective. 0.0 = no roll, 1.0 = physical behaviour. - * If m_frictionSlip is too high, you'll need to reduce this to stop the vehicle rolling over. - * You should also try lowering the vehicle's centre of mass + * Alter the roll influence of the indexed wheel. + *

+ * The roll-influence factor reduces (or magnifies) any torque contributed + * by the wheel that would tend to cause the vehicle to roll over. This is a + * bit of a hack, but it's quite effective. + *

+ * If the friction between the tyres and the ground is too high, you may + * reduce this factor to prevent the vehicle from rolling over. You should + * also try lowering the vehicle's center of mass. + * + * @param wheel the index of the wheel to modify (≥0) + * @param rollInfluence the desired roll-influence factor (0→no roll + * torque, 1→realistic behavior, default=1) */ public void setRollInfluence(int wheel, float rollInfluence) { wheels.get(wheel).setRollInfluence(rollInfluence); } /** - * @return the maxSuspensionTravelCm + * Read the initial maximum suspension travel distance for new wheels. + * + * @return the maximum distance the suspension can be compressed (in + * centimeters) */ public float getMaxSuspensionTravelCm() { return tuning.maxSuspensionTravelCm; } /** - * Use before adding wheels, this is the default used when adding wheels. - * After adding the wheel, use direct wheel access.
- * The maximum distance the suspension can be compressed (centimetres) - * @param maxSuspensionTravelCm the maxSuspensionTravelCm to set + * Alter the initial maximum suspension travel distance for new wheels. + * Effective only before adding wheels. After adding a wheel, use + * {@link #setMaxSuspensionTravelCm(int, float)}. + * + * @param maxSuspensionTravelCm the desired maximum distance the suspension + * can be compressed (in centimeters, default=500) */ public void setMaxSuspensionTravelCm(float maxSuspensionTravelCm) { tuning.maxSuspensionTravelCm = maxSuspensionTravelCm; } /** - * The maximum distance the suspension can be compressed (centimetres) - * @param wheel - * @param maxSuspensionTravelCm + * Alter the maximum suspension travel distance for the indexed wheel. + * + * @param wheel the index of the wheel to modify (≥0) + * @param maxSuspensionTravelCm the desired maximum distance the suspension + * can be compressed (in centimeters) */ public void setMaxSuspensionTravelCm(int wheel, float maxSuspensionTravelCm) { wheels.get(wheel).setMaxSuspensionTravelCm(maxSuspensionTravelCm); } + /** + * Read the initial maximum suspension force for new wheels. + * + * @return the maximum force per wheel + */ public float getMaxSuspensionForce() { return tuning.maxSuspensionForce; } /** - * This value caps the maximum suspension force, raise this above the default 6000 if your suspension cannot - * handle the weight of your vehicle. - * @param maxSuspensionForce + * Alter the initial maximum suspension force for new wheels. Effective only + * before adding wheels. After adding a wheel, use + * {@link #setMaxSuspensionForce(int, float)}. + *

+ * If the suspension cannot handle the vehicle's weight, increase this + * limit. + * + * @param maxSuspensionForce the desired maximum force per wheel + * (default=6000) */ public void setMaxSuspensionForce(float maxSuspensionForce) { tuning.maxSuspensionForce = maxSuspensionForce; } /** - * This value caps the maximum suspension force, raise this above the default 6000 if your suspension cannot - * handle the weight of your vehicle. - * @param wheel - * @param maxSuspensionForce + * Alter the maximum suspension force for the specified wheel. + *

+ * If the suspension cannot handle the vehicle's weight, increase this + * limit. + * + * @param wheel the index of the wheel to modify (≥0) + * @param maxSuspensionForce the desired maximum force per wheel + * (default=6000) */ public void setMaxSuspensionForce(int wheel, float maxSuspensionForce) { wheels.get(wheel).setMaxSuspensionForce(maxSuspensionForce); } /** - * @return the suspensionCompression + * Read the initial damping (when the suspension is compressed) for new + * wheels. + * + * @return the damping coefficient */ public float getSuspensionCompression() { return tuning.suspensionCompression; } /** - * Use before adding wheels, this is the default used when adding wheels. - * After adding the wheel, use direct wheel access.
- * The damping coefficient for when the suspension is compressed. - * Set to k * 2.0 * FastMath.sqrt(m_suspensionStiffness) so k is proportional to critical damping.
- * k = 0.0 undamped & bouncy, k = 1.0 critical damping
- * 0.1 to 0.3 are good values - * @param suspensionCompression the suspensionCompression to set + * Alter the initial damping (when the suspension is compressed) for new + * wheels. Effective only before adding wheels. After adding a wheel, use + * {@link #setSuspensionCompression(int, float)}. + *

+ * Set to k * 2 * FastMath.sqrt(m_suspensionStiffness) where k is the + * damping ratio: + *

+ * k = 0.0 undamped and bouncy, k = 1.0 critical damping, k between 0.1 and + * 0.3 are good values + * + * @param suspensionCompression the desired damping coefficient + * (default=0.83) */ public void setSuspensionCompression(float suspensionCompression) { tuning.suspensionCompression = suspensionCompression; } /** - * The damping coefficient for when the suspension is compressed. - * Set to k * 2.0 * FastMath.sqrt(m_suspensionStiffness) so k is proportional to critical damping.
- * k = 0.0 undamped & bouncy, k = 1.0 critical damping
- * 0.1 to 0.3 are good values - * @param wheel - * @param suspensionCompression + * Alter the damping (when the suspension is compressed) for the indexed + * wheel. + *

+ * Set to k * 2 * FastMath.sqrt(m_suspensionStiffness) where k is the + * damping ratio: + *

+ * k = 0.0 undamped and bouncy, k = 1.0 critical damping, k between 0.1 and + * 0.3 are good values + * + * @param wheel the index of the wheel to modify (≥0) + * @param suspensionCompression the desired damping coefficient */ public void setSuspensionCompression(int wheel, float suspensionCompression) { wheels.get(wheel).setWheelsDampingCompression(suspensionCompression); } /** - * @return the suspensionDamping + * Read the initial damping (when the suspension is expanded) for new + * wheels. + * + * @return the damping coefficient */ public float getSuspensionDamping() { return tuning.suspensionDamping; } /** - * Use before adding wheels, this is the default used when adding wheels. - * After adding the wheel, use direct wheel access.
- * The damping coefficient for when the suspension is expanding. - * See the comments for setSuspensionCompression for how to set k. - * @param suspensionDamping the suspensionDamping to set + * Alter the initial damping (when the suspension is expanded) for new + * wheels. Effective only before adding wheels. After adding a wheel, use + * {@link #setSuspensionCompression(int, float)}. + *

+ * Set to k * 2 * FastMath.sqrt(m_suspensionStiffness) where k is the + * damping ratio: + *

+ * k = 0.0 undamped and bouncy, k = 1.0 critical damping, k between 0.1 and + * 0.3 are good values + * + * @param suspensionDamping the desired damping coefficient (default=0.88) */ public void setSuspensionDamping(float suspensionDamping) { tuning.suspensionDamping = suspensionDamping; } /** - * The damping coefficient for when the suspension is expanding. - * See the comments for setSuspensionCompression for how to set k. - * @param wheel - * @param suspensionDamping + * Alter the damping (when the suspension is expanded) for the indexed + * wheel. + *

+ * Set to k * 2 * FastMath.sqrt(m_suspensionStiffness) where k is the + * damping ratio: + *

+ * k = 0.0 undamped and bouncy, k = 1.0 critical damping, k between 0.1 and + * 0.3 are good values + * + * @param wheel the index of the wheel to modify (≥0) + * @param suspensionDamping the desired damping coefficient */ public void setSuspensionDamping(int wheel, float suspensionDamping) { wheels.get(wheel).setWheelsDampingRelaxation(suspensionDamping); } /** - * @return the suspensionStiffness + * Read the initial suspension stiffness for new wheels. + * + * @return the stiffness constant (10→off-road buggy, 50→sports + * car, 200→Formula-1 race car) */ public float getSuspensionStiffness() { return tuning.suspensionStiffness; } /** - * Use before adding wheels, this is the default used when adding wheels. - * After adding the wheel, use direct wheel access.
- * The stiffness constant for the suspension. 10.0 - Offroad buggy, 50.0 - Sports car, 200.0 - F1 Car - * @param suspensionStiffness + * Alter the initial suspension stiffness for new wheels. Effective only + * before adding wheels. After adding a wheel, use + * {@link #setSuspensionStiffness(int, float)}. + * + * @param suspensionStiffness the desired stiffness coefficient + * (10→off-road buggy, 50→sports car, 200→Formula-1 race car, + * default=5.88) */ public void setSuspensionStiffness(float suspensionStiffness) { tuning.suspensionStiffness = suspensionStiffness; } /** - * The stiffness constant for the suspension. 10.0 - Offroad buggy, 50.0 - Sports car, 200.0 - F1 Car - * @param wheel - * @param suspensionStiffness + * Alter the suspension stiffness of the indexed wheel. + * + * @param wheel the index of the wheel to modify (≥0) + * @param suspensionStiffness the desired stiffness coefficient + * (10→off-road buggy, 50→sports car, 200→Formula-1 race car, + * default=5.88) */ public void setSuspensionStiffness(int wheel, float suspensionStiffness) { wheels.get(wheel).setSuspensionStiffness(suspensionStiffness); } /** - * Reset the suspension + * Reset this vehicle's suspension. */ public void resetSuspension() { resetSuspension(vehicleId); @@ -397,8 +528,9 @@ public void resetSuspension() { private native void resetSuspension(long vehicleId); /** - * Apply the given engine force to all wheels, works continuously - * @param force the force + * Apply the specified engine force to all wheels. Works continuously. + * + * @param force the desired amount of force */ public void accelerate(float force) { for (int i = 0; i < wheels.size(); i++) { @@ -407,9 +539,10 @@ public void accelerate(float force) { } /** - * Apply the given engine force, works continuously - * @param wheel the wheel to apply the force on - * @param force the force + * Apply the given engine force to the indexed wheel. Works continuously. + * + * @param wheel the index of the wheel to apply the force to (≥0) + * @param force the desired amount of force */ public void accelerate(int wheel, float force) { applyEngineForce(vehicleId, wheel, force); @@ -419,8 +552,9 @@ public void accelerate(int wheel, float force) { private native void applyEngineForce(long vehicleId, int wheel, float force); /** - * Set the given steering value to all front wheels (0 = forward) - * @param value the steering angle of the front wheels (Pi = 360deg) + * Alter the steering angle of all front wheels. + * + * @param value the desired steering angle (in radians, 0=straight) */ public void steer(float value) { for (int i = 0; i < wheels.size(); i++) { @@ -431,9 +565,10 @@ public void steer(float value) { } /** - * Set the given steering value to the given wheel (0 = forward) - * @param wheel the wheel to set the steering on - * @param value the steering angle of the front wheels (Pi = 360deg) + * Alter the steering angle of the indexed wheel. + * + * @param wheel the index of the wheel to steer (≥0) + * @param value the desired steering angle (in radians, 0=straight) */ public void steer(int wheel, float value) { steer(vehicleId, wheel, value); @@ -442,8 +577,9 @@ public void steer(int wheel, float value) { private native void steer(long vehicleId, int wheel, float value); /** - * Apply the given brake force to all wheels, works continuously - * @param force the force + * Apply the given brake force to all wheels. Works continuously. + * + * @param force the desired amount of force */ public void brake(float force) { for (int i = 0; i < wheels.size(); i++) { @@ -452,9 +588,10 @@ public void brake(float force) { } /** - * Apply the given brake force, works continuously - * @param wheel the wheel to apply the force on - * @param force the force + * Apply the given brake force to the indexed wheel. Works continuously. + * + * @param wheel the index of the wheel to apply the force to (≥0) + * @param force the desired amount of force */ public void brake(int wheel, float force) { brake(vehicleId, wheel, force); @@ -463,8 +600,9 @@ public void brake(int wheel, float force) { private native void brake(long vehicleId, int wheel, float force); /** - * Get the current speed of the vehicle in km/h - * @return + * Read the vehicle's speed in km/h. + * + * @return speed (in kilometers per hour) */ public float getCurrentVehicleSpeedKmHour() { return getCurrentVehicleSpeedKmHour(vehicleId); @@ -473,9 +611,11 @@ public float getCurrentVehicleSpeedKmHour() { private native float getCurrentVehicleSpeedKmHour(long vehicleId); /** - * Get the current forward vector of the vehicle in world coordinates - * @param vector - * @return + * Copy the vehicle's forward direction. + * + * @param vector storage for the result (modified if not null) + * @return a direction vector (in physics-space coordinates, either the + * provided storage or a new vector, not null) */ public Vector3f getForwardVector(Vector3f vector) { if (vector == null) { @@ -489,11 +629,19 @@ public Vector3f getForwardVector(Vector3f vector) { /** * used internally + * + * @return the unique identifier */ public long getVehicleId() { return vehicleId; } + /** + * De-serialize this vehicle, 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 capsule = im.getCapsule(this); @@ -509,6 +657,12 @@ public void read(JmeImporter im) throws IOException { super.read(im); } + /** + * Serialize this vehicle, 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 capsule = ex.getCapsule(this); @@ -522,6 +676,12 @@ public void write(JmeExporter ex) throws IOException { super.write(ex); } + /** + * Finalize this vehicle just before it is destroyed. Should be invoked only + * by a subclass or by the garbage collector. + * + * @throws Throwable ignored by the garbage collector + */ @Override protected void finalize() throws Throwable { super.finalize(); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/objects/VehicleWheel.java b/jme3-bullet/src/main/java/com/jme3/bullet/objects/VehicleWheel.java index 1c7820907e..25fa2c1030 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/objects/VehicleWheel.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/objects/VehicleWheel.java @@ -40,42 +40,142 @@ import java.io.IOException; /** - * Stores info about one wheel of a PhysicsVehicle + * Information about one wheel of a PhysicsVehicle. + * * @author normenhansen */ public class VehicleWheel implements Savable { + /** + * unique identifier of the btRaycastVehicle + */ protected long wheelId = 0; + /** + * 0-origin index among the vehicle's wheels (≥0) + */ protected int wheelIndex = 0; + /** + * copy of wheel type: true→front (steering) wheel, + * false→non-front wheel + */ protected boolean frontWheel; + /** + * location where the suspension connects to the chassis (in chassis + * coordinates) + */ protected Vector3f location = new Vector3f(); + /** + * suspension direction (in chassis coordinates, typically down/0,-1,0) + */ protected Vector3f direction = new Vector3f(); + /** + * axis direction (in chassis coordinates, typically to the right/-1,0,0) + */ protected Vector3f axle = new Vector3f(); + /** + * copy of suspension stiffness constant (10→off-road buggy, + * 50→sports car, 200→Formula-1 race car, default=20) + */ protected float suspensionStiffness = 20.0f; + /** + * copy of suspension damping when expanded (0→no damping, default=2.3) + */ protected float wheelsDampingRelaxation = 2.3f; + /** + * copy of suspension damping when compressed (0→no damping, + * default=4.4) + */ protected float wheelsDampingCompression = 4.4f; + /** + * copy of coefficient of friction between tyre and ground + * (0.8→realistic car, 10000→kart racer, default=10.5) + */ protected float frictionSlip = 10.5f; + /** + * copy of roll-influence factor (0→no roll torque, 1→realistic + * behavior, default=1) + */ protected float rollInfluence = 1.0f; + /** + * copy of maximum suspension travel distance (in centimeters, default=500) + */ protected float maxSuspensionTravelCm = 500f; + /** + * copy of maximum force exerted by the suspension (default=6000) + */ protected float maxSuspensionForce = 6000f; + /** + * copy of wheel radius (in physics-space units, >0) + */ protected float radius = 0.5f; + /** + * copy of rest length of the suspension (in physics-space units) + */ protected float restLength = 1f; + /** + * wheel location in physics-space coordinates + */ protected Vector3f wheelWorldLocation = new Vector3f(); + /** + * wheel orientation in physics-space coordinates + */ protected Quaternion wheelWorldRotation = new Quaternion(); + /** + * associated spatial, or null if none + */ protected Spatial wheelSpatial; protected Matrix3f tmp_Matrix = new com.jme3.math.Matrix3f(); protected final Quaternion tmp_inverseWorldRotation = new Quaternion(); + /** + * true → physics coordinates match local transform, false → + * physics coordinates match world transform + */ private boolean applyLocal = false; + /** + * No-argument constructor needed by SavableClassUtil. Do not invoke + * directly! + */ public VehicleWheel() { } + /** + * Instantiate a wheel. + * + * @param spat the associated spatial, or null if none + * @param location the location where the suspension connects to the chassis + * (in chassis coordinates, not null, unaffected) + * @param direction the suspension direction (in chassis coordinates, not + * null, unaffected, typically down/0,-1,0) + * @param axle the axis direction (in chassis coordinates, not null, + * unaffected, typically right/-1,0,0) + * @param restLength the rest length of the suspension (in physics-space + * units) + * @param radius the wheel's radius (in physics-space units, ≥0) + * @param frontWheel true→front (steering) wheel, false→non-front + * wheel + */ public VehicleWheel(Spatial spat, Vector3f location, Vector3f direction, Vector3f axle, float restLength, float radius, boolean frontWheel) { this(location, direction, axle, restLength, radius, frontWheel); wheelSpatial = spat; } + /** + * Instantiate a wheel without an associated spatial. + * + * @param location the location where the suspension connects to the chassis + * (in chassis coordinates, not null, unaffected) + * @param direction the suspension direction (in chassis coordinates, not + * null, unaffected, typically down/0,-1,0) + * @param axle the axis direction (in chassis coordinates, not null, + * unaffected, typically right/-1,0,0) + * @param restLength the rest length of the suspension (in physics-space + * units) + * @param radius the wheel's radius (in physics-space units, ≥0) + * @param frontWheel true→front (steering) wheel, false→non-front + * wheel + */ public VehicleWheel(Vector3f location, Vector3f direction, Vector3f axle, float restLength, float radius, boolean frontWheel) { this.location.set(location); @@ -86,6 +186,9 @@ public VehicleWheel(Vector3f location, Vector3f direction, Vector3f axle, this.radius = radius; } + /** + * Update this wheel's location and orientation in physics space. + */ public void updatePhysicsState() { getWheelLocation(wheelId, wheelIndex, wheelWorldLocation); getWheelRotation(wheelId, wheelIndex, tmp_Matrix); @@ -96,6 +199,10 @@ public void updatePhysicsState() { private native void getWheelRotation(long vehicleId, int wheelId, Matrix3f location); + /** + * Apply this wheel's physics location and orientation to its associated + * spatial, if any. + */ public void applyWheelTransform() { if (wheelSpatial == null) { return; @@ -118,132 +225,232 @@ public void applyWheelTransform() { } } + /** + * Read the id of the btRaycastVehicle. + * + * @return the unique identifier (not zero) + */ public long getWheelId() { return wheelId; } + /** + * Assign this wheel to a vehicle. + * + * @param vehicleId the id of the btRaycastVehicle (not zero) + * @param wheelIndex index among the vehicle's wheels (≥0) + */ public void setVehicleId(long vehicleId, int wheelIndex) { this.wheelId = vehicleId; this.wheelIndex = wheelIndex; applyInfo(); } + /** + * Test whether this wheel is a front wheel. + * + * @return true if front wheel, otherwise false + */ public boolean isFrontWheel() { return frontWheel; } + /** + * Alter whether this wheel is a front (steering) wheel. + * + * @param frontWheel true→front wheel, false→non-front wheel + */ public void setFrontWheel(boolean frontWheel) { this.frontWheel = frontWheel; applyInfo(); } + /** + * Access the location where the suspension connects to the chassis. + * + * @return the pre-existing location vector (in chassis coordinates, not + * null) + */ public Vector3f getLocation() { return location; } + /** + * Access this wheel's suspension direction. + * + * @return the pre-existing direction vector (in chassis coordinates, not + * null) + */ public Vector3f getDirection() { return direction; } + /** + * Access this wheel's axle direction. + * + * @return the pre-existing direction vector (not null) + */ public Vector3f getAxle() { return axle; } + /** + * Read the stiffness constant for this wheel's suspension. + * + * @return the stiffness constant + */ public float getSuspensionStiffness() { return suspensionStiffness; } /** - * the stiffness constant for the suspension. 10.0 - Offroad buggy, 50.0 - Sports car, 200.0 - F1 Car - * @param suspensionStiffness + * Alter the stiffness constant for this wheel's suspension. + * + * @param suspensionStiffness the desired stiffness constant + * (10→off-road buggy, 50→sports car, 200→Formula-1 race car, + * default=20) */ public void setSuspensionStiffness(float suspensionStiffness) { this.suspensionStiffness = suspensionStiffness; applyInfo(); } + /** + * Read this wheel's damping when the suspension is expanded. + * + * @return the damping + */ public float getWheelsDampingRelaxation() { return wheelsDampingRelaxation; } /** - * the damping coefficient for when the suspension is expanding. - * See the comments for setWheelsDampingCompression for how to set k. - * @param wheelsDampingRelaxation + * Alter this wheel's damping when the suspension is expanded. + *

+ * Set to k * 2 * FastMath.sqrt(m_suspensionStiffness) where k is the + * damping ratio: + *

+ * k = 0.0 undamped and bouncy, k = 1.0 critical damping, k between 0.1 and + * 0.3 are good values + * + * @param wheelsDampingRelaxation the desired damping (default=2.3) */ public void setWheelsDampingRelaxation(float wheelsDampingRelaxation) { this.wheelsDampingRelaxation = wheelsDampingRelaxation; applyInfo(); } + /** + * Read this wheel's damping when the suspension is compressed. + * + * @return the damping + */ public float getWheelsDampingCompression() { return wheelsDampingCompression; } /** - * the damping coefficient for when the suspension is compressed. - * Set to k * 2.0 * FastMath.sqrt(m_suspensionStiffness) so k is proportional to critical damping.
- * k = 0.0 undamped & bouncy, k = 1.0 critical damping
- * 0.1 to 0.3 are good values - * @param wheelsDampingCompression + * Alter this wheel's damping when the suspension is compressed. + *

+ * Set to k * 2 * FastMath.sqrt(m_suspensionStiffness) where k is the + * damping ratio: + *

+ * k = 0.0 undamped and bouncy, k = 1.0 critical damping, k between 0.1 and + * 0.3 are good values + * + * @param wheelsDampingCompression the desired damping (default=4.4) */ public void setWheelsDampingCompression(float wheelsDampingCompression) { this.wheelsDampingCompression = wheelsDampingCompression; applyInfo(); } + /** + * Read the friction between this wheel's tyre and the ground. + * + * @return the coefficient of friction + */ public float getFrictionSlip() { return frictionSlip; } /** - * the coefficient of friction between the tyre and the ground. - * Should be about 0.8 for realistic cars, but can increased for better handling. - * Set large (10000.0) for kart racers - * @param frictionSlip + * Alter the friction between this wheel's tyre and the ground. + *

+ * Should be about 0.8 for realistic cars, but can increased for better + * handling. Set large (10000.0) for kart racers. + * + * @param frictionSlip the desired coefficient of friction (default=10.5) */ public void setFrictionSlip(float frictionSlip) { this.frictionSlip = frictionSlip; applyInfo(); } + /** + * Read this wheel's roll influence. + * + * @return the roll-influence factor + */ public float getRollInfluence() { return rollInfluence; } /** - * reduces the rolling torque applied from the wheels that cause the vehicle to roll over. - * This is a bit of a hack, but it's quite effective. 0.0 = no roll, 1.0 = physical behaviour. - * If m_frictionSlip is too high, you'll need to reduce this to stop the vehicle rolling over. - * You should also try lowering the vehicle's centre of mass - * @param rollInfluence the rollInfluence to set + * Alter this wheel's roll influence. + *

+ * The roll-influence factor reduces (or magnifies) the torque contributed + * by this wheel that tends to cause the vehicle to roll over. This is a bit + * of a hack, but it's quite effective. + *

+ * If the friction between the tyres and the ground is too high, you may + * reduce this factor to prevent the vehicle from rolling over. You should + * also try lowering the vehicle's centre of mass. + * + * @param rollInfluence the desired roll-influence factor (0→no roll + * torque, 1→realistic behaviour, default=1) */ public void setRollInfluence(float rollInfluence) { this.rollInfluence = rollInfluence; applyInfo(); } + /** + * Read the travel distance for this wheel's suspension. + * + * @return the maximum travel distance (in centimeters) + */ public float getMaxSuspensionTravelCm() { return maxSuspensionTravelCm; } /** - * the maximum distance the suspension can be compressed (centimetres) - * @param maxSuspensionTravelCm + * Alter the travel distance for this wheel's suspension. + * + * @param maxSuspensionTravelCm the desired maximum travel distance (in + * centimetres, default=500) */ public void setMaxSuspensionTravelCm(float maxSuspensionTravelCm) { this.maxSuspensionTravelCm = maxSuspensionTravelCm; applyInfo(); } + /** + * Read the maximum force exerted by this wheel's suspension. + * + * @return the maximum force + */ public float getMaxSuspensionForce() { return maxSuspensionForce; } /** - * The maximum suspension force, raise this above the default 6000 if your suspension cannot - * handle the weight of your vehicle. - * @param maxSuspensionTravelCm + * Alter the maximum force exerted by this wheel's suspension. + *

+ * Increase this if your suspension cannot handle the weight of your + * vehicle. + * + * @param maxSuspensionForce the desired maximum force (default=6000) */ public void setMaxSuspensionForce(float maxSuspensionForce) { this.maxSuspensionForce = maxSuspensionForce; @@ -269,19 +476,40 @@ private native void applyInfo(long wheelId, int wheelIndex, boolean frontWheel, float suspensionRestLength); + /** + * Read the radius of this wheel. + * + * @return the radius (in physics-space units, ≥0) + */ public float getRadius() { return radius; } + /** + * Alter the radius of this wheel. + * + * @param radius the desired radius (in physics-space units, ≥0, + * default=0.5) + */ public void setRadius(float radius) { this.radius = radius; applyInfo(); } + /** + * Read the rest length of this wheel. + * + * @return the length + */ public float getRestLength() { return restLength; } + /** + * Alter the rest length of the suspension of this wheel. + * + * @param restLength the desired length (default=1) + */ public void setRestLength(float restLength) { this.restLength = restLength; applyInfo(); @@ -303,7 +531,10 @@ public PhysicsCollisionObject getGroundObject() { } /** - * returns the location where the wheel collides with the ground (world space) + * Copy the location where the wheel touches the ground. + * + * @param vec storage for the result (not null, modified) + * @return a new location vector (in physics-space coordinates, not null) */ public Vector3f getCollisionLocation(Vector3f vec) { getCollisionLocation(wheelId, wheelIndex, vec); @@ -313,7 +544,9 @@ public Vector3f getCollisionLocation(Vector3f vec) { private native void getCollisionLocation(long wheelId, int wheelIndex, Vector3f vec); /** - * returns the location where the wheel collides with the ground (world space) + * Copy the location where the wheel collides with the ground. + * + * @return a new location vector (in physics-space coordinates) */ public Vector3f getCollisionLocation() { Vector3f vec = new Vector3f(); @@ -322,7 +555,10 @@ public Vector3f getCollisionLocation() { } /** - * returns the normal where the wheel collides with the ground (world space) + * Copy the normal where the wheel touches the ground. + * + * @param vec storage for the result (not null, modified) + * @return a unit vector (in physics-space coordinates, not null) */ public Vector3f getCollisionNormal(Vector3f vec) { getCollisionNormal(wheelId, wheelIndex, vec); @@ -332,7 +568,9 @@ public Vector3f getCollisionNormal(Vector3f vec) { private native void getCollisionNormal(long wheelId, int wheelIndex, Vector3f vec); /** - * returns the normal where the wheel collides with the ground (world space) + * Copy the normal where the wheel touches the ground. + * + * @return a new unit vector (in physics-space coordinates, not null) */ public Vector3f getCollisionNormal() { Vector3f vec = new Vector3f(); @@ -341,8 +579,11 @@ public Vector3f getCollisionNormal() { } /** - * returns how much the wheel skids on the ground (for skid sounds/smoke etc.)
- * 0.0 = wheels are sliding, 1.0 = wheels have traction. + * Calculate to what extent the wheel is skidding (for skid sounds/smoke + * etc.) + * + * @return the relative amount of traction (0→wheel is sliding, + * 1→wheel has full traction) */ public float getSkidInfo() { return getSkidInfo(wheelId, wheelIndex); @@ -351,8 +592,9 @@ public float getSkidInfo() { public native float getSkidInfo(long wheelId, int wheelIndex); /** - * returns how many degrees the wheel has turned since the last physics - * step. + * Calculate how much this wheel has turned since the last physics step. + * + * @return the rotation angle (in radians) */ public float getDeltaRotation() { return getDeltaRotation(wheelId, wheelIndex); @@ -360,6 +602,12 @@ public float getDeltaRotation() { public native float getDeltaRotation(long wheelId, int wheelIndex); + /** + * De-serialize this wheel, 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 capsule = im.getCapsule(this); @@ -379,6 +627,12 @@ public void read(JmeImporter im) throws IOException { restLength = capsule.readFloat("restLength", 1f); } + /** + * Serialize this wheel, 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 capsule = ex.getCapsule(this); @@ -399,41 +653,59 @@ public void write(JmeExporter ex) throws IOException { } /** - * @return the wheelSpatial + * Access the spatial associated with this wheel. + * + * @return the pre-existing instance, or null */ public Spatial getWheelSpatial() { return wheelSpatial; } /** - * @param wheelSpatial the wheelSpatial to set + * Alter which spatial is associated with this wheel. + * + * @param wheelSpatial the desired spatial, or null for none */ public void setWheelSpatial(Spatial wheelSpatial) { this.wheelSpatial = wheelSpatial; } + /** + * Test whether physics coordinates should match the local transform of the + * Spatial. + * + * @return true if matching local transform, false if matching world + * transform + */ public boolean isApplyLocal() { return applyLocal; } + /** + * Alter whether physics coordinates should match the local transform of the + * Spatial. + * + * @param applyLocal true→match local transform, false→match world + * transform (default=false) + */ public void setApplyLocal(boolean applyLocal) { this.applyLocal = applyLocal; } /** - * write the content of the wheelWorldRotation into the store - * - * @param store - */ + * Copy this wheel's physics-space orientation to the specified quaternion. + * + * @param store storage for the result (not null, modified) + */ public void getWheelWorldRotation(final Quaternion store) { store.set(this.wheelWorldRotation); } /** - * write the content of the wheelWorldLocation into the store - * - * @param store - */ + * Copy this wheel's physics-space location to the specified vector. + * + * @param store storage for the result (not null, modified) + */ public void getWheelWorldLocation(final Vector3f store) { store.set(this.wheelWorldLocation); } diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/objects/infos/RigidBodyMotionState.java b/jme3-bullet/src/main/java/com/jme3/bullet/objects/infos/RigidBodyMotionState.java index 3406e7ae5c..bee3bf78df 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/objects/infos/RigidBodyMotionState.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/objects/infos/RigidBodyMotionState.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 @@ -40,8 +40,8 @@ import java.util.logging.Logger; /** - * stores transform info of a PhysicsNode in a threadsafe manner to - * allow multithreaded access from the jme scenegraph and the bullet physicsspace + * The motion state (transform) of a rigid body, with thread-safe access. + * * @author normenhansen */ public class RigidBodyMotionState { @@ -51,9 +51,16 @@ public class RigidBodyMotionState { private Quaternion worldRotationQuat = new Quaternion(); private Quaternion tmp_inverseWorldRotation = new Quaternion(); private PhysicsVehicle vehicle; + /** + * true → physics coordinates match local transform, false → + * physics coordinates match world transform + */ private boolean applyPhysicsLocal = false; // protected LinkedList listeners = new LinkedList(); + /** + * Instantiate a motion state. + */ public RigidBodyMotionState() { this.motionStateId = createMotionState(); Logger.getLogger(this.getClass().getName()).log(Level.FINE, "Created MotionState {0}", Long.toHexString(motionStateId)); @@ -62,8 +69,11 @@ public RigidBodyMotionState() { private native long createMotionState(); /** - * applies the current transform to the given jme Node if the location has been updated on the physics side - * @param spatial + * If the motion state has been updated, apply the new transform to the + * specified spatial. + * + * @param spatial where to apply the physics transform (not null, modified) + * @return true if changed */ public boolean applyTransform(Spatial spatial) { Vector3f localLocation = spatial.getLocalTranslation(); @@ -97,7 +107,10 @@ public boolean applyTransform(Spatial spatial) { private native boolean applyTransform(long stateId, Vector3f location, Quaternion rotation); /** - * @return the worldLocation + * Copy the location from this motion state. + * + * @return the pre-existing location vector (in physics-space coordinates, + * not null) */ public Vector3f getWorldLocation() { getWorldLocation(motionStateId, worldLocation); @@ -107,7 +120,10 @@ public Vector3f getWorldLocation() { private native void getWorldLocation(long stateId, Vector3f vec); /** - * @return the worldRotation + * Read the rotation of this motion state (as a matrix). + * + * @return the pre-existing rotation matrix (in physics-space coordinates, + * not null) */ public Matrix3f getWorldRotation() { getWorldRotation(motionStateId, worldRotation); @@ -117,7 +133,10 @@ public Matrix3f getWorldRotation() { private native void getWorldRotation(long stateId, Matrix3f vec); /** - * @return the worldRotationQuat + * Read the rotation of this motion state (as a quaternion). + * + * @return the pre-existing instance (in physics-space coordinates, not + * null) */ public Quaternion getWorldRotationQuat() { getWorldRotationQuat(motionStateId, worldRotationQuat); @@ -127,20 +146,39 @@ public Quaternion getWorldRotationQuat() { private native void getWorldRotationQuat(long stateId, Quaternion vec); /** - * @param vehicle the vehicle to set + * @param vehicle which vehicle will use this motion state */ public void setVehicle(PhysicsVehicle vehicle) { this.vehicle = vehicle; } + /** + * 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 applyPhysicsLocal; } + /** + * Alter whether physics-space coordinates should match the spatial's local + * coordinates. + * + * @param applyPhysicsLocal true→match local coordinates, + * false→match world coordinates (default=false) + */ public void setApplyPhysicsLocal(boolean applyPhysicsLocal) { this.applyPhysicsLocal = applyPhysicsLocal; } + /** + * Read the unique id of the native object. + * + * @return id (not zero) + */ public long getObjectId(){ return motionStateId; } @@ -152,6 +190,12 @@ public long getObjectId(){ // listeners.remove(listener); // } + /** + * Finalize this motion state just before it is destroyed. Should be invoked + * only by a subclass or by the garbage collector. + * + * @throws Throwable ignored by the garbage collector + */ @Override protected void finalize() throws Throwable { super.finalize(); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/objects/infos/VehicleTuning.java b/jme3-bullet/src/main/java/com/jme3/bullet/objects/infos/VehicleTuning.java index 47f344bd72..3a6dabbc7b 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/objects/infos/VehicleTuning.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/objects/infos/VehicleTuning.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,14 +32,35 @@ package com.jme3.bullet.objects.infos; /** - * + * Typical tuning parameters for a PhysicsVehicle. + * * @author normenhansen */ public class VehicleTuning { + /** + * suspension stiffness constant (10→off-road buggy, 50→sports + * car, 200→Formula-1 race car, default=5.88) + */ public float suspensionStiffness = 5.88f; + /** + * suspension damping when compressed (0→no damping, default=0.83) + */ public float suspensionCompression = 0.83f; + /** + * suspension damping when expanded (0→no damping, default=0.88) + */ public float suspensionDamping = 0.88f; + /** + * maximum suspension travel distance (in centimeters, default=500) + */ public float maxSuspensionTravelCm = 500f; + /** + * maximum force exerted by each wheel's suspension (default=6000) + */ public float maxSuspensionForce = 6000f; + /** + * coefficient of friction between tyres and ground (0.8→realistic car, + * 10000→kart racer, default=10.5) + */ public float frictionSlip = 10.5f; } diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/util/DebugMeshCallback.java b/jme3-bullet/src/main/java/com/jme3/bullet/util/DebugMeshCallback.java index fbec02c9cf..f0bc3c45f3 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/util/DebugMeshCallback.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/util/DebugMeshCallback.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 @@ -44,6 +44,17 @@ public class DebugMeshCallback { private ArrayList list = new ArrayList(); + /** + * Add a vertex to the mesh under construction. + *

+ * This method is invoked from native code. + * + * @param x local X coordinate of new vertex + * @param y local Y coordinate of new vertex + * @param z local Z coordinate of new vertex + * @param part ignored + * @param index ignored + */ public void addVector(float x, float y, float z, int part, int index) { list.add(new Vector3f(x, y, z)); } diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/util/DebugShapeFactory.java b/jme3-bullet/src/main/java/com/jme3/bullet/util/DebugShapeFactory.java index 939be40834..9351306852 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/util/DebugShapeFactory.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/util/DebugShapeFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2017 jMonkeyEngine + * Copyright (c) 2009-2018 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -57,10 +57,13 @@ public class DebugShapeFactory { // private static final Vector3f aabbMin = new Vector3f(-1e30f, -1e30f, -1e30f); /** - * Creates a debug shape from the given collision shape. This is mostly used internally.
- * To attach a debug shape to a physics object, call attachDebugShape(AssetManager manager); on it. - * @param collisionShape - * @return + * Create a debug spatial from the specified collision shape. + *

+ * This is mostly used internally. To attach a debug shape to a physics + * object, call attachDebugShape(AssetManager manager); on it. + * + * @param collisionShape the shape to visualize (may be null, unaffected) + * @return a new tree of geometries, or null */ public static Spatial getDebugShape(CollisionShape collisionShape) { if (collisionShape == null) { @@ -102,6 +105,12 @@ public static Spatial getDebugShape(CollisionShape collisionShape) { return debugShape; } + /** + * Create a geometry for visualizing the specified shape. + * + * @param shape (not null, unaffected) + * @return a new geometry (not null) + */ private static Geometry createDebugShape(CollisionShape shape) { Geometry geom = new Geometry(); geom.setMesh(DebugShapeFactory.getDebugMesh(shape)); @@ -110,6 +119,12 @@ private static Geometry createDebugShape(CollisionShape shape) { return geom; } + /** + * Create a mesh for visualizing the specified shape. + * + * @param shape (not null, unaffected) + * @return a new mesh (not null) + */ public static Mesh getDebugMesh(CollisionShape shape) { Mesh mesh = new Mesh(); DebugMeshCallback callback = new DebugMeshCallback(); diff --git a/jme3-bullet/src/main/java/com/jme3/bullet/util/NativeMeshUtil.java b/jme3-bullet/src/main/java/com/jme3/bullet/util/NativeMeshUtil.java index fc3ad53d60..caf172c821 100644 --- a/jme3-bullet/src/main/java/com/jme3/bullet/util/NativeMeshUtil.java +++ b/jme3-bullet/src/main/java/com/jme3/bullet/util/NativeMeshUtil.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,18 +39,26 @@ import java.nio.FloatBuffer; /** + * A utility class for interfacing with Native Bullet. * * @author normenhansen */ public class NativeMeshUtil { + /** + * Pass a mesh to Native Bullet. + * + * @param mesh the JME mesh to pass (not null) + * @return the unique identifier of the resulting btTriangleIndexVertexArray + * (not 0) + */ public static long getTriangleIndexVertexArray(Mesh mesh){ ByteBuffer triangleIndexBase = BufferUtils.createByteBuffer(mesh.getTriangleCount() * 3 * 4); ByteBuffer vertexBase = BufferUtils.createByteBuffer(mesh.getVertexCount() * 3 * 4); int numVertices = mesh.getVertexCount(); - int vertexStride = 12; //3 verts * 4 bytes per. + int vertexStride = 12; //3 verts * 4 bytes each int numTriangles = mesh.getTriangleCount(); - int triangleIndexStride = 12; //3 index entries * 4 bytes each. + int triangleIndexStride = 12; //3 index entries * 4 bytes each IndexBuffer indices = mesh.getIndicesAsList(); FloatBuffer vertices = mesh.getFloatBuffer(Type.Position); @@ -72,6 +80,18 @@ public static long getTriangleIndexVertexArray(Mesh mesh){ return createTriangleIndexVertexArray(triangleIndexBase, vertexBase, numTriangles, numVertices, vertexStride, triangleIndexStride); } + /** + * Instantiate a btTriangleIndexVertexArray. Native method. + * + * @param triangleIndexBase index buffer (not null) + * @param vertexBase vertex buffer (not null) + * @param numTraingles the number of triangles in the mesh (≥0) + * @param numVertices the number of vertices in the mesh (≥0) + * @param vertextStride (in bytes, >0) + * @param triangleIndexStride (in bytes, >0) + * @return the unique identifier of the resulting btTriangleIndexVertexArray + * (not 0) + */ public static native long createTriangleIndexVertexArray(ByteBuffer triangleIndexBase, ByteBuffer vertexBase, int numTraingles, int numVertices, int vertextStride, int triangleIndexStride); } diff --git a/jme3-core/src/main/java/com/jme3/audio/AudioNode.java b/jme3-core/src/main/java/com/jme3/audio/AudioNode.java index 579520f4e7..862348b635 100644 --- a/jme3-core/src/main/java/com/jme3/audio/AudioNode.java +++ b/jme3-core/src/main/java/com/jme3/audio/AudioNode.java @@ -722,25 +722,14 @@ public void updateLogicalState(float tpf) { @Override public void updateGeometricState() { super.updateGeometricState(); - - if (channel < 0) { - return; - } - + if (channel < 0 || this.getParent() == null) return; Vector3f currentWorldTranslation = worldTransform.getTranslation(); - - if (Float.isNaN(previousWorldTranslation.x) - || !previousWorldTranslation.equals(currentWorldTranslation)) { - + if (!previousWorldTranslation.equals(currentWorldTranslation)) { getRenderer().updateSourceParam(this, AudioParam.Position); - - if (velocityFromTranslation) { - velocity.set(currentWorldTranslation).subtractLocal(previousWorldTranslation); - velocity.multLocal(1f / lastTpf); - + if (velocityFromTranslation && !Float.isNaN(previousWorldTranslation.x)) { + velocity.set(currentWorldTranslation).subtractLocal(previousWorldTranslation).multLocal(1f / lastTpf); getRenderer().updateSourceParam(this, AudioParam.Velocity); } - previousWorldTranslation.set(currentWorldTranslation); } } @@ -748,10 +737,6 @@ public void updateGeometricState() { @Override public AudioNode clone(){ AudioNode clone = (AudioNode) super.clone(); - - clone.direction = direction.clone(); - clone.velocity = velocity.clone(); - return clone; } @@ -760,10 +745,11 @@ public AudioNode clone(){ */ @Override public void cloneFields( Cloner cloner, Object original ) { - super.cloneFields(cloner, original); + super.cloneFields(cloner, original); - this.direction = cloner.clone(direction); - this.velocity = cloner.clone(velocity); + this.direction=cloner.clone(direction); + this.velocity=velocityFromTranslation?new Vector3f():cloner.clone(velocity); + this.previousWorldTranslation=Vector3f.NAN.clone(); // Change in behavior: the filters were not cloned before meaning // that two cloned audio nodes would share the same filter instance. diff --git a/jme3-core/src/main/java/com/jme3/effect/ParticlePointMesh.java b/jme3-core/src/main/java/com/jme3/effect/ParticlePointMesh.java index 3f56e483b4..b9c0f43d8b 100644 --- a/jme3-core/src/main/java/com/jme3/effect/ParticlePointMesh.java +++ b/jme3-core/src/main/java/com/jme3/effect/ParticlePointMesh.java @@ -144,7 +144,7 @@ public void updateParticleData(Particle[] particles, Camera cam, Matrix3f invers colors.putInt(p.color.asIntABGR()); int imgX = p.imageIndex % imagesX; - int imgY = (p.imageIndex - imgX) / imagesY; + int imgY = p.imageIndex/imagesX; float startX = ((float) imgX) / imagesX; float startY = ((float) imgY) / imagesY; diff --git a/jme3-core/src/main/java/com/jme3/effect/ParticleTriMesh.java b/jme3-core/src/main/java/com/jme3/effect/ParticleTriMesh.java index 8002197b04..16b9071d6d 100644 --- a/jme3-core/src/main/java/com/jme3/effect/ParticleTriMesh.java +++ b/jme3-core/src/main/java/com/jme3/effect/ParticleTriMesh.java @@ -251,7 +251,7 @@ public void updateParticleData(Particle[] particles, Camera cam, Matrix3f invers if (uniqueTexCoords){ int imgX = p.imageIndex % imagesX; - int imgY = (p.imageIndex - imgX) / imagesY; + int imgY = p.imageIndex / imagesX; float startX = ((float) imgX) / imagesX; float startY = ((float) imgY) / imagesY; diff --git a/jme3-core/src/main/java/com/jme3/input/FlyByCamera.java b/jme3-core/src/main/java/com/jme3/input/FlyByCamera.java index 30d7a3b78c..f7ffa78f11 100644 --- a/jme3-core/src/main/java/com/jme3/input/FlyByCamera.java +++ b/jme3-core/src/main/java/com/jme3/input/FlyByCamera.java @@ -412,7 +412,7 @@ protected void zoomCamera(float value){ * @param value translation amount */ protected void riseCamera(float value){ - Vector3f vel = new Vector3f(0, value * moveSpeed, 0); + Vector3f vel = initialUpVec.mult(value * moveSpeed); Vector3f pos = cam.getLocation().clone(); if (motionAllowed != null) diff --git a/jme3-core/src/main/java/com/jme3/math/Quaternion.java b/jme3-core/src/main/java/com/jme3/math/Quaternion.java index d592640e1a..0625b8edd2 100644 --- a/jme3-core/src/main/java/com/jme3/math/Quaternion.java +++ b/jme3-core/src/main/java/com/jme3/math/Quaternion.java @@ -756,7 +756,7 @@ public Quaternion slerp(Quaternion q1, Quaternion q2, float t) { * @param q2 * Final interpolation value * @param changeAmnt - * The amount diffrence + * The amount difference */ public void slerp(Quaternion q2, float changeAmnt) { if (this.x == q2.x && this.y == q2.y && this.z == q2.z diff --git a/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java b/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java index c3ac904a56..bd0c597002 100644 --- a/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java +++ b/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java @@ -31,7 +31,6 @@ */ package com.jme3.material.plugins; -import com.jme3.material.logic.*; import com.jme3.asset.*; import com.jme3.material.*; import com.jme3.material.RenderState.BlendEquation; @@ -39,7 +38,7 @@ import com.jme3.material.RenderState.FaceCullMode; import com.jme3.material.TechniqueDef.LightMode; import com.jme3.material.TechniqueDef.ShadowMode; -import com.jme3.material.logic.StaticPassLightingLogic; +import com.jme3.material.logic.*; import com.jme3.math.ColorRGBA; import com.jme3.math.Vector2f; import com.jme3.math.Vector3f; @@ -51,7 +50,6 @@ import com.jme3.util.blockparser.BlockLanguageParser; import com.jme3.util.blockparser.Statement; import com.jme3.util.clone.Cloner; - import java.io.IOException; import java.io.InputStream; import java.util.*; @@ -451,8 +449,15 @@ private void readWorldParams(List worldParams) throws IOException{ } } - private boolean parseBoolean(String word){ - return word != null && word.equals("On"); + private boolean parseBoolean(String word) { + switch (word) { + case "On": + return true; + case "Off": + return false; + default: + throw new IllegalArgumentException(); + } } private void readRenderStateStatement(Statement statement) throws IOException{ diff --git a/jme3-core/src/test/java/com/jme3/material/plugins/LoadJ3mdTest.java b/jme3-core/src/test/java/com/jme3/material/plugins/LoadJ3mdTest.java index ea47129a7e..eb76c18d9c 100644 --- a/jme3-core/src/test/java/com/jme3/material/plugins/LoadJ3mdTest.java +++ b/jme3-core/src/test/java/com/jme3/material/plugins/LoadJ3mdTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2016 jMonkeyEngine + * Copyright (c) 2009-2018 jMonkeyEngine * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,14 +38,12 @@ import com.jme3.scene.shape.Box; import com.jme3.shader.Shader; import com.jme3.system.*; +import java.util.*; +import static org.junit.Assert.assertEquals; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.runners.MockitoJUnitRunner; -import java.util.*; - -import static org.junit.Assert.assertEquals; - @RunWith(MockitoJUnitRunner.class) public class LoadJ3mdTest { @@ -59,6 +57,24 @@ public EnumSet getCaps() { } }); + @Test(expected = IllegalArgumentException.class) + public void testBadBooleans1() { + supportGlsl(100); + material("bad-booleans1.j3md"); // DepthTest yes + } + + @Test(expected = IllegalArgumentException.class) + public void testBadBooleans2() { + supportGlsl(100); + material("bad-booleans2.j3md"); // DepthWrite on + } + + @Test(expected = IllegalArgumentException.class) + public void testBadBooleans3() { + supportGlsl(100); + material("bad-booleans3.j3md"); // Wireframe true + } + @Test public void testShaderNodesMaterialDefLoading() { supportGlsl(100); diff --git a/jme3-core/src/test/resources/bad-booleans1.j3md b/jme3-core/src/test/resources/bad-booleans1.j3md new file mode 100644 index 0000000000..a5a7ddf7cd --- /dev/null +++ b/jme3-core/src/test/resources/bad-booleans1.j3md @@ -0,0 +1,199 @@ +MaterialDef bad-booleans1 { + + MaterialParameters { + Texture2D ColorMap + Texture2D LightMap + Color Color (Color) + Boolean VertexColor (UseVertexColor) + Float PointSize : 1.0 + Boolean SeparateTexCoord + + // Texture of the glowing parts of the material + Texture2D GlowMap + // The glow color of the object + Color GlowColor + + // For instancing + Boolean UseInstancing + + // For hardware skinning + Int NumberOfBones + Matrix4Array BoneMatrices + + // For Morph animation + FloatArray MorphWeights + Int NumberOfMorphTargets + Int NumberOfTargetsBuffers + + // Alpha threshold for fragment discarding + Float AlphaDiscardThreshold (AlphaTestFallOff) + + //Shadows + Int FilterMode + Boolean HardwareShadows + + Texture2D ShadowMap0 + Texture2D ShadowMap1 + Texture2D ShadowMap2 + Texture2D ShadowMap3 + //pointLights + Texture2D ShadowMap4 + Texture2D ShadowMap5 + + Float ShadowIntensity + Vector4 Splits + Vector2 FadeInfo + + Matrix4 LightViewProjectionMatrix0 + Matrix4 LightViewProjectionMatrix1 + Matrix4 LightViewProjectionMatrix2 + Matrix4 LightViewProjectionMatrix3 + //pointLight + Matrix4 LightViewProjectionMatrix4 + Matrix4 LightViewProjectionMatrix5 + Vector3 LightPos + Vector3 LightDir + + Float PCFEdge + + Float ShadowMapSize + + Boolean BackfaceShadows: true + } + + Technique { + VertexShader GLSL100 GLSL150: Common/MatDefs/Misc/Unshaded.vert + FragmentShader GLSL100 GLSL150: Common/MatDefs/Misc/Unshaded.frag + + WorldParameters { + WorldViewProjectionMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + INSTANCING : UseInstancing + SEPARATE_TEXCOORD : SeparateTexCoord + HAS_COLORMAP : ColorMap + HAS_LIGHTMAP : LightMap + HAS_VERTEXCOLOR : VertexColor + HAS_POINTSIZE : PointSize + HAS_COLOR : Color + NUM_BONES : NumberOfBones + DISCARD_ALPHA : AlphaDiscardThreshold + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + } + + Technique PreNormalPass { + + VertexShader GLSL100 GLSL150 : Common/MatDefs/SSAO/normal.vert + FragmentShader GLSL100 GLSL150 : Common/MatDefs/SSAO/normal.frag + + WorldParameters { + WorldViewProjectionMatrix + WorldViewMatrix + NormalMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + } + + Technique PreShadow { + + VertexShader GLSL100 GLSL150 : Common/MatDefs/Shadow/PreShadow.vert + FragmentShader GLSL100 GLSL150 : Common/MatDefs/Shadow/PreShadow.frag + + WorldParameters { + WorldViewProjectionMatrix + WorldViewMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + COLOR_MAP : ColorMap + DISCARD_ALPHA : AlphaDiscardThreshold + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + + ForcedRenderState { + FaceCull Off + DepthTest yes + DepthWrite On + PolyOffset 5 3 + ColorWrite Off + } + + } + + + Technique PostShadow { + VertexShader GLSL100 GLSL150: Common/MatDefs/Shadow/PostShadow.vert + FragmentShader GLSL100 GLSL150: Common/MatDefs/Shadow/PostShadow.frag + + WorldParameters { + WorldViewProjectionMatrix + WorldMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + HARDWARE_SHADOWS : HardwareShadows + FILTER_MODE : FilterMode + PCFEDGE : PCFEdge + DISCARD_ALPHA : AlphaDiscardThreshold + COLOR_MAP : ColorMap + SHADOWMAP_SIZE : ShadowMapSize + FADE : FadeInfo + PSSM : Splits + POINTLIGHT : LightViewProjectionMatrix5 + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + BACKFACE_SHADOWS: BackfaceShadows + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + + ForcedRenderState { + Blend Modulate + DepthWrite Off + PolyOffset -0.1 0 + } + } + + Technique Glow { + + VertexShader GLSL100 GLSL150: Common/MatDefs/Misc/Unshaded.vert + FragmentShader GLSL100 GLSL150: Common/MatDefs/Light/Glow.frag + + WorldParameters { + WorldViewProjectionMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + NEED_TEXCOORD1 + HAS_GLOWMAP : GlowMap + HAS_GLOWCOLOR : GlowColor + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + HAS_POINTSIZE : PointSize + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + } +} \ No newline at end of file diff --git a/jme3-core/src/test/resources/bad-booleans2.j3md b/jme3-core/src/test/resources/bad-booleans2.j3md new file mode 100644 index 0000000000..0732d3cc71 --- /dev/null +++ b/jme3-core/src/test/resources/bad-booleans2.j3md @@ -0,0 +1,199 @@ +MaterialDef bad-booleans2 { + + MaterialParameters { + Texture2D ColorMap + Texture2D LightMap + Color Color (Color) + Boolean VertexColor (UseVertexColor) + Float PointSize : 1.0 + Boolean SeparateTexCoord + + // Texture of the glowing parts of the material + Texture2D GlowMap + // The glow color of the object + Color GlowColor + + // For instancing + Boolean UseInstancing + + // For hardware skinning + Int NumberOfBones + Matrix4Array BoneMatrices + + // For Morph animation + FloatArray MorphWeights + Int NumberOfMorphTargets + Int NumberOfTargetsBuffers + + // Alpha threshold for fragment discarding + Float AlphaDiscardThreshold (AlphaTestFallOff) + + //Shadows + Int FilterMode + Boolean HardwareShadows + + Texture2D ShadowMap0 + Texture2D ShadowMap1 + Texture2D ShadowMap2 + Texture2D ShadowMap3 + //pointLights + Texture2D ShadowMap4 + Texture2D ShadowMap5 + + Float ShadowIntensity + Vector4 Splits + Vector2 FadeInfo + + Matrix4 LightViewProjectionMatrix0 + Matrix4 LightViewProjectionMatrix1 + Matrix4 LightViewProjectionMatrix2 + Matrix4 LightViewProjectionMatrix3 + //pointLight + Matrix4 LightViewProjectionMatrix4 + Matrix4 LightViewProjectionMatrix5 + Vector3 LightPos + Vector3 LightDir + + Float PCFEdge + + Float ShadowMapSize + + Boolean BackfaceShadows: true + } + + Technique { + VertexShader GLSL100 GLSL150: Common/MatDefs/Misc/Unshaded.vert + FragmentShader GLSL100 GLSL150: Common/MatDefs/Misc/Unshaded.frag + + WorldParameters { + WorldViewProjectionMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + INSTANCING : UseInstancing + SEPARATE_TEXCOORD : SeparateTexCoord + HAS_COLORMAP : ColorMap + HAS_LIGHTMAP : LightMap + HAS_VERTEXCOLOR : VertexColor + HAS_POINTSIZE : PointSize + HAS_COLOR : Color + NUM_BONES : NumberOfBones + DISCARD_ALPHA : AlphaDiscardThreshold + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + } + + Technique PreNormalPass { + + VertexShader GLSL100 GLSL150 : Common/MatDefs/SSAO/normal.vert + FragmentShader GLSL100 GLSL150 : Common/MatDefs/SSAO/normal.frag + + WorldParameters { + WorldViewProjectionMatrix + WorldViewMatrix + NormalMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + } + + Technique PreShadow { + + VertexShader GLSL100 GLSL150 : Common/MatDefs/Shadow/PreShadow.vert + FragmentShader GLSL100 GLSL150 : Common/MatDefs/Shadow/PreShadow.frag + + WorldParameters { + WorldViewProjectionMatrix + WorldViewMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + COLOR_MAP : ColorMap + DISCARD_ALPHA : AlphaDiscardThreshold + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + + ForcedRenderState { + FaceCull Off + DepthTest On + DepthWrite on + PolyOffset 5 3 + ColorWrite Off + } + + } + + + Technique PostShadow { + VertexShader GLSL100 GLSL150: Common/MatDefs/Shadow/PostShadow.vert + FragmentShader GLSL100 GLSL150: Common/MatDefs/Shadow/PostShadow.frag + + WorldParameters { + WorldViewProjectionMatrix + WorldMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + HARDWARE_SHADOWS : HardwareShadows + FILTER_MODE : FilterMode + PCFEDGE : PCFEdge + DISCARD_ALPHA : AlphaDiscardThreshold + COLOR_MAP : ColorMap + SHADOWMAP_SIZE : ShadowMapSize + FADE : FadeInfo + PSSM : Splits + POINTLIGHT : LightViewProjectionMatrix5 + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + BACKFACE_SHADOWS: BackfaceShadows + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + + ForcedRenderState { + Blend Modulate + DepthWrite Off + PolyOffset -0.1 0 + } + } + + Technique Glow { + + VertexShader GLSL100 GLSL150: Common/MatDefs/Misc/Unshaded.vert + FragmentShader GLSL100 GLSL150: Common/MatDefs/Light/Glow.frag + + WorldParameters { + WorldViewProjectionMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + NEED_TEXCOORD1 + HAS_GLOWMAP : GlowMap + HAS_GLOWCOLOR : GlowColor + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + HAS_POINTSIZE : PointSize + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + } +} \ No newline at end of file diff --git a/jme3-core/src/test/resources/bad-booleans3.j3md b/jme3-core/src/test/resources/bad-booleans3.j3md new file mode 100644 index 0000000000..8fda309da9 --- /dev/null +++ b/jme3-core/src/test/resources/bad-booleans3.j3md @@ -0,0 +1,200 @@ +MaterialDef bad-booleans3 { + + MaterialParameters { + Texture2D ColorMap + Texture2D LightMap + Color Color (Color) + Boolean VertexColor (UseVertexColor) + Float PointSize : 1.0 + Boolean SeparateTexCoord + + // Texture of the glowing parts of the material + Texture2D GlowMap + // The glow color of the object + Color GlowColor + + // For instancing + Boolean UseInstancing + + // For hardware skinning + Int NumberOfBones + Matrix4Array BoneMatrices + + // For Morph animation + FloatArray MorphWeights + Int NumberOfMorphTargets + Int NumberOfTargetsBuffers + + // Alpha threshold for fragment discarding + Float AlphaDiscardThreshold (AlphaTestFallOff) + + //Shadows + Int FilterMode + Boolean HardwareShadows + + Texture2D ShadowMap0 + Texture2D ShadowMap1 + Texture2D ShadowMap2 + Texture2D ShadowMap3 + //pointLights + Texture2D ShadowMap4 + Texture2D ShadowMap5 + + Float ShadowIntensity + Vector4 Splits + Vector2 FadeInfo + + Matrix4 LightViewProjectionMatrix0 + Matrix4 LightViewProjectionMatrix1 + Matrix4 LightViewProjectionMatrix2 + Matrix4 LightViewProjectionMatrix3 + //pointLight + Matrix4 LightViewProjectionMatrix4 + Matrix4 LightViewProjectionMatrix5 + Vector3 LightPos + Vector3 LightDir + + Float PCFEdge + + Float ShadowMapSize + + Boolean BackfaceShadows: true + } + + Technique { + VertexShader GLSL100 GLSL150: Common/MatDefs/Misc/Unshaded.vert + FragmentShader GLSL100 GLSL150: Common/MatDefs/Misc/Unshaded.frag + + WorldParameters { + WorldViewProjectionMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + INSTANCING : UseInstancing + SEPARATE_TEXCOORD : SeparateTexCoord + HAS_COLORMAP : ColorMap + HAS_LIGHTMAP : LightMap + HAS_VERTEXCOLOR : VertexColor + HAS_POINTSIZE : PointSize + HAS_COLOR : Color + NUM_BONES : NumberOfBones + DISCARD_ALPHA : AlphaDiscardThreshold + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + } + + Technique PreNormalPass { + + VertexShader GLSL100 GLSL150 : Common/MatDefs/SSAO/normal.vert + FragmentShader GLSL100 GLSL150 : Common/MatDefs/SSAO/normal.frag + + WorldParameters { + WorldViewProjectionMatrix + WorldViewMatrix + NormalMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + } + + Technique PreShadow { + + VertexShader GLSL100 GLSL150 : Common/MatDefs/Shadow/PreShadow.vert + FragmentShader GLSL100 GLSL150 : Common/MatDefs/Shadow/PreShadow.frag + + WorldParameters { + WorldViewProjectionMatrix + WorldViewMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + COLOR_MAP : ColorMap + DISCARD_ALPHA : AlphaDiscardThreshold + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + + ForcedRenderState { + Wireframe true + FaceCull Off + DepthTest On + DepthWrite On + PolyOffset 5 3 + ColorWrite Off + } + + } + + + Technique PostShadow { + VertexShader GLSL100 GLSL150: Common/MatDefs/Shadow/PostShadow.vert + FragmentShader GLSL100 GLSL150: Common/MatDefs/Shadow/PostShadow.frag + + WorldParameters { + WorldViewProjectionMatrix + WorldMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + HARDWARE_SHADOWS : HardwareShadows + FILTER_MODE : FilterMode + PCFEDGE : PCFEdge + DISCARD_ALPHA : AlphaDiscardThreshold + COLOR_MAP : ColorMap + SHADOWMAP_SIZE : ShadowMapSize + FADE : FadeInfo + PSSM : Splits + POINTLIGHT : LightViewProjectionMatrix5 + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + BACKFACE_SHADOWS: BackfaceShadows + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + + ForcedRenderState { + Blend Modulate + DepthWrite Off + PolyOffset -0.1 0 + } + } + + Technique Glow { + + VertexShader GLSL100 GLSL150: Common/MatDefs/Misc/Unshaded.vert + FragmentShader GLSL100 GLSL150: Common/MatDefs/Light/Glow.frag + + WorldParameters { + WorldViewProjectionMatrix + ViewProjectionMatrix + ViewMatrix + } + + Defines { + NEED_TEXCOORD1 + HAS_GLOWMAP : GlowMap + HAS_GLOWCOLOR : GlowColor + NUM_BONES : NumberOfBones + INSTANCING : UseInstancing + HAS_POINTSIZE : PointSize + NUM_MORPH_TARGETS: NumberOfMorphTargets + NUM_TARGETS_BUFFERS: NumberOfTargetsBuffers + } + } +} \ No newline at end of file diff --git a/jme3-desktop/src/main/java/com/jme3/cursors/plugins/CursorLoader.java b/jme3-desktop/src/main/java/com/jme3/cursors/plugins/CursorLoader.java index ce82cbe17e..037927ac61 100644 --- a/jme3-desktop/src/main/java/com/jme3/cursors/plugins/CursorLoader.java +++ b/jme3-desktop/src/main/java/com/jme3/cursors/plugins/CursorLoader.java @@ -699,7 +699,7 @@ private void addFrame(byte[] imgData, int rate, int jiffy, int width, int height imgDelay = BufferUtils.createIntBuffer(numImages); } imgDelay.put(cid.imgDelay); - } else if (imgData != null) { + } else if (imgDelay != null) { imgDelay.put(cid.imgDelay); } xHotSpot = cid.xHotSpot; diff --git a/jme3-examples/build.gradle b/jme3-examples/build.gradle index dde857609a..cd98abaa9b 100644 --- a/jme3-examples/build.gradle +++ b/jme3-examples/build.gradle @@ -7,10 +7,6 @@ if (!hasProperty('mainClass')) { task run(dependsOn: 'build', type:JavaExec) { main = mainClass classpath = sourceSets.main.runtimeClasspath - if (System.properties['os.name'].toLowerCase().contains('mac')) { - jvmArgs "-XstartOnFirstThread" - jvmArgs "-Djava.awt.headless=true" - } if (System.properties['java.util.logging.config.file'] != null) { systemProperty "java.util.logging.config.file", System.properties['java.util.logging.config.file'] diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestBetterCharacter.java b/jme3-examples/src/main/java/jme3test/bullet/TestBetterCharacter.java index 0b9dfbad33..4a86f8219d 100644 --- a/jme3-examples/src/main/java/jme3test/bullet/TestBetterCharacter.java +++ b/jme3-examples/src/main/java/jme3test/bullet/TestBetterCharacter.java @@ -1,26 +1,33 @@ /* - * Copyright (c) 2009-2012 jMonkeyEngine All rights reserved.

+ * Copyright (c) 2009-2018 jMonkeyEngine + * All rights reserved. + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer.

* Redistributions - * in binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution.

* Neither the name of - * 'jMonkeyEngine' nor the names of its contributors may be used to endorse or - * promote products derived from this software without specific prior written - * permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT - * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package jme3test.bullet; @@ -30,7 +37,6 @@ import com.jme3.bullet.collision.shapes.MeshCollisionShape; import com.jme3.bullet.control.BetterCharacterControl; import com.jme3.bullet.control.RigidBodyControl; -import com.jme3.bullet.debug.DebugTools; import com.jme3.input.KeyInput; import com.jme3.input.controls.ActionListener; import com.jme3.input.controls.KeyTrigger; @@ -80,7 +86,13 @@ public void simpleInitApp() { setupKeys(); // activate physics - bulletAppState = new BulletAppState(); + bulletAppState = new BulletAppState() { + @Override + public void prePhysicsTick(PhysicsSpace space, float tpf) { + // Apply radial gravity near the planet, downward gravity elsewhere. + checkPlanetGravity(); + } + }; stateManager.attach(bulletAppState); bulletAppState.setDebugEnabled(true); @@ -123,9 +135,6 @@ public void simpleInitApp() { @Override public void simpleUpdate(float tpf) { - // Apply planet gravity to character if close enough (see below) - checkPlanetGravity(); - // Get current forward and left vectors of model by using its rotation // to rotate the unit vectors Vector3f modelForwardDir = characterNode.getWorldRotation().mult(Vector3f.UNIT_Z); diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestIssue877.java b/jme3-examples/src/main/java/jme3test/bullet/TestIssue877.java new file mode 100644 index 0000000000..d17d3407e3 --- /dev/null +++ b/jme3-examples/src/main/java/jme3test/bullet/TestIssue877.java @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2018 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package jme3test.bullet; + +/** + * Test case for JME issue #877: multiple hinges. Based on code submitted by + * Daniel Martensson. + * + * If successful, all pendulums will swing at the same frequency, and all the + * free-falling objects will fall straight down. + */ +import com.jme3.app.SimpleApplication; +import com.jme3.bullet.BulletAppState; +import com.jme3.bullet.collision.shapes.BoxCollisionShape; +import com.jme3.bullet.collision.shapes.CollisionShape; +import com.jme3.bullet.control.RigidBodyControl; +import com.jme3.bullet.joints.HingeJoint; +import com.jme3.math.Quaternion; +import com.jme3.math.Vector3f; +import com.jme3.scene.Node; + +public class TestIssue877 extends SimpleApplication { + + BulletAppState bulletAppState = new BulletAppState(); + int numPendulums = 6; + int numFalling = 6; + Node pivots[] = new Node[numPendulums]; + Node bobs[] = new Node[numPendulums]; + Node falling[] = new Node[numFalling]; + float timeToNextPrint = 1f; // in seconds + + public static void main(String[] args) { + TestIssue877 app = new TestIssue877(); + app.start(); + } + + @Override + public void simpleInitApp() { + flyCam.setEnabled(false); + cam.setLocation(new Vector3f(-4.77f, -7.55f, 16.52f)); + cam.setRotation(new Quaternion(-0.103433f, 0.889420f, 0.368792f, 0.249449f)); + + stateManager.attach(bulletAppState); + bulletAppState.setDebugEnabled(true); + + float pivotY = 14.6214f; + float bobStartY = 3f; + float length = pivotY - bobStartY; + for (int i = 0; i < numPendulums; i++) { + float x = 6f - 2.5f * i; + Vector3f pivotLocation = new Vector3f(x, pivotY, 0f); + pivots[i] = createTestNode(0f, pivotLocation); + + Vector3f bobLocation = new Vector3f(x, bobStartY, 0f); + bobs[i] = createTestNode(1f, bobLocation); + } + + for (int i = 0; i < numFalling; i++) { + float x = -6f - 2.5f * (i + numPendulums); + Vector3f createLocation = new Vector3f(x, bobStartY, 0f); + falling[i] = createTestNode(1f, createLocation); + } + + for (int i = 0; i < numPendulums; i++) { + HingeJoint joint = new HingeJoint( + pivots[i].getControl(RigidBodyControl.class), + bobs[i].getControl(RigidBodyControl.class), + new Vector3f(0f, 0f, 0f), + new Vector3f(length, 0f, 0f), + Vector3f.UNIT_Z.clone(), + Vector3f.UNIT_Z.clone()); + bulletAppState.getPhysicsSpace().add(joint); + } + } + + Node createTestNode(float mass, Vector3f location) { + float size = 0.1f; + Vector3f halfExtents = new Vector3f(size, size, size); + CollisionShape shape = new BoxCollisionShape(halfExtents); + RigidBodyControl control = new RigidBodyControl(shape, mass); + Node node = new Node(); + node.addControl(control); + rootNode.attachChild(node); + bulletAppState.getPhysicsSpace().add(node); + control.setPhysicsLocation(location); + + return node; + } + + @Override + public void simpleUpdate(float tpf) { + if (timeToNextPrint > 0f) { + timeToNextPrint -= tpf; + return; + } + + if (numFalling > 0) { + Vector3f fallingLocation = falling[0].getWorldTranslation(); + System.out.printf(" falling[0] location(x=%f, z=%f)", + fallingLocation.x, fallingLocation.z); + /* + * If an object is falling vertically, its X- and Z-coordinates + * should not change. + */ + } + if (numPendulums > 0) { + Vector3f bobLocation = bobs[0].getWorldTranslation(); + Vector3f pivotLocation = pivots[0].getWorldTranslation(); + float distance = bobLocation.distance(pivotLocation); + System.out.printf(" bob[0] distance=%f", distance); + /* + * If the hinge is working properly, the distance from the + * pivot to the bob should remain roughly constant. + */ + } + System.out.println(); + timeToNextPrint = 1f; + } +} diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestIssue883.java b/jme3-examples/src/main/java/jme3test/bullet/TestIssue883.java new file mode 100644 index 0000000000..f4e794feab --- /dev/null +++ b/jme3-examples/src/main/java/jme3test/bullet/TestIssue883.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2018 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package jme3test.bullet; + +/** + * Test case for JME issue #883: extra physicsTicks in ThreadingType.PARALLEL. + * + * If successful, physics time and frame time will advance at the same rate. + */ +import com.jme3.app.SimpleApplication; +import com.jme3.bullet.BulletAppState; +import com.jme3.bullet.PhysicsSpace; + +public class TestIssue883 extends SimpleApplication { + + boolean firstPrint = true; + float timeToNextPrint = 1f; // in seconds + double frameTime; // in seconds + double physicsTime; // in seconds + + public static void main(String[] args) { + TestIssue883 app = new TestIssue883(); + app.start(); + } + + @Override + public void simpleInitApp() { + + BulletAppState bulletAppState = new BulletAppState() { + @Override + public void physicsTick(PhysicsSpace space, float timeStep) { + physicsTime += timeStep; + } + }; + bulletAppState.setThreadingType(BulletAppState.ThreadingType.PARALLEL); + stateManager.attach(bulletAppState); + } + + @Override + public void simpleUpdate(float tpf) { + frameTime += tpf; + + if (timeToNextPrint > 0f) { + timeToNextPrint -= tpf; + return; + } + + if (firstPrint) { // synchronize + frameTime = 0.; + physicsTime = 0.; + firstPrint = false; + } + + System.out.printf(" frameTime= %s physicsTime= %s%n", + frameTime, physicsTime); + timeToNextPrint = 1f; + } +} diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestIssue889.java b/jme3-examples/src/main/java/jme3test/bullet/TestIssue889.java new file mode 100644 index 0000000000..0704233282 --- /dev/null +++ b/jme3-examples/src/main/java/jme3test/bullet/TestIssue889.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2018 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package jme3test.bullet; + +/** + * Test case for JME issue #889: disabled physics control gets added to a + * physics space. + *

+ * If successful, no debug meshes will be visible. + */ +import com.jme3.app.SimpleApplication; +import com.jme3.bullet.BulletAppState; +import com.jme3.bullet.PhysicsSpace; +import com.jme3.bullet.collision.shapes.BoxCollisionShape; +import com.jme3.bullet.collision.shapes.CollisionShape; +import com.jme3.bullet.collision.shapes.SphereCollisionShape; +import com.jme3.bullet.control.BetterCharacterControl; +import com.jme3.bullet.control.GhostControl; +import com.jme3.bullet.control.RigidBodyControl; +import com.jme3.math.Vector3f; + +public class TestIssue889 extends SimpleApplication { + + public static void main(String[] args) { + TestIssue889 app = new TestIssue889(); + app.start(); + } + + @Override + public void simpleInitApp() { + flyCam.setEnabled(false); + + BulletAppState bulletAppState = new BulletAppState(); + bulletAppState.setDebugEnabled(true); + bulletAppState.setSpeed(0f); + stateManager.attach(bulletAppState); + PhysicsSpace space = bulletAppState.getPhysicsSpace(); + + float radius = 1f; + CollisionShape sphere = new SphereCollisionShape(radius); + CollisionShape box = new BoxCollisionShape(Vector3f.UNIT_XYZ); + + RigidBodyControl rbc = new RigidBodyControl(box); + rbc.setEnabled(false); + rbc.setPhysicsSpace(space); + rootNode.addControl(rbc); + + BetterCharacterControl bcc = new BetterCharacterControl(radius, 4f, 1f); + bcc.setEnabled(false); + bcc.setPhysicsSpace(space); + rootNode.addControl(bcc); + + GhostControl gc = new GhostControl(sphere); + gc.setEnabled(false); + gc.setPhysicsSpace(space); + rootNode.addControl(gc); + } +} diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestIssue894.java b/jme3-examples/src/main/java/jme3test/bullet/TestIssue894.java new file mode 100644 index 0000000000..9fa4616764 --- /dev/null +++ b/jme3-examples/src/main/java/jme3test/bullet/TestIssue894.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2018 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package jme3test.bullet; + +/** + * Test case for JME issue #894: SliderJoint.setRestitutionOrthoLin() sets wrong + * joint parameter. The bug existed in Native Bullet only. + *

+ * If successful, no exception will be thrown during initialization. + */ +import com.jme3.app.SimpleApplication; +import com.jme3.bullet.collision.shapes.CollisionShape; +import com.jme3.bullet.collision.shapes.SphereCollisionShape; +import com.jme3.bullet.joints.SliderJoint; +import com.jme3.bullet.objects.PhysicsRigidBody; +import com.jme3.math.Vector3f; + +public class TestIssue894 extends SimpleApplication { + + public static void main(String[] args) { + TestIssue894 app = new TestIssue894(); + app.start(); + } + + @Override + public void simpleInitApp() { + float radius = 1f; + CollisionShape sphere = new SphereCollisionShape(radius); + + PhysicsRigidBody rb1 = new PhysicsRigidBody(sphere); + PhysicsRigidBody rb2 = new PhysicsRigidBody(sphere); + rb2.setPhysicsLocation(new Vector3f(4f, 0f, 0f)); + + SliderJoint joint = new SliderJoint(rb1, rb2, + new Vector3f(2f, 0f, 0f), + new Vector3f(-2f, 0f, 0f), true); + + joint.setLowerAngLimit(-0.01f); + joint.setLowerLinLimit(-0.02f); + joint.setUpperAngLimit(0.01f); + joint.setUpperLinLimit(0.02f); + + joint.setDampingDirAng(0.03f); + joint.setDampingDirLin(0.04f); + joint.setDampingLimAng(0.05f); + joint.setDampingLimLin(0.06f); + joint.setDampingOrthoAng(0.07f); + joint.setDampingOrthoLin(0.08f); + + joint.setRestitutionDirAng(0.09f); + joint.setRestitutionDirLin(0.10f); + joint.setRestitutionLimAng(0.11f); + joint.setRestitutionLimLin(0.12f); + joint.setRestitutionOrthoAng(0.13f); + joint.setRestitutionOrthoLin(0.14f); + + joint.setSoftnessDirAng(0.15f); + joint.setSoftnessDirLin(0.16f); + joint.setSoftnessLimAng(0.17f); + joint.setSoftnessLimLin(0.18f); + joint.setSoftnessOrthoAng(0.19f); + joint.setSoftnessOrthoLin(0.20f); + + joint.setMaxAngMotorForce(0.21f); + joint.setMaxLinMotorForce(0.22f); + + joint.setTargetAngMotorVelocity(0.23f); + joint.setTargetLinMotorVelocity(0.24f); + + RuntimeException e = new RuntimeException(); + + if (joint.getLowerAngLimit() != -0.01f) { + throw new RuntimeException(); + } + if (joint.getLowerLinLimit() != -0.02f) { + throw new RuntimeException(); + } + if (joint.getUpperAngLimit() != 0.01f) { + throw new RuntimeException(); + } + if (joint.getUpperLinLimit() != 0.02f) { + throw new RuntimeException(); + } + + if (joint.getDampingDirAng() != 0.03f) { + throw new RuntimeException(); + } + if (joint.getDampingDirLin() != 0.04f) { + throw new RuntimeException(); + } + if (joint.getDampingLimAng() != 0.05f) { + throw new RuntimeException(); + } + if (joint.getDampingLimLin() != 0.06f) { + throw new RuntimeException(); + } + if (joint.getDampingOrthoAng() != 0.07f) { + throw new RuntimeException(); + } + if (joint.getDampingOrthoLin() != 0.08f) { + throw new RuntimeException(); + } + + if (joint.getRestitutionDirAng() != 0.09f) { + throw new RuntimeException(); + } + if (joint.getRestitutionDirLin() != 0.10f) { + throw new RuntimeException(); + } + if (joint.getRestitutionLimAng() != 0.11f) { + throw new RuntimeException(); + } + if (joint.getRestitutionLimLin() != 0.12f) { + throw new RuntimeException(); + } + if (joint.getRestitutionOrthoAng() != 0.13f) { + throw new RuntimeException(); + } + if (joint.getRestitutionOrthoLin() != 0.14f) { + throw new RuntimeException(); + } + + if (joint.getSoftnessDirAng() != 0.15f) { + throw new RuntimeException(); + } + if (joint.getSoftnessDirLin() != 0.16f) { + throw new RuntimeException(); + } + if (joint.getSoftnessLimAng() != 0.17f) { + throw new RuntimeException(); + } + if (joint.getSoftnessLimLin() != 0.18f) { + throw new RuntimeException(); + } + if (joint.getSoftnessOrthoAng() != 0.19f) { + throw new RuntimeException(); + } + if (joint.getSoftnessOrthoLin() != 0.20f) { + throw new RuntimeException(); + } + + if (joint.getMaxAngMotorForce() != 0.21f) { + throw new RuntimeException(); + } + if (joint.getMaxLinMotorForce() != 0.22f) { + throw new RuntimeException(); + } + + if (joint.getTargetAngMotorVelocity() != 0.23f) { + throw new RuntimeException(); + } + if (joint.getTargetLinMotorVelocity() != 0.24f) { + throw new RuntimeException(); + } + } +} diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestIssue911.java b/jme3-examples/src/main/java/jme3test/bullet/TestIssue911.java new file mode 100644 index 0000000000..4698add65e --- /dev/null +++ b/jme3-examples/src/main/java/jme3test/bullet/TestIssue911.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2018 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package jme3test.bullet; + +import com.jme3.app.SimpleApplication; +import com.jme3.bullet.collision.shapes.CollisionShape; +import com.jme3.bullet.collision.shapes.SphereCollisionShape; +import com.jme3.bullet.objects.PhysicsRigidBody; + +/** + * Test case for JME issue #911: PhysicsRigidBody sleeping threshold setters + * have unexpected side effects. The bug existed in Native Bullet only. + *

+ * If successful, no exception will be thrown. + */ +public class TestIssue911 extends SimpleApplication { + // ************************************************************************* + // new methods exposed + + public static void main(String[] args) { + TestIssue911 app = new TestIssue911(); + app.start(); + } + // ************************************************************************* + // SimpleApplication methods + + @Override + public void simpleInitApp() { + CollisionShape capsule = new SphereCollisionShape(1f); + PhysicsRigidBody body = new PhysicsRigidBody(capsule, 1f); + assert body.getAngularSleepingThreshold() == 1f; + assert body.getLinearSleepingThreshold() == 0.8f; + + body.setAngularSleepingThreshold(0.03f); + + assert body.getAngularSleepingThreshold() == 0.03f; + float lst = body.getLinearSleepingThreshold(); + assert lst == 0.8f : lst; // fails, actual value is 1f + + body.setLinearSleepingThreshold(0.17f); + + float ast = body.getAngularSleepingThreshold(); + assert ast == 0.03f : ast; // fails, actual value is 1f + + stop(); + } +} diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestIssue918.java b/jme3-examples/src/main/java/jme3test/bullet/TestIssue918.java new file mode 100644 index 0000000000..ed5a726646 --- /dev/null +++ b/jme3-examples/src/main/java/jme3test/bullet/TestIssue918.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2018 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package jme3test.bullet; + +import com.jme3.app.SimpleApplication; +import com.jme3.bullet.collision.shapes.CollisionShape; +import com.jme3.bullet.collision.shapes.SphereCollisionShape; +import com.jme3.bullet.joints.Point2PointJoint; +import com.jme3.bullet.objects.PhysicsRigidBody; +import com.jme3.math.Vector3f; + +/** + * Test case for JME issue #918: Point2PointJoint.getImpulseClamp() and + * .getTau() return the damping value instead. The bug existed in Native Bullet + * only. + *

+ * If successful, no UnsatisfiedLinkError exception will be thrown. + */ +public class TestIssue918 extends SimpleApplication { + // ************************************************************************* + // new methods exposed + + public static void main(String[] args) { + TestIssue918 app = new TestIssue918(); + app.start(); + } + // ************************************************************************* + // SimpleApplication methods + + @Override + public void simpleInitApp() { + CollisionShape capsule = new SphereCollisionShape(1f); + PhysicsRigidBody body1 = new PhysicsRigidBody(capsule, 1f); + PhysicsRigidBody body2 = new PhysicsRigidBody(capsule, 1f); + Vector3f pivot1 = new Vector3f(); + Vector3f pivot2 = new Vector3f(); + Point2PointJoint joint + = new Point2PointJoint(body1, body2, pivot1, pivot2); + + joint.setImpulseClamp(42f); + joint.setTau(99f); + + if (joint.getImpulseClamp() != 42f) { + throw new RuntimeException(); + } + if (joint.getTau() != 99f) { + throw new RuntimeException(); + } + + stop(); + } +} diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestIssue919.java b/jme3-examples/src/main/java/jme3test/bullet/TestIssue919.java new file mode 100644 index 0000000000..3fb6578e0b --- /dev/null +++ b/jme3-examples/src/main/java/jme3test/bullet/TestIssue919.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2018 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package jme3test.bullet; + +import com.jme3.app.SimpleApplication; +import com.jme3.bullet.collision.shapes.CollisionShape; +import com.jme3.bullet.collision.shapes.SphereCollisionShape; +import com.jme3.bullet.joints.SixDofJoint; +import com.jme3.bullet.objects.PhysicsRigidBody; +import com.jme3.math.Vector3f; + +/** + * Test case for JME issue #919: native implementation of + * TranslationalLimitMotor.getLimitSoftness() has wrong name. The bug existed in + * Native Bullet only. + *

+ * If successful, no UnsatisfiedLinkError exception will be thrown. + */ +public class TestIssue919 extends SimpleApplication { + // ************************************************************************* + // new methods exposed + + public static void main(String[] args) { + TestIssue919 app = new TestIssue919(); + app.start(); + } + // ************************************************************************* + // SimpleApplication methods + + @Override + public void simpleInitApp() { + CollisionShape capsule = new SphereCollisionShape(1f); + PhysicsRigidBody body1 = new PhysicsRigidBody(capsule, 1f); + PhysicsRigidBody body2 = new PhysicsRigidBody(capsule, 1f); + Vector3f pivot1 = new Vector3f(); + Vector3f pivot2 = new Vector3f(); + SixDofJoint joint = new SixDofJoint(body1, body2, pivot1, pivot2, true); + + joint.getTranslationalLimitMotor().getLimitSoftness(); + + stop(); + } +} diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestIssue928.java b/jme3-examples/src/main/java/jme3test/bullet/TestIssue928.java new file mode 100644 index 0000000000..886fb8259c --- /dev/null +++ b/jme3-examples/src/main/java/jme3test/bullet/TestIssue928.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2018 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package jme3test.bullet; + +import com.jme3.app.SimpleApplication; +import com.jme3.bullet.BulletAppState; +import com.jme3.bullet.BulletAppState.ThreadingType; + +/** + * Test case for JME issue #928: crash after 64 attached and detached + * BulletAppStates with parallel threading. The bug existed in Native Bullet + * only. + *

+ * If successful, no crash will occur. + */ +public class TestIssue928 extends SimpleApplication { + // ************************************************************************* + // new methods exposed + + public static void main(String[] args) { + TestIssue928 app = new TestIssue928(); + app.start(); + } + + int count = 0; + int frame = 0; + BulletAppState bulletAppState; + // ************************************************************************* + // SimpleApplication methods + + @Override + public void simpleInitApp() { + } + + @Override + public void simpleUpdate(float tpf) { + if (frame % 4 == 0) { + System.out.println(++count); + bulletAppState = new BulletAppState(); + bulletAppState.setThreadingType(ThreadingType.PARALLEL); + stateManager.attach(bulletAppState); + } else if (frame % 4 == 2) { + stateManager.detach(bulletAppState); + } + + frame++; + if (count == 70) { + System.exit(0); + } + } +} diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestIssue931.java b/jme3-examples/src/main/java/jme3test/bullet/TestIssue931.java new file mode 100644 index 0000000000..63d56dd53f --- /dev/null +++ b/jme3-examples/src/main/java/jme3test/bullet/TestIssue931.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2018 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package jme3test.bullet; + +import com.jme3.app.SimpleApplication; +import com.jme3.bullet.BulletAppState; +import com.jme3.bullet.control.KinematicRagdollControl; +import com.jme3.scene.Node; +import com.jme3.scene.Spatial; + +/** + * Test case for JME issue #931: RagdollUtils can miss model meshes or use the + * non-animated ones. + *

+ * If successful, no AssertionError will be thrown. + */ +public class TestIssue931 extends SimpleApplication { + // ************************************************************************* + // new methods exposed + + public static void main(String[] args) { + TestIssue931 app = new TestIssue931(); + app.start(); + } + // ************************************************************************* + // SimpleApplication methods + + @Override + public void simpleInitApp() { + BulletAppState bulletAppState = new BulletAppState(); + stateManager.attach(bulletAppState); + String sinbadPath = "Models/Sinbad/SinbadOldAnim.j3o"; + Node sinbad = (Node) assetManager.loadModel(sinbadPath); + + Node extender = new Node(); + for (Spatial child : sinbad.getChildren()) { + extender.attachChild(child); + } + sinbad.attachChild(extender); + + //Note: PhysicsRagdollControl is still a WIP, constructor will change + KinematicRagdollControl ragdoll = new KinematicRagdollControl(0.5f); + sinbad.addControl(ragdoll); + + stop(); + } +} diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestPhysicsRayCast.java b/jme3-examples/src/main/java/jme3test/bullet/TestPhysicsRayCast.java index 7a1ea5187a..24665b42b7 100644 --- a/jme3-examples/src/main/java/jme3test/bullet/TestPhysicsRayCast.java +++ b/jme3-examples/src/main/java/jme3test/bullet/TestPhysicsRayCast.java @@ -8,9 +8,11 @@ import com.jme3.bullet.control.RigidBodyControl; import com.jme3.bullet.util.CollisionShapeFactory; import com.jme3.font.BitmapText; +import com.jme3.math.Vector3f; import com.jme3.scene.Node; import com.jme3.scene.Spatial; import java.util.List; + /** * * @author @wezrule @@ -42,12 +44,19 @@ public void simpleInitApp() { @Override public void simpleUpdate(float tpf) { - List rayTest = bulletAppState.getPhysicsSpace().rayTest(cam.getLocation(), cam.getLocation().add(cam.getDirection())); + float rayLength = 50f; + Vector3f start = cam.getLocation(); + Vector3f end = cam.getDirection().scaleAdd(rayLength, start); + List rayTest + = bulletAppState.getPhysicsSpace().rayTest(start, end); if (rayTest.size() > 0) { PhysicsRayTestResult get = rayTest.get(0); PhysicsCollisionObject collisionObject = get.getCollisionObject(); - //do stuff + // Display the name of the 1st object in place of FPS. fpsText.setText(collisionObject.getUserObject().toString()); + } else { + // Provide prompt feedback that no collision object was hit. + fpsText.setText("MISSING"); } } diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestQ3.java b/jme3-examples/src/main/java/jme3test/bullet/TestQ3.java index 81d9cb7bf7..01d0c9ade9 100644 --- a/jme3-examples/src/main/java/jme3test/bullet/TestQ3.java +++ b/jme3-examples/src/main/java/jme3test/bullet/TestQ3.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,7 +89,9 @@ public void simpleInitApp() { // load the level from zip or http zip if (useHttp) { - assetManager.registerLocator("http://jmonkeyengine.googlecode.com/files/quake3level.zip", HttpZipLocator.class); + assetManager.registerLocator( + "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jmonkeyengine/quake3level.zip", + HttpZipLocator.class); } else { assetManager.registerLocator("quake3level.zip", ZipLocator.class); } diff --git a/jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java b/jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java index fd934a162e..9dd64be174 100644 --- a/jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java +++ b/jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java @@ -63,7 +63,6 @@ import com.bulletphysics.dynamics.vehicle.RaycastVehicle; import com.bulletphysics.extras.gimpact.GImpactCollisionAlgorithm; import com.jme3.app.AppTask; -import com.jme3.asset.AssetManager; import com.jme3.bullet.collision.PhysicsCollisionEvent; import com.jme3.bullet.collision.PhysicsCollisionEventFactory; import com.jme3.bullet.collision.PhysicsCollisionGroupListener; @@ -84,8 +83,8 @@ import com.jme3.math.Vector3f; import com.jme3.scene.Node; import com.jme3.scene.Spatial; +import com.jme3.util.SafeArrayList; import java.util.ArrayDeque; -import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.LinkedList; @@ -104,9 +103,21 @@ */ public class PhysicsSpace { + /** + * message logger for this class + */ private static final Logger logger = Logger.getLogger(PhysicsSpace.class.getName()); + /** + * index of the X axis + */ public static final int AXIS_X = 0; + /** + * index of the Y axis + */ public static final int AXIS_Y = 1; + /** + * index of the Z axis + */ public static final int AXIS_Z = 2; private static ThreadLocal>> pQueueTL = new ThreadLocal>>() { @@ -129,14 +140,41 @@ protected ConcurrentLinkedQueue> initialValue() { private Map physicsBodies = new ConcurrentHashMap(); private Map physicsJoints = new ConcurrentHashMap(); private Map physicsVehicles = new ConcurrentHashMap(); + /** + * map from collision groups to registered group listeners + */ private Map collisionGroupListeners = new ConcurrentHashMap(); + /** + * queue of registered tick listeners + */ private ConcurrentLinkedQueue tickListeners = new ConcurrentLinkedQueue(); - private ArrayList collisionListeners = new ArrayList(); + /** + * list of registered collision listeners + */ + final private List collisionListeners + = new SafeArrayList<>(PhysicsCollisionListener.class); + /** + * queue of collision events not yet distributed to listeners + */ private ArrayDeque collisionEvents = new ArrayDeque(); private PhysicsCollisionEventFactory eventFactory = new PhysicsCollisionEventFactory(); + /** + * copy of minimum coordinate values when using AXIS_SWEEP broadphase + * algorithms + */ private Vector3f worldMin = new Vector3f(-10000f, -10000f, -10000f); + /** + * copy of maximum coordinate values when using AXIS_SWEEP broadphase + * algorithms + */ private Vector3f worldMax = new Vector3f(10000f, 10000f, 10000f); + /** + * physics time step (in seconds, >0) + */ private float accuracy = 1f / 60f; + /** + * maximum number of physics steps per frame (≥0, default=4) + */ private int maxSubSteps = 4; private javax.vecmath.Vector3f rayVec1 = new javax.vecmath.Vector3f(); private javax.vecmath.Vector3f rayVec2 = new javax.vecmath.Vector3f(); diff --git a/jme3-jbullet/src/main/java/com/jme3/bullet/joints/HingeJoint.java b/jme3-jbullet/src/main/java/com/jme3/bullet/joints/HingeJoint.java index b25f762a45..f32f0193a9 100644 --- a/jme3-jbullet/src/main/java/com/jme3/bullet/joints/HingeJoint.java +++ b/jme3-jbullet/src/main/java/com/jme3/bullet/joints/HingeJoint.java @@ -172,5 +172,6 @@ protected void createJoint() { constraint = new HingeConstraint(nodeA.getObjectId(), nodeB.getObjectId(), Converter.convert(pivotA), Converter.convert(pivotB), Converter.convert(axisA), Converter.convert(axisB)); + ((HingeConstraint) constraint).setAngularOnly(angularOnly); } } diff --git a/jme3-lwjgl3/build.gradle b/jme3-lwjgl3/build.gradle index d388e4aea4..0ac0a55d2c 100644 --- a/jme3-lwjgl3/build.gradle +++ b/jme3-lwjgl3/build.gradle @@ -2,7 +2,7 @@ if (!hasProperty('mainClass')) { ext.mainClass = '' } -def lwjglVersion = '3.1.5' +def lwjglVersion = '3.1.6' sourceCompatibility = '1.8' diff --git a/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwJoystickInput.java b/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwJoystickInput.java index 840e506df1..d8d61805cd 100644 --- a/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwJoystickInput.java +++ b/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwJoystickInput.java @@ -31,16 +31,15 @@ */ package com.jme3.input.lwjgl; -import static org.lwjgl.glfw.GLFW.*; import com.jme3.input.*; import com.jme3.input.event.JoyAxisEvent; import com.jme3.input.event.JoyButtonEvent; - import java.nio.ByteBuffer; import java.nio.FloatBuffer; import java.util.HashMap; import java.util.Map; import java.util.logging.Logger; +import static org.lwjgl.glfw.GLFW.*; /** * The LWJGL implementation of {@link JoyInput}. @@ -53,7 +52,7 @@ public class GlfwJoystickInput implements JoyInput { private static final Logger LOGGER = Logger.getLogger(InputManager.class.getName()); private RawInputListener listener; - private Map joysticks = new HashMap<>(); + private final Map joysticks = new HashMap<>(); private boolean initialized = false; diff --git a/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwKeyInput.java b/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwKeyInput.java index cef732c438..b8049a8f88 100644 --- a/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwKeyInput.java +++ b/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwKeyInput.java @@ -32,17 +32,16 @@ package com.jme3.input.lwjgl; -import static org.lwjgl.glfw.GLFW.*; import com.jme3.input.KeyInput; import com.jme3.input.RawInputListener; import com.jme3.input.event.KeyInputEvent; import com.jme3.system.lwjgl.LwjglWindow; -import org.lwjgl.glfw.GLFWCharCallback; -import org.lwjgl.glfw.GLFWKeyCallback; - -import java.util.LinkedList; +import java.util.ArrayDeque; import java.util.Queue; import java.util.logging.Logger; +import static org.lwjgl.glfw.GLFW.*; +import org.lwjgl.glfw.GLFWCharCallback; +import org.lwjgl.glfw.GLFWKeyCallback; /** * The LWJGL implementation of {@link KeyInput}. @@ -54,12 +53,12 @@ public class GlfwKeyInput implements KeyInput { /** * The queue of key events. */ - private final Queue keyInputEvents = new LinkedList<>(); + private final Queue keyInputEvents = new ArrayDeque<>(); /** * The LWJGL context. */ - private LwjglWindow context; + private final LwjglWindow context; /** * The key callback. diff --git a/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java b/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java index 5790a3f355..f198234a6c 100644 --- a/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java +++ b/jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java @@ -31,7 +31,6 @@ */ package com.jme3.input.lwjgl; -import static org.lwjgl.glfw.GLFW.*; import com.jme3.cursors.plugins.JmeCursor; import com.jme3.input.MouseInput; import com.jme3.input.RawInputListener; @@ -39,17 +38,18 @@ import com.jme3.input.event.MouseMotionEvent; import com.jme3.system.lwjgl.LwjglWindow; import com.jme3.util.BufferUtils; -import org.lwjgl.glfw.*; -import org.lwjgl.system.MemoryStack; -import org.lwjgl.system.MemoryUtil; - import java.nio.ByteBuffer; +import java.nio.DoubleBuffer; import java.nio.IntBuffer; +import java.util.ArrayDeque; import java.util.HashMap; -import java.util.LinkedList; import java.util.Map; import java.util.Queue; import java.util.logging.Logger; +import org.lwjgl.glfw.*; +import static org.lwjgl.glfw.GLFW.*; +import org.lwjgl.system.MemoryStack; +import org.lwjgl.system.MemoryUtil; /** * Captures mouse input using GLFW callbacks. It then temporarily stores these @@ -110,8 +110,8 @@ private static ByteBuffer transformCursorImage(final IntBuffer imageData, final private final Map jmeToGlfwCursorMap = new HashMap<>(); - private final Queue mouseMotionEvents = new LinkedList<>(); - private final Queue mouseButtonEvents = new LinkedList<>(); + private final Queue mouseMotionEvents = new ArrayDeque<>(); + private final Queue mouseButtonEvents = new ArrayDeque<>(); private final LwjglWindow context; @@ -148,14 +148,6 @@ private void onCursorPos(final long window, final double xpos, final double ypos int x = (int) Math.round(xpos); int y = currentHeight - (int) Math.round(ypos); - if (mouseX == 0) { - mouseX = x; - } - - if (mouseY == 0) { - mouseY = y; - } - xDelta = x - mouseX; yDelta = y - mouseY; mouseX = x; @@ -198,6 +190,7 @@ public void initialize() { currentHeight = height.get(); } + initCurrentMousePosition(window); glfwSetCursorPosCallback(window, cursorPosCallback = new GLFWCursorPosCallback() { @Override public void invoke(final long window, final double xpos, final double ypos) { @@ -227,11 +220,40 @@ public void invoke(final long window, final int width, final int height) { } }); + if(listener != null) { + sendFirstMouseEvent(); + } + setCursorVisible(cursorVisible); logger.fine("Mouse created."); initialized = true; } + private void initCurrentMousePosition(long window) { + DoubleBuffer x = BufferUtils.createDoubleBuffer(1); + DoubleBuffer y = BufferUtils.createDoubleBuffer(1); + glfwGetCursorPos(window, x, y); + mouseX = (int) Math.round(x.get()); + mouseY = (int) currentHeight - (int) Math.round(y.get()); + } + + /** + * Send the input listener a special mouse-motion event with zero deltas in + * order to initialize the listener's cursor position. + */ + private void sendFirstMouseEvent() { + assert listener != null; + + int xDelta = 0; + int yDelta = 0; + int wheelDelta = 0; + MouseMotionEvent evt = new MouseMotionEvent(mouseX, mouseY, xDelta, yDelta, + mouseWheel, wheelDelta); + evt.setTime(getInputTimeNanos()); + + listener.onMouseMotionEvent(evt); + } + @Override public boolean isInitialized() { return initialized; @@ -309,6 +331,9 @@ public void setCursorVisible(boolean visible) { @Override public void setInputListener(RawInputListener listener) { this.listener = listener; + if (listener != null && initialized) { + sendFirstMouseEvent(); + } } @Override diff --git a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java index 453258b27c..a5d8254dba 100644 --- a/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java +++ b/jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java @@ -32,9 +32,6 @@ package com.jme3.system.lwjgl; -import static org.lwjgl.glfw.GLFW.*; -import static org.lwjgl.opengl.GL11.GL_FALSE; -import static org.lwjgl.system.MemoryUtil.NULL; import com.jme3.input.JoyInput; import com.jme3.input.KeyInput; import com.jme3.input.MouseInput; @@ -47,9 +44,6 @@ import com.jme3.system.JmeSystem; import com.jme3.system.NanoTimer; import com.jme3.util.BufferUtils; -import org.lwjgl.Version; -import org.lwjgl.glfw.*; - import java.awt.*; import java.awt.image.BufferedImage; import java.nio.ByteBuffer; @@ -59,6 +53,11 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.logging.Level; import java.util.logging.Logger; +import org.lwjgl.Version; +import org.lwjgl.glfw.*; +import static org.lwjgl.glfw.GLFW.*; +import static org.lwjgl.opengl.GL11.GL_FALSE; +import static org.lwjgl.system.MemoryUtil.NULL; /** * A wrapper class over the GLFW framework in LWJGL 3. @@ -383,6 +382,10 @@ protected void destroyContext() { } if (errorCallback != null) { + + // We need to specifically set this to null as we might set a new callback before we reinit GLFW + glfwSetErrorCallback(null); + errorCallback.close(); errorCallback = null; } @@ -401,6 +404,8 @@ protected void destroyContext() { glfwDestroyWindow(window); window = NULL; } + + glfwTerminate(); } catch (final Exception ex) { listener.handleError("Failed to destroy context", ex); } @@ -548,7 +553,6 @@ private void setFrameRateLimit(int frameRateLimit) { /** * De-initialize in the OpenGL thread. */ - protected void deinitInThread() { listener.destroy(); diff --git a/jme3-vr/build.gradle b/jme3-vr/build.gradle index d2c299eb06..7a9ea7d34f 100644 --- a/jme3-vr/build.gradle +++ b/jme3-vr/build.gradle @@ -2,7 +2,7 @@ if (!hasProperty('mainClass')) { ext.mainClass = '' } -def lwjglVersion = '3.1.3' +def lwjglVersion = '3.2.0' sourceCompatibility = '1.8' @@ -18,4 +18,12 @@ dependencies { // Native LibOVR/Oculus support compile "org.lwjgl:lwjgl-ovr:${lwjglVersion}" runtime "org.lwjgl:lwjgl-ovr:${lwjglVersion}:natives-windows" + + // Native OpenVR/LWJGL support + compile "org.lwjgl:lwjgl-openvr:${lwjglVersion}" + compile "org.lwjgl:lwjgl-openvr:${lwjglVersion}:natives-linux" + compile "org.lwjgl:lwjgl-openvr:${lwjglVersion}:natives-macos" + runtime "org.lwjgl:lwjgl-openvr:${lwjglVersion}:natives-windows" + runtime "org.lwjgl:lwjgl-openvr:${lwjglVersion}:natives-linux" + runtime "org.lwjgl:lwjgl-openvr:${lwjglVersion}:natives-macos" } \ No newline at end of file diff --git a/jme3-vr/src/main/java/com/jme3/app/VREnvironment.java b/jme3-vr/src/main/java/com/jme3/app/VREnvironment.java index aaf5249cac..747d3f4a75 100644 --- a/jme3-vr/src/main/java/com/jme3/app/VREnvironment.java +++ b/jme3-vr/src/main/java/com/jme3/app/VREnvironment.java @@ -10,6 +10,9 @@ import com.jme3.input.vr.VRInputAPI; import com.jme3.input.vr.VRMouseManager; import com.jme3.input.vr.VRViewManager; +import com.jme3.input.vr.lwjgl_openvr.LWJGLOpenVR; +import com.jme3.input.vr.lwjgl_openvr.LWJGLOpenVRMouseManager; +import com.jme3.input.vr.lwjgl_openvr.LWJGLOpenVRViewManager; import com.jme3.input.vr.oculus.OculusMouseManager; import com.jme3.input.vr.oculus.OculusVR; import com.jme3.input.vr.oculus.OculusViewManager; @@ -166,6 +169,10 @@ public void setSeatedExperience(boolean isSeated) { } else { ((OpenVR)hardware).getCompositor().SetTrackingSpace.apply(JOpenVRLibrary.ETrackingUniverseOrigin.ETrackingUniverseOrigin_TrackingUniverseStanding); } + } else if (hardware instanceof LWJGLOpenVR) { + if( ((LWJGLOpenVR)hardware).isInitialized() ) { + ((LWJGLOpenVR)hardware).setTrackingSpace(seated); + } } } @@ -406,6 +413,8 @@ public void atttach(AppState appState, Application application){ viewmanager = new OSVRViewManager(this); } else if (vrBinding == VRConstants.SETTING_VRAPI_OCULUSVR_VALUE) { viewmanager = new OculusViewManager(this); + } else if (vrBinding == VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE) { + viewmanager = new LWJGLOpenVRViewManager(this); } else { logger.severe("Cannot instanciate view manager, unknown VRAPI type: "+vrBinding); } @@ -453,6 +462,14 @@ public boolean initialize(){ hardware = new OculusVR(this); initialized = true; logger.config("Creating Occulus Rift wrapper [SUCCESS]"); + } else if (vrBinding == VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE) { + + guiManager = new VRGuiManager(this); + mouseManager = new LWJGLOpenVRMouseManager(this); + + hardware = new LWJGLOpenVR(this); + initialized = true; + logger.config("Creating OpenVR/LWJGL wrapper [SUCCESS]"); } else { logger.config("Cannot create VR binding: "+vrBinding+" [FAILED]"); logger.log(Level.SEVERE, "Cannot initialize VR environment [FAILED]"); diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVR.java b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVR.java new file mode 100644 index 0000000000..3e7c22cd34 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVR.java @@ -0,0 +1,459 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.jme3.input.vr.lwjgl_openvr; + +import com.jme3.app.VREnvironment; +import com.jme3.input.vr.HmdType; +import com.jme3.input.vr.VRAPI; +import com.jme3.math.Matrix4f; +import com.jme3.math.Quaternion; +import com.jme3.math.Vector2f; +import com.jme3.math.Vector3f; +import com.jme3.renderer.Camera; +import com.jme3.util.VRUtil; + +import java.nio.IntBuffer; +import java.util.Locale; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.lwjgl.BufferUtils; +import org.lwjgl.openvr.HmdMatrix34; +import org.lwjgl.openvr.HmdMatrix44; +import org.lwjgl.openvr.TrackedDevicePose; +import org.lwjgl.openvr.VR; +import org.lwjgl.openvr.VRCompositor; +import org.lwjgl.openvr.VRSystem; + +/** + * A class that wraps an OpenVR system. + * @author reden - phr00t + * @author Julien Seinturier - COMEX SA - http://www.seinturier.fr + * @author Rickard Edén + */ +public class LWJGLOpenVR implements VRAPI { + + private static final Logger logger = Logger.getLogger(LWJGLOpenVR.class.getName()); + + private static boolean initSuccess = false; + private static boolean flipEyes = false; + + private IntBuffer hmdDisplayFrequency; + private TrackedDevicePose.Buffer trackedDevicePose; + protected TrackedDevicePose[] hmdTrackedDevicePoses; + + protected IntBuffer hmdErrorStore = BufferUtils.createIntBuffer(1); + + private final Quaternion rotStore = new Quaternion(); + private final Vector3f posStore = new Vector3f(); + + // for debugging latency + private int frames = 0; + + protected Matrix4f[] poseMatrices; + + private final Matrix4f hmdPose = Matrix4f.IDENTITY.clone(); + private Matrix4f hmdProjectionLeftEye; + private Matrix4f hmdProjectionRightEye; + private Matrix4f hmdPoseLeftEye; + private Matrix4f hmdPoseRightEye; + + private Vector3f hmdPoseLeftEyeVec, hmdPoseRightEyeVec, hmdSeatToStand; + + private float vsyncToPhotons; + private double timePerFrame, frameCountRun; + private long frameCount; + private LWJGLOpenVRInput VRinput; + + + private VREnvironment environment = null; + + + /** + * Convert specific OpenVR {@link org.lwjgl.openvr.HmdMatrix34 HmdMatrix34} into JME {@link Matrix4f Matrix4f} + * @param hmdMatrix the input matrix + * @param mat the converted matrix + * @return the converted matrix + */ + public static Matrix4f convertSteamVRMatrix3ToMatrix4f(org.lwjgl.openvr.HmdMatrix34 hmdMatrix, Matrix4f mat){ + mat.set(hmdMatrix.m(0), hmdMatrix.m(1), hmdMatrix.m(2), hmdMatrix.m(3), + hmdMatrix.m(4), hmdMatrix.m(5), hmdMatrix.m(6), hmdMatrix.m(7), + hmdMatrix.m(8), hmdMatrix.m(9), hmdMatrix.m(10), hmdMatrix.m(11), + 0f, 0f, 0f, 1f); + return mat; + } + + /** + * Convert specific OpenVR {@link org.lwjgl.openvr.HmdMatrix34 HmdMatrix34_t} into JME {@link Matrix4f Matrix4f} + * @param hmdMatrix the input matrix + * @param mat the converted matrix + * @return the converted matrix + */ + public static Matrix4f convertSteamVRMatrix4ToMatrix4f(org.lwjgl.openvr.HmdMatrix44 hmdMatrix, Matrix4f mat){ + mat.set(hmdMatrix.m(0), hmdMatrix.m(1), hmdMatrix.m(2), hmdMatrix.m(3), + hmdMatrix.m(4), hmdMatrix.m(5), hmdMatrix.m(6), hmdMatrix.m(7), + hmdMatrix.m(8), hmdMatrix.m(9), hmdMatrix.m(10), hmdMatrix.m(11), + hmdMatrix.m(12), hmdMatrix.m(13), hmdMatrix.m(14), hmdMatrix.m(15)); + return mat; + } + + /** + * Create a new OpenVR system + * attached to the given {@link VREnvironment VR environment}. + * @param environment the VR environment to which this API is attached. + */ + public LWJGLOpenVR(VREnvironment environment){ + this.environment = environment; + } + + @Override + public LWJGLOpenVRInput getVRinput() { + return VRinput; + } + + @Override + public Object getVRSystem() { + throw new UnsupportedOperationException("Not yet implemented!"); + } + + @Override + public Object getCompositor() { + throw new UnsupportedOperationException("Not yet implemented!"); + } + + @Override + public String getName() { + return "OpenVR/LWJGL"; + } + + private static long latencyWaitTime = 0; + + @Override + public void setFlipEyes(boolean set) { + flipEyes = set; + } + + private boolean enableDebugLatency = false; + + @Override + public void printLatencyInfoToConsole(boolean set) { + enableDebugLatency = set; + } + + @Override + public int getDisplayFrequency() { + if( hmdDisplayFrequency == null ) return 0; + return hmdDisplayFrequency.get(0); + } + + @Override + public boolean initialize() { + + logger.config("Initializing OpenVR system..."); + + // Init the native linking to the OpenVR library. + + int result = VR.VR_InitInternal(hmdErrorStore, VR.EVRApplicationType_VRApplication_Scene); + + if(hmdErrorStore.get(0) != VR.EVRInitError_VRInitError_None) { + logger.severe("OpenVR Initialize Result: " + VR.VR_GetVRInitErrorAsEnglishDescription(hmdErrorStore.get(0))); + logger.severe("Initializing OpenVR system [FAILED]"); + return false; + } else { + logger.config("OpenVR initialized & VR connected."); + org.lwjgl.openvr.OpenVR.create(result); + logger.info("Model Number : " + VRSystem.VRSystem_GetStringTrackedDeviceProperty( + VR.k_unTrackedDeviceIndex_Hmd, VR.ETrackedDeviceProperty_Prop_ModelNumber_String, hmdErrorStore)); + logger.info("Serial Number: " + VRSystem.VRSystem_GetStringTrackedDeviceProperty( + VR.k_unTrackedDeviceIndex_Hmd, VR.ETrackedDeviceProperty_Prop_SerialNumber_String, hmdErrorStore)); + + hmdDisplayFrequency = BufferUtils.createIntBuffer(1); + hmdDisplayFrequency.put( (int) VR.ETrackedDeviceProperty_Prop_DisplayFrequency_Float); + + trackedDevicePose = TrackedDevicePose.create(VR.k_unMaxTrackedDeviceCount); + hmdTrackedDevicePoses = new TrackedDevicePose[VR.k_unMaxTrackedDeviceCount]; + poseMatrices = new Matrix4f[VR.k_unMaxTrackedDeviceCount]; + for(int i=0;i 0){ + if(hmdErrorStore.get(0) == VR.EVRInitError_VRInitError_None){ + setTrackingSpace(environment.isSeatedExperience() ); + logger.config("OpenVR Compositor initialized"); + } else { + logger.severe("OpenVR Compositor error: " + hmdErrorStore.get(0)); + } + } else { + logger.log(Level.SEVERE, "Cannot get generic interface for \""+VR.IVRCompositor_Version+"\", "+VR.VR_GetVRInitErrorAsEnglishDescription(hmdErrorStore.get(0))+" ("+hmdErrorStore.get(0)+")"); + } + } + return true; + } + + /** + * Initialize the headset camera. + * @param allowed true is the use of the headset camera is allowed and false otherwise. + * @return token for camera + */ + public long initCamera(boolean allowed) { + hmdErrorStore.put(0, VR.EVRInitError_VRInitError_None); // clear the error store + if( allowed) { + + long result = VR.VR_GetGenericInterface(VR.IVRTrackedCamera_Version, hmdErrorStore); + if (result > 0){ + if(hmdErrorStore.get(0) == VR.EVRInitError_VRInitError_None ){ + logger.config("OpenVR Camera initialized"); + } + return result; + } else { + logger.severe("Failed to initialize camera"); + } + } + return 0; + } + + @Override + public void destroy() { + VR.VR_ShutdownInternal(); + } + + @Override + public boolean isInitialized() { + return initSuccess; + } + + @Override + public void reset() { + VRSystem.VRSystem_ResetSeatedZeroPose(); + hmdSeatToStand = null; + } + + @Override + public void getRenderSize(Vector2f store) { + IntBuffer w = BufferUtils.createIntBuffer(1); + IntBuffer h = BufferUtils.createIntBuffer(1); + VRSystem.VRSystem_GetRecommendedRenderTargetSize(w, h); + logger.config("Recommended render width : " + w.get(0)); + logger.config("Recommended render height: " + h.get(0)); + store.x = w.get(0); + store.y = h.get(0); + } + + @Override + public float getInterpupillaryDistance() { + throw new UnsupportedOperationException("Not yet implemented!"); + } + + @Override + public Quaternion getOrientation() { + VRUtil.convertMatrix4toQuat(hmdPose, rotStore); + return rotStore; + } + + @Override + public Vector3f getPosition() { + // the hmdPose comes in rotated funny, fix that here + hmdPose.toTranslationVector(posStore); + posStore.x = -posStore.x; + posStore.z = -posStore.z; + return posStore; + } + + @Override + public void getPositionAndOrientation(Vector3f storePos, Quaternion storeRot) { + hmdPose.toTranslationVector(storePos); + storePos.x = -storePos.x; + storePos.z = -storePos.z; + storeRot.set(getOrientation()); + } + + @Override + public void updatePose(){ + int result = VRCompositor.nVRCompositor_WaitGetPoses(trackedDevicePose.address(), trackedDevicePose.remaining(), 0, 0); + // NPE when calling without a gamePoseArray. Issue filed with lwjgl #418 +// int result = VRCompositor.VRCompositor_WaitGetPoses(trackedDevicePose, null); + environment.getVRinput().updateControllerStates(); + + // read pose data from native + for (int nDevice = 0; nDevice < VR.k_unMaxTrackedDeviceCount; ++nDevice ){ + if( hmdTrackedDevicePoses[nDevice].bPoseIsValid() ){ + convertSteamVRMatrix3ToMatrix4f(hmdTrackedDevicePoses[nDevice].mDeviceToAbsoluteTracking(), poseMatrices[nDevice]); + } + } + + if ( hmdTrackedDevicePoses[VR.k_unTrackedDeviceIndex_Hmd].bPoseIsValid()){ + hmdPose.set(poseMatrices[VR.k_unTrackedDeviceIndex_Hmd]); + } else { + hmdPose.set(Matrix4f.IDENTITY); + } + } + + @Override + public Matrix4f getHMDMatrixProjectionLeftEye(Camera cam){ + if( hmdProjectionLeftEye != null ) { + return hmdProjectionLeftEye; + } else { + HmdMatrix44 mat = HmdMatrix44.create(); + mat = VRSystem.VRSystem_GetProjectionMatrix(VR.EVREye_Eye_Left, cam.getFrustumNear(), cam.getFrustumFar(), mat); + hmdProjectionLeftEye = new Matrix4f(); + convertSteamVRMatrix4ToMatrix4f(mat, hmdProjectionLeftEye); + return hmdProjectionLeftEye; + } + } + + @Override + public Matrix4f getHMDMatrixProjectionRightEye(Camera cam){ + if( hmdProjectionRightEye != null ) { + return hmdProjectionRightEye; + } else { + HmdMatrix44 mat = HmdMatrix44.create(); + mat = VRSystem.VRSystem_GetProjectionMatrix(VR.EVREye_Eye_Right, cam.getFrustumNear(), cam.getFrustumFar(), mat); + hmdProjectionRightEye = new Matrix4f(); + convertSteamVRMatrix4ToMatrix4f(mat, hmdProjectionRightEye); + return hmdProjectionRightEye; + } + } + + @Override + public Vector3f getHMDVectorPoseLeftEye() { + if( hmdPoseLeftEyeVec == null ) { + hmdPoseLeftEyeVec = getHMDMatrixPoseLeftEye().toTranslationVector(); + // set default IPD if none or broken + if( hmdPoseLeftEyeVec.x <= 0.080f * -0.5f || hmdPoseLeftEyeVec.x >= 0.040f * -0.5f ) { + hmdPoseLeftEyeVec.x = 0.065f * -0.5f; + } + if( flipEyes == false ) hmdPoseLeftEyeVec.x *= -1f; // it seems these need flipping + } + return hmdPoseLeftEyeVec; + } + + @Override + public Vector3f getHMDVectorPoseRightEye() { + if( hmdPoseRightEyeVec == null ) { + hmdPoseRightEyeVec = getHMDMatrixPoseRightEye().toTranslationVector(); + // set default IPD if none or broken + if( hmdPoseRightEyeVec.x >= 0.080f * 0.5f || hmdPoseRightEyeVec.x <= 0.040f * 0.5f ) { + hmdPoseRightEyeVec.x = 0.065f * 0.5f; + } + if( flipEyes == false ) hmdPoseRightEyeVec.x *= -1f; // it seems these need flipping + } + return hmdPoseRightEyeVec; + } + + @Override + public Vector3f getSeatedToAbsolutePosition() { + if( environment.isSeatedExperience() == false ) return Vector3f.ZERO; + if( hmdSeatToStand == null ) { + hmdSeatToStand = new Vector3f(); + + HmdMatrix34 mat = HmdMatrix34.create(); + VRSystem.VRSystem_GetSeatedZeroPoseToStandingAbsoluteTrackingPose(mat); + Matrix4f tempmat = new Matrix4f(); + convertSteamVRMatrix3ToMatrix4f(mat, tempmat); + tempmat.toTranslationVector(hmdSeatToStand); + } + return hmdSeatToStand; + } + + @Override + public Matrix4f getHMDMatrixPoseLeftEye(){ + if( hmdPoseLeftEye != null ) { + return hmdPoseLeftEye; + } else { + HmdMatrix34 mat = HmdMatrix34.create(); + VRSystem.VRSystem_GetEyeToHeadTransform(VR.EVREye_Eye_Left, mat); + hmdPoseLeftEye = new Matrix4f(); + return convertSteamVRMatrix3ToMatrix4f(mat, hmdPoseLeftEye); + } + } + + + @Override + public Matrix4f getHMDMatrixPoseRightEye(){ + if( hmdPoseRightEye != null ) { + return hmdPoseRightEye; + } else { + HmdMatrix34 mat = HmdMatrix34.create(); + VRSystem.VRSystem_GetEyeToHeadTransform(VR.EVREye_Eye_Right, mat); + hmdPoseRightEye = new Matrix4f(); + return convertSteamVRMatrix3ToMatrix4f(mat, hmdPoseRightEye); + } + } + + @Override + public HmdType getType() { + String completeName = ""; + String name = VRSystem.VRSystem_GetStringTrackedDeviceProperty(VR.k_unTrackedDeviceIndex_Hmd, + VR.ETrackedDeviceProperty_Prop_ManufacturerName_String, + 128, hmdErrorStore); + if( hmdErrorStore.get(0) == 0 ) completeName += name; + String number = VRSystem.VRSystem_GetStringTrackedDeviceProperty(VR.k_unTrackedDeviceIndex_Hmd, + VR.ETrackedDeviceProperty_Prop_ModelNumber_String, + 128, hmdErrorStore); + if( hmdErrorStore.get(0) == 0 ) completeName += " " + number; + if( completeName.length() > 0 ) { + completeName = completeName.toLowerCase(Locale.ENGLISH).trim(); + if( completeName.contains("htc") || completeName.contains("vive") ) { + return HmdType.HTC_VIVE; + } else if( completeName.contains("osvr") ) { + return HmdType.OSVR; + } else if( completeName.contains("oculus") || completeName.contains("rift") || + completeName.contains("dk1") || completeName.contains("dk2") || completeName.contains("cv1") ) { + return HmdType.OCULUS_RIFT; + } else if( completeName.contains("fove") ) { + return HmdType.FOVE; + } else if( completeName.contains("game") && completeName.contains("face") ) { + return HmdType.GAMEFACE; + } else if( completeName.contains("morpheus") ) { + return HmdType.MORPHEUS; + } else if( completeName.contains("gear") ) { + return HmdType.GEARVR; + } else if( completeName.contains("star") ) { + return HmdType.STARVR; + } else if( completeName.contains("null") ) { + return HmdType.NULL; + } + } + return HmdType.OTHER; + } + + public void setTrackingSpace(boolean isSeated){ + if( isSeated) { + VRCompositor.VRCompositor_SetTrackingSpace(VR.ETrackingUniverseOrigin_TrackingUniverseSeated); + } else { + VRCompositor.VRCompositor_SetTrackingSpace(VR.ETrackingUniverseOrigin_TrackingUniverseStanding); + } + } + + + public Matrix4f[] getPoseMatrices() { + return poseMatrices; + } + +} \ No newline at end of file diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRBounds.java b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRBounds.java new file mode 100644 index 0000000000..2d10f88888 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRBounds.java @@ -0,0 +1,53 @@ +package com.jme3.input.vr.lwjgl_openvr; + +import com.jme3.input.vr.VRAPI; +import com.jme3.input.vr.VRBounds; +import com.jme3.math.Vector2f; +import com.jme3.util.BufferUtils; +import java.nio.FloatBuffer; + +import java.util.logging.Logger; + +/** + * A class that represents VR world bounds. + * @author reden - phr00t - https://github.com/phr00t + * @author Julien Seinturier - COMEX SA - http://www.seinturier.fr + * @author Rickard Edén + */ +public class LWJGLOpenVRBounds implements VRBounds { + + private static Logger logger = Logger.getLogger(LWJGLOpenVRBounds.class.getName()); + + private Vector2f playSize; + private boolean setup = false; + + /** + * Initialize the VR bounds. + * @return true if the initialization is a success and false otherwise. + */ + public boolean init(VRAPI api) { + + logger.config("Initialize VR bounds..."); + + if( !setup ) { +// vrChaperone = new VR_IVRChaperone_FnTable(JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRChaperone_Version, api.hmdErrorStore).getPointer()); + FloatBuffer fbX = BufferUtils.createFloatBuffer(1); + FloatBuffer fbZ = BufferUtils.createFloatBuffer(1); + org.lwjgl.openvr.VRChaperone.VRChaperone_GetPlayAreaSize(fbX, fbZ); + + playSize = new Vector2f(fbX.get(0), fbZ.get(0)); + setup = true; + logger.config("Initialize VR bounds [SUCCESS]"); + return true; // init success + } + + logger.config("Initialize VR bounds already done."); + return true; // already initialized + } + + @Override + public Vector2f getPlaySize() { + return playSize; + } + +} \ No newline at end of file diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRInput.java b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRInput.java new file mode 100644 index 0000000000..d0f49594d5 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRInput.java @@ -0,0 +1,498 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.jme3.input.vr.lwjgl_openvr; + +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Logger; + +import com.jme3.app.VREnvironment; +import com.jme3.input.vr.VRInputAPI; +import com.jme3.input.vr.VRInputType; +import com.jme3.input.vr.VRTrackedController; +import com.jme3.input.vr.VRViewManager; +import com.jme3.math.Quaternion; +import com.jme3.math.Vector2f; +import com.jme3.math.Vector3f; +import com.jme3.renderer.Camera; +import com.jme3.scene.Spatial; +import com.jme3.util.VRUtil; +import java.nio.IntBuffer; +import org.lwjgl.BufferUtils; +import org.lwjgl.openvr.HmdVector3; +import org.lwjgl.openvr.VR; +import org.lwjgl.openvr.VRControllerState; +import org.lwjgl.openvr.VRSystem; + +/* +make helper functions to pull the following easily from raw data (DONE) +trigger: +Controller#1, Axis#0 X: 0.0, Y: 0.0 +Controller#1, Axis#1 X: 1.0, Y: 0.0 +Controller#1, Axis#2 X: 0.0, Y: 0.0 +Controller#1, Axis#3 X: 0.0, Y: 0.0 +Controller#1, Axis#4 X: 0.0, Y: 0.0 +Button press: 8589934592 (when full), touch: 8589934592 +touchpad (upper left): +Controller#1, Axis#0 X: -0.6059755, Y: 0.2301706 +Controller#1, Axis#1 X: 0.0, Y: 0.0 +Controller#1, Axis#2 X: 0.0, Y: 0.0 +Controller#1, Axis#3 X: 0.0, Y: 0.0 +Controller#1, Axis#4 X: 0.0, Y: 0.0 +Button press: 4294967296 (when pressed in), touch: 4294967296 +grip: +Controller#1, Axis#0 X: 0.0, Y: 0.0 +Controller#1, Axis#1 X: 0.0, Y: 0.0 +Controller#1, Axis#2 X: 0.0, Y: 0.0 +Controller#1, Axis#3 X: 0.0, Y: 0.0 +Controller#1, Axis#4 X: 0.0, Y: 0.0 +Button press: 4, touch: 4 +thumb: +Controller#1, Axis#0 X: 0.0, Y: 0.0 +Controller#1, Axis#1 X: 0.0, Y: 0.0 +Controller#1, Axis#2 X: 0.0, Y: 0.0 +Controller#1, Axis#3 X: 0.0, Y: 0.0 +Controller#1, Axis#4 X: 0.0, Y: 0.0 +Button press: 2, touch: 2 + */ +/** + * A class that wraps an + * OpenVR + * input.
+ * null values will be returned if no valid pose exists, or that + * input device isn't available user code should check for null + * values. + * + * @author reden - phr00t + * @author Julien Seinturier - COMEX SA - http://www.seinturier.fr + * @author Rickard Edén + */ +public class LWJGLOpenVRInput implements VRInputAPI { + + private static final Logger logger = Logger.getLogger(LWJGLOpenVRInput.class.getName()); + + private final VRControllerState[] cStates = new VRControllerState[VR.k_unMaxTrackedDeviceCount]; + + private final Quaternion[] rotStore = new Quaternion[VR.k_unMaxTrackedDeviceCount]; + + private final Vector3f[] posStore = new Vector3f[VR.k_unMaxTrackedDeviceCount]; + + private static final int[] controllerIndex = new int[VR.k_unMaxTrackedDeviceCount]; + + private int controllerCount = 0; + + private final Vector2f tempAxis = new Vector2f(), temp2Axis = new Vector2f(); + + private final Vector2f lastCallAxis[] = new Vector2f[VR.k_unMaxTrackedDeviceCount]; + + private final boolean buttonDown[][] = new boolean[VR.k_unMaxTrackedDeviceCount][16]; + + private float axisMultiplier = 1f; + + private final Vector3f tempVel = new Vector3f(); + + private final Quaternion tempq = new Quaternion(); + + private final VREnvironment environment; + + private List trackedControllers = null; + + /** + * Create a new + * OpenVR + * input attached to the given VR environment. + * + * @param environment the VR environment to which the input is attached. + */ + public LWJGLOpenVRInput(VREnvironment environment) { + this.environment = environment; + } + + @Override + public float getAxisMultiplier() { + return axisMultiplier; + } + + @Override + public void setAxisMultiplier(float set) { + axisMultiplier = set; + } + + @Override + public void swapHands() { + if (controllerCount != 2) { + return; + } + int temp = controllerIndex[0]; + controllerIndex[0] = controllerIndex[1]; + controllerIndex[1] = temp; + } + + @Override + public boolean isButtonDown(int controllerIndex, VRInputType checkButton) { + VRControllerState cs = cStates[LWJGLOpenVRInput.controllerIndex[controllerIndex]]; + switch (checkButton) { + default: + return false; + case ViveGripButton: + return (cs.ulButtonPressed() & 4) != 0; + case ViveMenuButton: + return (cs.ulButtonPressed() & 2) != 0; + case ViveTrackpadAxis: + return (cs.ulButtonPressed() & 4294967296l) != 0; + case ViveTriggerAxis: + return (cs.ulButtonPressed() & 8589934592l) != 0; + } + } + + @Override + public boolean wasButtonPressedSinceLastCall(int controllerIndex, VRInputType checkButton) { + boolean buttonDownNow = isButtonDown(controllerIndex, checkButton); + int checkButtonValue = checkButton.getValue(); + int cIndex = LWJGLOpenVRInput.controllerIndex[controllerIndex]; + boolean retval = buttonDownNow == true && buttonDown[cIndex][checkButtonValue] == false; + buttonDown[cIndex][checkButtonValue] = buttonDownNow; + return retval; + } + + @Override + public void resetInputSinceLastCall() { + for (int i = 0; i < lastCallAxis.length; i++) { + lastCallAxis[i].x = 0f; + lastCallAxis[i].y = 0f; + } + for (int i = 0; i < VR.k_unMaxTrackedDeviceCount; i++) { + for (int j = 0; j < 16; j++) { + buttonDown[i][j] = false; + } + } + } + + @Override + public Vector2f getAxisDeltaSinceLastCall(int controllerIndex, VRInputType forAxis) { + int axisIndex = forAxis.getValue(); + temp2Axis.set(lastCallAxis[axisIndex]); + lastCallAxis[axisIndex].set(getAxis(controllerIndex, forAxis)); + if ((temp2Axis.x != 0f || temp2Axis.y != 0f) && (lastCallAxis[axisIndex].x != 0f || lastCallAxis[axisIndex].y != 0f)) { + temp2Axis.subtractLocal(lastCallAxis[axisIndex]); + } else { + // move made from rest, don't count as a delta move + temp2Axis.x = 0f; + temp2Axis.y = 0f; + } + return temp2Axis; + } + + @Override + public Vector3f getVelocity(int controllerIndex) { + + if (environment != null) { + + if (environment.getVRHardware() instanceof LWJGLOpenVR) { + int index = LWJGLOpenVRInput.controllerIndex[controllerIndex]; +// if( needsNewVelocity[index] ) { + HmdVector3 tempVec = ((LWJGLOpenVR) environment.getVRHardware()).hmdTrackedDevicePoses[index].vVelocity(); +// needsNewVelocity[index] = false; +// } + tempVel.x = tempVec.v(0); + tempVel.y = tempVec.v(1); + tempVel.z = tempVec.v(2); + return tempVel; + } else { + throw new IllegalStateException("VR hardware " + environment.getVRHardware().getClass().getSimpleName() + " is not a subclass of " + LWJGLOpenVR.class.getSimpleName()); + } + } else { + throw new IllegalStateException("VR input is not attached to a VR environment."); + } + } + + @Override + public Vector3f getAngularVelocity(int controllerIndex) { + + if (environment != null) { + + if (environment.getVRHardware() instanceof LWJGLOpenVR) { + + int index = LWJGLOpenVRInput.controllerIndex[controllerIndex]; + HmdVector3 tempVec = ((LWJGLOpenVR) environment.getVRHardware()).hmdTrackedDevicePoses[index].vAngularVelocity(); +// needsNewVelocity[index] = false; +// } + tempVel.x = tempVec.v(0); + tempVel.y = tempVec.v(1); + tempVel.z = tempVec.v(2); + return tempVel; + } else { + throw new IllegalStateException("VR hardware " + environment.getVRHardware().getClass().getSimpleName() + " is not a subclass of " + LWJGLOpenVR.class.getSimpleName()); + } + } else { + throw new IllegalStateException("VR input is not attached to a VR environment."); + } + + } + + @Override + public Vector2f getAxisRaw(int controllerIndex, VRInputType forAxis) { + VRControllerState cs = cStates[LWJGLOpenVRInput.controllerIndex[controllerIndex]]; + switch (forAxis) { + default: + return null; + case ViveTriggerAxis: + tempAxis.x = cs.rAxis(1).x(); + tempAxis.y = tempAxis.x; + break; + case ViveTrackpadAxis: + tempAxis.x = cs.rAxis(0).x(); + tempAxis.y = cs.rAxis(0).y(); + break; + } + return tempAxis; + } + + @Override + public Vector2f getAxis(int controllerIndex, VRInputType forAxis) { + getAxisRaw(controllerIndex, forAxis); + tempAxis.x *= axisMultiplier; + tempAxis.y *= axisMultiplier; + return tempAxis; + } + + @Override + public boolean init() { + + logger.config("Initialize OpenVR input."); + + for (int i = 0; i < VR.k_unMaxTrackedDeviceCount; i++) { + rotStore[i] = new Quaternion(); + posStore[i] = new Vector3f(); + cStates[i] = VRControllerState.create(); + lastCallAxis[i] = new Vector2f(); + logger.config(" Input " + (i + 1) + "/" + VR.k_unMaxTrackedDeviceCount + " binded."); + } + + return true; + } + + @Override + public VRTrackedController getTrackedController(int index) { + if (trackedControllers != null) { + if ((trackedControllers.size() > 0) && (index < trackedControllers.size())) { + return trackedControllers.get(index); + } + } + + return null; + } + + @Override + public int getTrackedControllerCount() { + return controllerCount; + } + + @Override + public VRControllerState getRawControllerState(int index) { + if (isInputDeviceTracking(index) == false) { + return null; + } + return cStates[controllerIndex[index]]; + } + + @Override + public boolean isInputFocused() { + if (environment != null){ + // not a 100% match, but the closest i can find in lwjgl. Doc seems to confirm this too. + return VRSystem.VRSystem_IsInputAvailable(); + //return ((VR_IVRSystem_FnTable)environment.getVRHardware().getVRSystem()).IsInputFocusCapturedByAnotherProcess.apply() == 0; + } else { + throw new IllegalStateException("VR input is not attached to a VR environment."); + } + } + + @Override + public boolean isInputDeviceTracking(int index) { + if (index < 0 || index >= controllerCount) { + return false; + } + + if (environment != null) { + + if (environment.getVRHardware() instanceof LWJGLOpenVR) { + return ((LWJGLOpenVR) environment.getVRHardware()).hmdTrackedDevicePoses[controllerIndex[index]].bPoseIsValid(); + } else { + throw new IllegalStateException("VR hardware " + environment.getVRHardware().getClass().getSimpleName() + " is not a subclass of " + LWJGLOpenVR.class.getSimpleName()); + } + } else { + throw new IllegalStateException("VR input is not attached to a VR environment."); + } + } + + @Override + public Quaternion getOrientation(int index) { + if (isInputDeviceTracking(index) == false) { + return null; + } + + if (environment != null) { + + if (environment.getVRHardware() instanceof LWJGLOpenVR) { + index = controllerIndex[index]; + VRUtil.convertMatrix4toQuat(((LWJGLOpenVR) environment.getVRHardware()).poseMatrices[index], rotStore[index]); + return rotStore[index]; + } else { + throw new IllegalStateException("VR hardware " + environment.getVRHardware().getClass().getSimpleName() + " is not a subclass of " + LWJGLOpenVR.class.getSimpleName()); + } + } else { + throw new IllegalStateException("VR input is not attached to a VR environment."); + } + } + + @Override + public Vector3f getPosition(int index) { + if (isInputDeviceTracking(index) == false) { + return null; + } + + if (environment != null) { + + if (environment.getVRHardware() instanceof LWJGLOpenVR) { + // the hmdPose comes in rotated funny, fix that here + index = controllerIndex[index]; + ((LWJGLOpenVR) environment.getVRHardware()).poseMatrices[index].toTranslationVector(posStore[index]); + posStore[index].x = -posStore[index].x; + posStore[index].z = -posStore[index].z; + return posStore[index]; + } else { + throw new IllegalStateException("VR hardware " + environment.getVRHardware().getClass().getSimpleName() + " is not a subclass of " + LWJGLOpenVR.class.getSimpleName()); + } + } else { + throw new IllegalStateException("VR input is not attached to a VR environment."); + } + + } + + @Override + public Quaternion getFinalObserverRotation(int index) { + + if (environment != null) { + VRViewManager vrvm = environment.getVRViewManager(); + + if (vrvm != null) { + if (isInputDeviceTracking(index) == false) { + return null; + } + + Object obs = environment.getObserver(); + if (obs instanceof Camera) { + tempq.set(((Camera) obs).getRotation()); + } else { + tempq.set(((Spatial) obs).getWorldRotation()); + } + + return tempq.multLocal(getOrientation(index)); + } else { + throw new IllegalStateException("VR environment has no valid view manager."); + } + + } else { + throw new IllegalStateException("VR input is not attached to a VR environment."); + } + } + + @Override + public Vector3f getFinalObserverPosition(int index) { + + if (environment != null) { + VRViewManager vrvm = (VRViewManager) environment.getVRViewManager(); + + if (vrvm != null) { + if (isInputDeviceTracking(index) == false) { + return null; + } + Object obs = environment.getObserver(); + Vector3f pos = getPosition(index); + if (obs instanceof Camera) { + ((Camera) obs).getRotation().mult(pos, pos); + return pos.addLocal(((Camera) obs).getLocation()); + } else { + ((Spatial) obs).getWorldRotation().mult(pos, pos); + return pos.addLocal(((Spatial) obs).getWorldTranslation()); + } + } else { + throw new IllegalStateException("VR environment has no valid view manager."); + } + + } else { + throw new IllegalStateException("VR input is not attached to a VR environment."); + } + } + + @Override + public void triggerHapticPulse(int controllerIndex, float seconds) { + if (environment.isInVR() == false || isInputDeviceTracking(controllerIndex) == false) { + return; + } + + // apparently only axis ID of 0 works + VRSystem.VRSystem_TriggerHapticPulse(LWJGLOpenVRInput.controllerIndex[controllerIndex], + 0, (short) Math.round(3f * seconds / 1e-3f)); + } + + @Override + public void updateConnectedControllers() { + logger.config("Updating connected controllers."); + + if (environment != null) { + controllerCount = 0; + for (int i = 0; i < VR.k_unMaxTrackedDeviceCount; i++) { + int classCallback = VRSystem.VRSystem_GetTrackedDeviceClass(i); + if (classCallback == VR.ETrackedDeviceClass_TrackedDeviceClass_Controller || classCallback == VR.ETrackedDeviceClass_TrackedDeviceClass_GenericTracker) { + IntBuffer error = BufferUtils.createIntBuffer(1); + String controllerName = "Unknown"; + String manufacturerName = "Unknown"; + controllerName = VRSystem.VRSystem_GetStringTrackedDeviceProperty(i, VR.ETrackedDeviceProperty_Prop_TrackingSystemName_String, error); + manufacturerName = VRSystem.VRSystem_GetStringTrackedDeviceProperty(i, VR.ETrackedDeviceProperty_Prop_ManufacturerName_String, error); + + if (error.get(0) != 0) { + logger.warning("Error getting controller information " + controllerName + " " + manufacturerName + "Code (" + error.get(0) + ")"); + } + controllerIndex[controllerCount] = i; + + // Adding tracked controller to control. + if (trackedControllers == null) { + trackedControllers = new ArrayList(VR.k_unMaxTrackedDeviceCount); + } + trackedControllers.add(new LWJGLOpenVRTrackedController(i, this, controllerName, manufacturerName, environment)); + + // Send a Haptic pulse to the controller + triggerHapticPulse(controllerCount, 1.0f); + + controllerCount++; + logger.config(" Tracked controller " + (i + 1) + "/" + VR.k_unMaxTrackedDeviceCount + " " + controllerName + " (" + manufacturerName + ") attached."); + } else { + logger.config(" Controller " + (i + 1) + "/" + VR.k_unMaxTrackedDeviceCount + " ignored."); + } + } + } else { + throw new IllegalStateException("VR input is not attached to a VR environment."); + } + } + + @Override + public void updateControllerStates() { + + if (environment != null) { + for (int i = 0; i < controllerCount; i++) { + int index = controllerIndex[i]; + VRSystem.VRSystem_GetControllerState(index, cStates[index], 64); + cStates[index].ulButtonPressed(); + cStates[index].rAxis(); + } + } else { + throw new IllegalStateException("VR input is not attached to a VR environment."); + } + + } + +} \ No newline at end of file diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRMouseManager.java b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRMouseManager.java new file mode 100644 index 0000000000..6ae3b85ce4 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRMouseManager.java @@ -0,0 +1,114 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.jme3.input.vr.lwjgl_openvr; + +import com.jme3.app.VREnvironment; +import com.jme3.input.controls.AnalogListener; +import com.jme3.input.vr.AbstractVRMouseManager; +import com.jme3.input.vr.VRInputType; +import com.jme3.math.Vector2f; + + +/** + * A class dedicated to the handling of the mouse within VR environment. + * @author Julien Seinturier - COMEX SA - http://www.seinturier.fr + */ +public class LWJGLOpenVRMouseManager extends AbstractVRMouseManager { + + private final int AVERAGE_AMNT = 4; + + private int avgCounter; + + private final float[] lastXmv = new float[AVERAGE_AMNT]; + + private final float[] lastYmv = new float[AVERAGE_AMNT]; + + /** + * Create a new VR mouse manager within the given {@link VREnvironment VR environment}. + * @param environment the VR environment of the mouse manager. + */ + public LWJGLOpenVRMouseManager(VREnvironment environment){ + super(environment); + } + + + @Override + public void updateAnalogAsMouse(int inputIndex, AnalogListener mouseListener, String mouseXName, String mouseYName, float tpf) { + + if (getVREnvironment() != null){ + if (getVREnvironment().getApplication() != null){ + // got a tracked controller to use as the "mouse" + if( getVREnvironment().isInVR() == false || + getVREnvironment().getVRinput() == null || + getVREnvironment().getVRinput().isInputDeviceTracking(inputIndex) == false ){ + return; + } + + Vector2f tpDelta; + // TODO option to use Touch joysticks + if( isThumbstickMode() ) { + tpDelta = getVREnvironment().getVRinput().getAxis(inputIndex, VRInputType.ViveTrackpadAxis); + } else { + tpDelta = getVREnvironment().getVRinput().getAxisDeltaSinceLastCall(inputIndex, VRInputType.ViveTrackpadAxis); + } + + float Xamount = (float)Math.pow(Math.abs(tpDelta.x) * getSpeedSensitivity(), getSpeedAcceleration()); + float Yamount = (float)Math.pow(Math.abs(tpDelta.y) * getSpeedSensitivity(), getSpeedAcceleration()); + + if( tpDelta.x < 0f ){ + Xamount = -Xamount; + } + + if( tpDelta.y < 0f ){ + Yamount = -Yamount; + } + + Xamount *= getMouseMoveScale(); + Yamount *= getMouseMoveScale(); + + if( mouseListener != null ) { + if( tpDelta.x != 0f && mouseXName != null ) mouseListener.onAnalog(mouseXName, Xamount * 0.2f, tpf); + if( tpDelta.y != 0f && mouseYName != null ) mouseListener.onAnalog(mouseYName, Yamount * 0.2f, tpf); + } + + if( getVREnvironment().getApplication().getInputManager().isCursorVisible() ) { + int index = (avgCounter+1) % AVERAGE_AMNT; + lastXmv[index] = Xamount * 133f; + lastYmv[index] = Yamount * 133f; + cursorPos.x -= avg(lastXmv); + cursorPos.y -= avg(lastYmv); + Vector2f maxsize = getVREnvironment().getVRGUIManager().getCanvasSize(); + + if( cursorPos.x > maxsize.x ){ + cursorPos.x = maxsize.x; + } + + if( cursorPos.x < 0f ){ + cursorPos.x = 0f; + } + + if( cursorPos.y > maxsize.y ){ + cursorPos.y = maxsize.y; + } + + if( cursorPos.y < 0f ){ + cursorPos.y = 0f; + } + } + } else { + throw new IllegalStateException("This VR environment is not attached to any application."); + } + } else { + throw new IllegalStateException("This VR view manager is not attached to any VR environment."); + } + } + + private float avg(float[] arr) { + float amt = 0f; + for(float f : arr) amt += f; + return amt / arr.length; + } +} diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRTrackedController.java b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRTrackedController.java new file mode 100644 index 0000000000..c87cea2532 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRTrackedController.java @@ -0,0 +1,100 @@ +package com.jme3.input.vr.lwjgl_openvr; + +import com.jme3.app.VREnvironment; +import com.jme3.input.vr.VRInputAPI; +import com.jme3.input.vr.VRTrackedController; +import com.jme3.math.Matrix4f; +import com.jme3.math.Quaternion; +import com.jme3.math.Vector3f; + +/** + * A controller that is tracked within the VR environment. Such a controller can provide its position within the VR space. + * @author Julien Seinturier - COMEX SA - http://www.seinturier.fr + * @author Rickard Edén + */ +public class LWJGLOpenVRTrackedController implements VRTrackedController{ + + /** + * The index of the controller within the unserlying VR API. + */ + private int controllerIndex = -1; + + /** + * The underlying VRAPI. + */ + private VRInputAPI hardware = null; + + /** + * The name of the controller. + */ + private String name; + + private VREnvironment environment; + + /** + * Wrap a new VR tracked controller on an OpenVR system. + * @param controllerIndex the index of the controller within the underlying VR system. + * @param hardware the underlying VR system. + * @param name the name of the controller. + * @param manufacturer the manufacturer of the controller. + * @param environment the VR environment. + */ + public LWJGLOpenVRTrackedController(int controllerIndex, VRInputAPI hardware, String name, String manufacturer, VREnvironment environment){ + this.controllerIndex = controllerIndex; + this.hardware = hardware; + + this.name = name; + this.manufacturer = manufacturer; + + this.environment = environment; + } + + /** + * The manufacturer of the controller. + */ + private String manufacturer; + + @Override + public Vector3f getPosition() { + if (hardware != null){ + return hardware.getPosition(controllerIndex); + } else { + throw new IllegalStateException("No underlying VR API."); + } + } + + @Override + public Quaternion getOrientation() { + if (hardware != null){ + return hardware.getOrientation(controllerIndex); + } else { + throw new IllegalStateException("No underlying VR API."); + } + } + + @Override + public Matrix4f getPose(){ + + if (environment != null){ + if (hardware != null){ + return ((LWJGLOpenVR)environment.getVRHardware()).getPoseMatrices()[controllerIndex]; + } else { + throw new IllegalStateException("No underlying VR API."); + } + } else { + throw new IllegalStateException("VR tracked device is not attached to any environment."); + } + + + } + + @Override + public String getControllerName() { + return name; + } + + @Override + public String getControllerManufacturer() { + return manufacturer; + } +} \ No newline at end of file diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRViewManager.java b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRViewManager.java new file mode 100644 index 0000000000..78be2565fd --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVRViewManager.java @@ -0,0 +1,573 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package com.jme3.input.vr.lwjgl_openvr; + +import com.jme3.app.VREnvironment; +import com.jme3.input.vr.AbstractVRViewManager; +import com.jme3.input.vr.VRAPI; +import com.jme3.math.ColorRGBA; +import com.jme3.math.Quaternion; +import com.jme3.math.Vector2f; +import com.jme3.math.Vector3f; +import com.jme3.renderer.Camera; +import com.jme3.renderer.ViewPort; +import com.jme3.renderer.queue.RenderQueue.Bucket; +import com.jme3.scene.Spatial; +import com.jme3.texture.FrameBuffer; +import com.jme3.texture.Image; +import com.jme3.texture.Texture2D; +import com.jme3.ui.Picture; +import com.jme3.util.VRGUIPositioningMode; + +import java.util.Iterator; +import java.util.logging.Logger; +import org.lwjgl.openvr.VRTextureBounds; +import org.lwjgl.openvr.Texture; +import org.lwjgl.openvr.VR; +import org.lwjgl.openvr.VRCompositor; + +/** + * A VR view manager based on OpenVR. This class enable to submit 3D views to + * the VR compositor. + * + * @author reden - phr00t + * @author Julien Seinturier - COMEX SA - http://www.seinturier.fr + * @author Rickard Edén + */ +public class LWJGLOpenVRViewManager extends AbstractVRViewManager { + + private static final Logger logger = Logger.getLogger(LWJGLOpenVRViewManager.class.getName()); + + // OpenVR values + private VRTextureBounds leftTextureBounds; + private Texture leftTextureType; + + private VRTextureBounds rightTextureBounds; + private Texture rightTextureType; + + private Texture2D dualEyeTex; + + //final & temp values for camera calculations + private final Vector3f finalPosition = new Vector3f(); + private final Quaternion finalRotation = new Quaternion(); + private final Vector3f hmdPos = new Vector3f(); + private final Quaternion hmdRot = new Quaternion(); + + /** + * Create a new VR view manager attached to the given + * {@link VREnvironment VR environment}. + * + * @param environment the {@link VREnvironment VR environment} to which this + * view manager is attached. + */ + public LWJGLOpenVRViewManager(VREnvironment environment) { + this.environment = environment; + } + + /** + * Get the identifier of the left eye texture. + * + * @return the identifier of the left eye texture. + * @see #getRightTexId() + * @see #getFullTexId() + */ + protected int getLeftTexId() { + return (int) getLeftTexture().getImage().getId(); + } + + /** + * Get the identifier of the right eye texture. + * + * @return the identifier of the right eye texture. + * @see #getLeftTexId() + * @see #getFullTexId() + */ + protected int getRightTexId() { + return (int) getRightTexture().getImage().getId(); + } + + /** + * Get the identifier of the full (dual eye) texture. + * + * @return the identifier of the full (dual eye) texture. + * @see #getLeftTexId() + * @see #getRightTexId() + */ + private int getFullTexId() { + return (int) dualEyeTex.getImage().getId(); + } + + /** + * Initialize the system binds of the textures. + */ + private void initTextureSubmitStructs() { + leftTextureType = Texture.create(); + rightTextureType = Texture.create(); + + if (environment != null) { + if (environment.getVRHardware() instanceof LWJGLOpenVR) { + leftTextureBounds = VRTextureBounds.create(); + rightTextureBounds = VRTextureBounds.create(); + // left eye + leftTextureBounds.set(0f, 0f, 0.5f, 1f); + // right eye + rightTextureBounds.set(0.5f, 0f, 1f, 1f); + // texture type + leftTextureType.set(-1, VR.ETextureType_TextureType_OpenGL, VR.EColorSpace_ColorSpace_Gamma); + rightTextureType.set(-1, VR.ETextureType_TextureType_OpenGL, VR.EColorSpace_ColorSpace_Gamma); + + } + } else { + throw new IllegalStateException("This VR view manager is not attached to any VR environment."); + } + } + + @Override + /** + * updatePose can be called here because appstates are always called before the main renderer. This way we get the latest pose close to when it's supposed to render + */ + public void render() { + if (environment != null) { + // grab the observer + Object obs = environment.getObserver(); + Quaternion objRot; + Vector3f objPos; + if (obs instanceof Camera) { + objRot = ((Camera) obs).getRotation(); + objPos = ((Camera) obs).getLocation(); + } else { + objRot = ((Spatial) obs).getWorldRotation(); + objPos = ((Spatial) obs).getWorldTranslation(); + } + // grab the hardware handle + VRAPI dev = environment.getVRHardware(); + if (dev != null) { + + // update the HMD's position & orientation + dev.updatePose(); + dev.getPositionAndOrientation(hmdPos, hmdRot); + + if (obs != null) { + // update hmdPos based on obs rotation + finalRotation.set(objRot); + finalRotation.mult(hmdPos, hmdPos); + finalRotation.multLocal(hmdRot); + } + + finalizeCamera(dev.getHMDVectorPoseLeftEye(), objPos, getLeftCamera()); + finalizeCamera(dev.getHMDVectorPoseRightEye(), objPos, getRightCamera()); + } else { + getLeftCamera().setFrame(objPos, objRot); + getRightCamera().setFrame(objPos, objRot); + } + } + } + + @Override + public void postRender() { + + if (environment != null) { + if (environment.isInVR()) { + VRAPI api = environment.getVRHardware(); + // using the compositor... + int errl = 0, errr = 0; + if (environment.isInstanceRendering()) { + if (leftTextureType.handle() == -1 || leftTextureType.handle() != getFullTexId()) { + leftTextureType.set(getFullTexId(), leftTextureType.eType(), leftTextureType.eColorSpace()); + } else { + if (api instanceof LWJGLOpenVR) { + int submitFlag = VR.EVRSubmitFlags_Submit_Default; + errr = VRCompositor.VRCompositor_Submit(VR.EVREye_Eye_Right, rightTextureType, rightTextureBounds, submitFlag); + errl = VRCompositor.VRCompositor_Submit(VR.EVREye_Eye_Left, leftTextureType, leftTextureBounds, submitFlag); + } + } + } else if (leftTextureType.handle() == -1 || rightTextureType.handle() == -1 + || leftTextureType.handle() != getLeftTexId() || rightTextureType.handle() != getRightTexId()) { + leftTextureType.set(getLeftTexId(), leftTextureType.eType(), leftTextureType.eColorSpace()); + rightTextureType.set(getRightTexId(), leftTextureType.eType(), leftTextureType.eColorSpace()); + } else { + if (api instanceof LWJGLOpenVR) { + int submitFlag = VR.EVRSubmitFlags_Submit_Default; + errr = VRCompositor.VRCompositor_Submit(VR.EVREye_Eye_Right, rightTextureType, null, submitFlag); + errl = VRCompositor.VRCompositor_Submit(VR.EVREye_Eye_Left, leftTextureType, null, submitFlag); + } else { + + } + } + + if (errl != 0) { + logger.severe("Submit to left compositor error: " + " (" + Integer.toString(errl) + ")"); + logger.severe(" Texture handle: " + leftTextureType.handle()); + + logger.severe(" Left eye texture " + leftEyeTexture.getName() + " (" + leftEyeTexture.getImage().getId() + ")"); + logger.severe(" Type: " + leftEyeTexture.getType()); + logger.severe(" Size: " + leftEyeTexture.getImage().getWidth() + "x" + leftEyeTexture.getImage().getHeight()); + logger.severe(" Image depth: " + leftEyeTexture.getImage().getDepth()); + logger.severe(" Image format: " + leftEyeTexture.getImage().getFormat()); + logger.severe(" Image color space: " + leftEyeTexture.getImage().getColorSpace()); + + } + + if (errr != 0) { + logger.severe("Submit to right compositor error: " + " (" + Integer.toString(errl) + ")"); +// logger.severe(" Texture color space: "+OpenVRUtil.getEColorSpaceString(rightTextureType.eColorSpace)); +// logger.severe(" Texture type: "+OpenVRUtil.getETextureTypeString(rightTextureType.eType)); + logger.severe(" Texture handle: " + rightTextureType.handle()); + + logger.severe(" Right eye texture " + rightEyeTexture.getName() + " (" + rightEyeTexture.getImage().getId() + ")"); + logger.severe(" Type: " + rightEyeTexture.getType()); + logger.severe(" Size: " + rightEyeTexture.getImage().getWidth() + "x" + rightEyeTexture.getImage().getHeight()); + logger.severe(" Image depth: " + rightEyeTexture.getImage().getDepth()); + logger.severe(" Image format: " + rightEyeTexture.getImage().getFormat()); + logger.severe(" Image color space: " + rightEyeTexture.getImage().getColorSpace()); + } + } + } else { + throw new IllegalStateException("This VR view manager is not attached to any VR environment."); + } + + VRCompositor.VRCompositor_PostPresentHandoff(); + + } + + @Override + public void initialize() { + + logger.config("Initializing VR view manager."); + + if (environment != null) { + + initTextureSubmitStructs(); + setupCamerasAndViews(); + setupVRScene(); + moveScreenProcessingToEyes(); + + if (environment.hasTraditionalGUIOverlay()) { + + environment.getVRMouseManager().initialize(); + + // update the pose to position the gui correctly on start + update(0f); + environment.getVRGUIManager().positionGui(); + } + + logger.config("Initialized VR view manager [SUCCESS]"); + + } else { + throw new IllegalStateException("This VR view manager is not attached to any VR environment."); + } + } + + /** + * Prepare the size of the given {@link Camera camera} to adapt it to the + * underlying rendering context. + * + * @param cam the {@link Camera camera} to prepare. + * @param xMult the camera width multiplier. + */ + private void prepareCameraSize(Camera cam, float xMult) { + + if (environment != null) { + + if (environment.getApplication() != null) { + Vector2f size = new Vector2f(); + VRAPI vrhmd = environment.getVRHardware(); + + if (vrhmd == null) { + size.x = 1280f; + size.y = 720f; + } else { + vrhmd.getRenderSize(size); + } + + if (size.x < environment.getApplication().getContext().getSettings().getWidth()) { + size.x = environment.getApplication().getContext().getSettings().getWidth(); + } + if (size.y < environment.getApplication().getContext().getSettings().getHeight()) { + size.y = environment.getApplication().getContext().getSettings().getHeight(); + } + + if (environment.isInstanceRendering()) { + size.x *= 2f; + } + + // other adjustments + size.x *= xMult; + size.x *= getResolutionMuliplier(); + size.y *= getResolutionMuliplier(); + + if (cam.getWidth() != size.x || cam.getHeight() != size.y) { + cam.resize((int) size.x, (int) size.y, false); + } + } else { + throw new IllegalStateException("This VR environment is not attached to any application."); + } + + } else { + throw new IllegalStateException("This VR view manager is not attached to any VR environment."); + } + + } + + /** + * Replaces rootNode as the main cameras scene with the distortion mesh + */ + private void setupVRScene() { + + if (environment != null) { + if (environment.getApplication() != null) { + // no special scene to setup if we are doing instancing + if (environment.isInstanceRendering()) { + // distortion has to be done with compositor here... we want only one pass on our end! + if (environment.getApplication().getContext().getSettings().isSwapBuffers()) { + setupMirrorBuffers(environment.getCamera(), dualEyeTex, true); + } + return; + } + + leftEyeTexture = (Texture2D) getLeftViewPort().getOutputFrameBuffer().getColorBuffer().getTexture(); + rightEyeTexture = (Texture2D) getRightViewPort().getOutputFrameBuffer().getColorBuffer().getTexture(); + leftEyeDepth = (Texture2D) getLeftViewPort().getOutputFrameBuffer().getDepthBuffer().getTexture(); + rightEyeDepth = (Texture2D) getRightViewPort().getOutputFrameBuffer().getDepthBuffer().getTexture(); + + // main viewport is either going to be a distortion scene or nothing + // mirroring is handled by copying framebuffers + Iterator spatialIter = environment.getApplication().getViewPort().getScenes().iterator(); + while (spatialIter.hasNext()) { + environment.getApplication().getViewPort().detachScene(spatialIter.next()); + } + + spatialIter = environment.getApplication().getGuiViewPort().getScenes().iterator(); + while (spatialIter.hasNext()) { + environment.getApplication().getGuiViewPort().detachScene(spatialIter.next()); + } + + // only setup distortion scene if compositor isn't running (or using custom mesh distortion option) + if (environment.getApplication().getContext().getSettings().isSwapBuffers()) { + setupMirrorBuffers(environment.getCamera(), leftEyeTexture, false); + + } + } else { + throw new IllegalStateException("This VR environment is not attached to any application."); + } + } else { + throw new IllegalStateException("This VR view manager is not attached to any VR environment."); + } + } + + @Override + public void update(float tpf) { + + if (environment != null) { + + if (environment.hasTraditionalGUIOverlay()) { + // update the mouse? + environment.getVRMouseManager().update(tpf); + + // update GUI position? + if (environment.getVRGUIManager().isWantsReposition() || environment.getVRGUIManager().getPositioningMode() != VRGUIPositioningMode.MANUAL) { + environment.getVRGUIManager().positionGuiNow(tpf); + environment.getVRGUIManager().updateGuiQuadGeometricState(); + } + } + } else { + throw new IllegalStateException("This VR view manager is not attached to any VR environment."); + } + } + + /** + * Place the camera within the scene. + * + * @param eyePos the eye position. + * @param obsPosition the observer position. + * @param cam the camera to place. + */ + private void finalizeCamera(Vector3f eyePos, Vector3f obsPosition, Camera cam) { + finalRotation.mult(eyePos, finalPosition); + finalPosition.addLocal(hmdPos); + if (obsPosition != null) { + finalPosition.addLocal(obsPosition); + } + finalPosition.y += getHeightAdjustment(); + cam.setFrame(finalPosition, finalRotation); + } + + private void setupCamerasAndViews() { + + if (environment != null) { + // get desired frustum from original camera + Camera origCam = environment.getCamera(); + float fFar = origCam.getFrustumFar(); + float fNear = origCam.getFrustumNear(); + + // restore frustum on distortion scene cam, if needed + if (environment.isInstanceRendering()) { + leftCamera = origCam; + } else if (environment.compositorAllowed() == false) { + origCam.setFrustumFar(100f); + origCam.setFrustumNear(1f); + leftCamera = origCam.clone(); + prepareCameraSize(origCam, 2f); + } else { + leftCamera = origCam.clone(); + } + + getLeftCamera().setFrustumPerspective(environment.getDefaultFOV(), environment.getDefaultAspect(), fNear, fFar); + + prepareCameraSize(getLeftCamera(), 1f); + if (environment.getVRHardware() != null) { + getLeftCamera().setProjectionMatrix(environment.getVRHardware().getHMDMatrixProjectionLeftEye(getLeftCamera())); + } + //org.lwjgl.opengl.GL11.glEnable(org.lwjgl.opengl.GL30.GL_FRAMEBUFFER_SRGB); + + if (!environment.isInstanceRendering()) { + leftViewPort = setupViewBuffers(getLeftCamera(), LEFT_VIEW_NAME); + rightCamera = getLeftCamera().clone(); + if (environment.getVRHardware() != null) { + getRightCamera().setProjectionMatrix(environment.getVRHardware().getHMDMatrixProjectionRightEye(getRightCamera())); + } + rightViewPort = setupViewBuffers(getRightCamera(), RIGHT_VIEW_NAME); + } else { + + if (environment.getApplication() != null) { + + logger.severe("THIS CODE NEED CHANGES !!!"); + leftViewPort = environment.getApplication().getViewPort(); + //leftViewport.attachScene(app.getRootNode()); + rightCamera = getLeftCamera().clone(); + if (environment.getVRHardware() != null) { + getRightCamera().setProjectionMatrix(environment.getVRHardware().getHMDMatrixProjectionRightEye(getRightCamera())); + } + + org.lwjgl.opengl.GL11.glEnable(org.lwjgl.opengl.GL30.GL_CLIP_DISTANCE0); + + //FIXME: [jme-vr] Fix with JMonkey next release + //RenderManager._VRInstancing_RightCamProjection = camRight.getViewProjectionMatrix(); + setupFinalFullTexture(environment.getApplication().getViewPort().getCamera()); + } else { + throw new IllegalStateException("This VR environment is not attached to any application."); + } + + } + + // setup gui + environment.getVRGUIManager().setupGui(getLeftCamera(), getRightCamera(), getLeftViewPort(), getRightViewPort()); + + if (environment.getVRHardware() != null) { + // call these to cache the results internally + environment.getVRHardware().getHMDMatrixPoseLeftEye(); + environment.getVRHardware().getHMDMatrixPoseRightEye(); + } + } else { + throw new IllegalStateException("This VR view manager is not attached to any VR environment."); + } + } + + private ViewPort setupMirrorBuffers(Camera cam, Texture2D tex, boolean expand) { + + if (environment != null) { + if (environment.getApplication() != null) { + Camera clonecam = cam.clone(); + ViewPort viewPort = environment.getApplication().getRenderManager().createPostView("MirrorView", clonecam); + clonecam.setParallelProjection(true); + viewPort.setClearFlags(true, true, true); + viewPort.setBackgroundColor(ColorRGBA.Black); + Picture pic = new Picture("fullscene"); + pic.setLocalTranslation(-0.75f, -0.5f, 0f); + if (expand) { + pic.setLocalScale(3f, 1f, 1f); + } else { + pic.setLocalScale(1.5f, 1f, 1f); + } + pic.setQueueBucket(Bucket.Opaque); + pic.setTexture(environment.getApplication().getAssetManager(), (Texture2D) tex, false); + viewPort.attachScene(pic); + viewPort.setOutputFrameBuffer(null); + + pic.updateGeometricState(); + + return viewPort; + } else { + throw new IllegalStateException("This VR environment is not attached to any application."); + } + } else { + throw new IllegalStateException("This VR view manager is not attached to any VR environment."); + } + } + + private void setupFinalFullTexture(Camera cam) { + + if (environment != null) { + if (environment.getApplication() != null) { + // create offscreen framebuffer + FrameBuffer out = new FrameBuffer(cam.getWidth(), cam.getHeight(), 1); + //offBuffer.setSrgb(true); + + //setup framebuffer's texture + dualEyeTex = new Texture2D(cam.getWidth(), cam.getHeight(), Image.Format.RGBA8); + dualEyeTex.setMinFilter(Texture2D.MinFilter.BilinearNoMipMaps); + dualEyeTex.setMagFilter(Texture2D.MagFilter.Bilinear); + + logger.config("Dual eye texture " + dualEyeTex.getName() + " (" + dualEyeTex.getImage().getId() + ")"); + logger.config(" Type: " + dualEyeTex.getType()); + logger.config(" Size: " + dualEyeTex.getImage().getWidth() + "x" + dualEyeTex.getImage().getHeight()); + logger.config(" Image depth: " + dualEyeTex.getImage().getDepth()); + logger.config(" Image format: " + dualEyeTex.getImage().getFormat()); + logger.config(" Image color space: " + dualEyeTex.getImage().getColorSpace()); + + //setup framebuffer to use texture + out.setDepthBuffer(Image.Format.Depth); + out.setColorTexture(dualEyeTex); + + ViewPort viewPort = environment.getApplication().getViewPort(); + viewPort.setClearFlags(true, true, true); + viewPort.setBackgroundColor(ColorRGBA.Black); + viewPort.setOutputFrameBuffer(out); + } else { + throw new IllegalStateException("This VR environment is not attached to any application."); + } + } else { + throw new IllegalStateException("This VR view manager is not attached to any VR environment."); + } + } + + private ViewPort setupViewBuffers(Camera cam, String viewName) { + + if (environment != null) { + if (environment.getApplication() != null) { + // create offscreen framebuffer + FrameBuffer offBufferLeft = new FrameBuffer(cam.getWidth(), cam.getHeight(), 1); + //offBufferLeft.setSrgb(true); + + //setup framebuffer's texture + Texture2D offTex = new Texture2D(cam.getWidth(), cam.getHeight(), Image.Format.RGBA8); + offTex.setMinFilter(Texture2D.MinFilter.BilinearNoMipMaps); + offTex.setMagFilter(Texture2D.MagFilter.Bilinear); + + //setup framebuffer to use texture + offBufferLeft.setDepthBuffer(Image.Format.Depth); + offBufferLeft.setColorTexture(offTex); + + ViewPort viewPort = environment.getApplication().getRenderManager().createPreView(viewName, cam); + viewPort.setClearFlags(true, true, true); + viewPort.setBackgroundColor(ColorRGBA.Black); + + Iterator spatialIter = environment.getApplication().getViewPort().getScenes().iterator(); + while (spatialIter.hasNext()) { + viewPort.attachScene(spatialIter.next()); + } + + //set viewport to render to offscreen framebuffer + viewPort.setOutputFrameBuffer(offBufferLeft); + return viewPort; + } else { + throw new IllegalStateException("This VR environment is not attached to any application."); + } + } else { + throw new IllegalStateException("This VR view manager is not attached to any VR environment."); + } + } + +} \ No newline at end of file diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusViewManager.java b/jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusViewManager.java index 517d8d2651..0a008af419 100644 --- a/jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusViewManager.java +++ b/jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusViewManager.java @@ -38,16 +38,16 @@ import com.jme3.renderer.Camera; import com.jme3.renderer.ViewPort; import com.jme3.scene.Spatial; -import com.jme3.texture.*; import com.jme3.util.BufferUtils; import com.jme3.util.VRGUIPositioningMode; import java.nio.IntBuffer; import java.util.Iterator; import java.util.Objects; -import java.util.logging.Logger; -import org.lwjgl.ovr.*; +import org.lwjgl.ovr.OVRFovPort; +import org.lwjgl.ovr.OVRPosef; +import org.lwjgl.ovr.OVRUtil; import static org.lwjgl.ovr.OVR.*; import static org.lwjgl.ovr.OVRErrorCode.*; @@ -59,8 +59,6 @@ */ public class OculusViewManager extends AbstractVRViewManager { - private static final Logger LOG = Logger.getLogger(OculusViewManager.class.getName()); - private final VREnvironment environment; private final OculusVR hardware; diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVR.java b/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVR.java index 8e10ecd0a6..ef70bccbc1 100644 --- a/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVR.java +++ b/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVR.java @@ -87,6 +87,35 @@ public class OpenVR implements VRAPI { private VREnvironment environment = null; + /** + * Convert specific OpenVR {@link com.jme3.system.jopenvr.HmdMatrix34_t HmdMatrix34_t} into JME {@link Matrix4f Matrix4f} + * @param hmdMatrix the input matrix + * @param mat the converted matrix + * @return the converted matrix + */ + public static Matrix4f convertSteamVRMatrix3ToMatrix4f(com.jme3.system.jopenvr.HmdMatrix34_t hmdMatrix, Matrix4f mat){ + mat.set(hmdMatrix.m[0], hmdMatrix.m[1], hmdMatrix.m[2], hmdMatrix.m[3], + hmdMatrix.m[4], hmdMatrix.m[5], hmdMatrix.m[6], hmdMatrix.m[7], + hmdMatrix.m[8], hmdMatrix.m[9], hmdMatrix.m[10], hmdMatrix.m[11], + 0f, 0f, 0f, 1f); + return mat; + } + + /** + * Convert specific OpenVR {@link com.jme3.system.jopenvr.HmdMatrix44_t HmdMatrix34_t} into JME {@link Matrix4f Matrix4f} + * @param hmdMatrix the input matrix + * @param mat the converted matrix + * @return the converted matrix + */ + public static Matrix4f convertSteamVRMatrix4ToMatrix4f(com.jme3.system.jopenvr.HmdMatrix44_t hmdMatrix, Matrix4f mat){ + mat.set(hmdMatrix.m[0], hmdMatrix.m[1], hmdMatrix.m[2], hmdMatrix.m[3], + hmdMatrix.m[4], hmdMatrix.m[5], hmdMatrix.m[6], hmdMatrix.m[7], + hmdMatrix.m[8], hmdMatrix.m[9], hmdMatrix.m[10], hmdMatrix.m[11], + hmdMatrix.m[12], hmdMatrix.m[13], hmdMatrix.m[14], hmdMatrix.m[15]); + return mat; + } + + /** * Create a new OpenVR system * attached to the given {@link VREnvironment VR environment}. @@ -418,7 +447,7 @@ public void updatePose(){ hmdTrackedDevicePoses[nDevice].readField("bPoseIsValid"); if( hmdTrackedDevicePoses[nDevice].bPoseIsValid != 0 ){ hmdTrackedDevicePoses[nDevice].readField("mDeviceToAbsoluteTracking"); - VRUtil.convertSteamVRMatrix3ToMatrix4f(hmdTrackedDevicePoses[nDevice].mDeviceToAbsoluteTracking, poseMatrices[nDevice]); + convertSteamVRMatrix3ToMatrix4f(hmdTrackedDevicePoses[nDevice].mDeviceToAbsoluteTracking, poseMatrices[nDevice]); } } @@ -438,7 +467,7 @@ public Matrix4f getHMDMatrixProjectionLeftEye(Camera cam){ } else { HmdMatrix44_t mat = vrsystemFunctions.GetProjectionMatrix.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Left, cam.getFrustumNear(), cam.getFrustumFar()); hmdProjectionLeftEye = new Matrix4f(); - VRUtil.convertSteamVRMatrix4ToMatrix4f(mat, hmdProjectionLeftEye); + convertSteamVRMatrix4ToMatrix4f(mat, hmdProjectionLeftEye); return hmdProjectionLeftEye; } } @@ -452,7 +481,7 @@ public Matrix4f getHMDMatrixProjectionRightEye(Camera cam){ } else { HmdMatrix44_t mat = vrsystemFunctions.GetProjectionMatrix.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Right, cam.getFrustumNear(), cam.getFrustumFar()); hmdProjectionRightEye = new Matrix4f(); - VRUtil.convertSteamVRMatrix4ToMatrix4f(mat, hmdProjectionRightEye); + convertSteamVRMatrix4ToMatrix4f(mat, hmdProjectionRightEye); return hmdProjectionRightEye; } } @@ -490,7 +519,7 @@ public Vector3f getSeatedToAbsolutePosition() { hmdSeatToStand = new Vector3f(); HmdMatrix34_t mat = vrsystemFunctions.GetSeatedZeroPoseToStandingAbsoluteTrackingPose.apply(); Matrix4f tempmat = new Matrix4f(); - VRUtil.convertSteamVRMatrix3ToMatrix4f(mat, tempmat); + convertSteamVRMatrix3ToMatrix4f(mat, tempmat); tempmat.toTranslationVector(hmdSeatToStand); } return hmdSeatToStand; @@ -505,7 +534,7 @@ public Matrix4f getHMDMatrixPoseLeftEye(){ } else { HmdMatrix34_t mat = vrsystemFunctions.GetEyeToHeadTransform.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Left); hmdPoseLeftEye = new Matrix4f(); - return VRUtil.convertSteamVRMatrix3ToMatrix4f(mat, hmdPoseLeftEye); + return convertSteamVRMatrix3ToMatrix4f(mat, hmdPoseLeftEye); } } @@ -559,7 +588,7 @@ public Matrix4f getHMDMatrixPoseRightEye(){ } else { HmdMatrix34_t mat = vrsystemFunctions.GetEyeToHeadTransform.apply(JOpenVRLibrary.EVREye.EVREye_Eye_Right); hmdPoseRightEye = new Matrix4f(); - return VRUtil.convertSteamVRMatrix3ToMatrix4f(mat, hmdPoseRightEye); + return convertSteamVRMatrix3ToMatrix4f(mat, hmdPoseRightEye); } } diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRInput.java b/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRInput.java index 08c697fa2e..b1e2f27933 100644 --- a/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRInput.java +++ b/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRInput.java @@ -322,7 +322,7 @@ public VRControllerState_t getRawControllerState(int index) { public boolean isInputFocused() { if (environment != null){ - return ((VR_IVRSystem_FnTable)environment.getVRHardware().getVRSystem()).IsInputFocusCapturedByAnotherProcess.apply() == 0; + return ((VR_IVRSystem_FnTable)environment.getVRHardware().getVRSystem()).IsInputAvailable.apply() == 0; } else { throw new IllegalStateException("VR input is not attached to a VR environment."); } diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRTrackedController.java b/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRTrackedController.java index 741a518e61..ba9d06546e 100644 --- a/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRTrackedController.java +++ b/jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRTrackedController.java @@ -7,7 +7,7 @@ import com.jme3.math.Vector3f; /** - * + * A controller that is tracked within the VR environment. Such a controller can provide its position within the VR space. * @author Julien Seinturier - COMEX SA - http://www.seinturier.fr * */ diff --git a/jme3-vr/src/main/java/com/jme3/post/OpenVRFilter.java b/jme3-vr/src/main/java/com/jme3/post/OpenVRFilter.java deleted file mode 100644 index 61cf840ede..0000000000 --- a/jme3-vr/src/main/java/com/jme3/post/OpenVRFilter.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package com.jme3.post; - -import com.jme3.app.VRApplication; -import com.jme3.asset.AssetManager; -import com.jme3.material.Material; -import com.jme3.post.Filter; -import com.jme3.renderer.RenderManager; -import com.jme3.renderer.Renderer; -import com.jme3.renderer.ViewPort; -import com.jme3.scene.Mesh; -import com.jme3.scene.VertexBuffer; -import com.jme3.system.jopenvr.DistortionCoordinates_t; -import com.jme3.system.jopenvr.JOpenVRLibrary; -import com.jme3.system.jopenvr.VR_IVRSystem_FnTable; -import com.jme3.texture.FrameBuffer; - -/** - * DO NOT USE - * @author phr00t - * @deprecated DO NOT USE - */ -@Deprecated -public class OpenVRFilter extends Filter { - - private Mesh distortionMesh; - - private VRApplication application = null; - - /** - * DO NOT USE - * @param application the VR application. - */ - public OpenVRFilter(VRApplication application) { - this.application = application; - } - - /** - * DO NOT USE - * @return the distortion mesh. - */ - public Mesh getDistortionMesh() { - return distortionMesh; - } - - @Override - protected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h) { - material = new Material(manager, "Common/MatDefs/VR/OpenVR.j3md"); - configureDistortionMesh(); - } - - @Override - protected Material getMaterial() { - return material; - - } - - @Override - protected void preFrame(float tpf) { - super.preFrame(tpf); - } - - @Override - protected void postFrame(RenderManager renderManager, ViewPort viewPort, FrameBuffer prevFilterBuffer, FrameBuffer sceneBuffer) { - super.postFrame(renderManager, viewPort, prevFilterBuffer, sceneBuffer); - } - - @Override - protected void postFilter(Renderer r, FrameBuffer buffer) { - super.postFilter(r, buffer); - } - - /* - function converted from: - https://github.com/ValveSoftware/openvr/blob/master/samples/hellovr_opengl/hellovr_opengl_main.cpp#L1335 - */ - private void configureDistortionMesh() { - float m_iLensGridSegmentCountH = 43, m_iLensGridSegmentCountV = 43; - - float w = 1f / m_iLensGridSegmentCountH - 1f; - float h = 1f / m_iLensGridSegmentCountV - 1f; - - float u, v; - - distortionMesh = new Mesh(); - float verts[] = new float[(int)(m_iLensGridSegmentCountV * m_iLensGridSegmentCountH) * 3]; - - float texcoordR[] = new float[(int)(m_iLensGridSegmentCountV * m_iLensGridSegmentCountH) * 2]; - float texcoordG[] = new float[(int)(m_iLensGridSegmentCountV * m_iLensGridSegmentCountH) * 2]; - float texcoordB[] = new float[(int)(m_iLensGridSegmentCountV * m_iLensGridSegmentCountH) * 2]; - - int vertPos = 0, coordPos = 0; - - //left eye distortion verts - float Xoffset = -1f; - for( int y=0; y vIndices; - int[] indices = new int[(int)((m_iLensGridSegmentCountV - 1) * (m_iLensGridSegmentCountH - 1)) * 6]; - int indexPos = 0; - int a,b,c,d; - - int offset = 0; - for( int y=0; ynative declaration : headers\openvr_capi.h:1160
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class AppOverrideKeys_t extends Structure { + * native declaration : headers\openvr_capi.h:1485
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class AppOverrideKeys_t extends Structure { /** - * const char *
- * C type : char* - */ - public Pointer pchKey; + * const char *
+ * C type : char* + */ + public Pointer pchKey; /** - * const char *
- * C type : char* - */ - public Pointer pchValue; - public AppOverrideKeys_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("pchKey", "pchValue"); - } + * const char *
+ * C type : char* + */ + public Pointer pchValue; + public AppOverrideKeys_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("pchKey", "pchValue"); + } /** - * @param pchKey const char *
- * C type : char*
- * @param pchValue const char *
- * C type : char* - */ - public AppOverrideKeys_t(Pointer pchKey, Pointer pchValue) { - super(); - this.pchKey = pchKey; - this.pchValue = pchValue; - } - public AppOverrideKeys_t(Pointer peer) { - super(peer); - } - public static class ByReference extends AppOverrideKeys_t implements Structure.ByReference { - - }; - public static class ByValue extends AppOverrideKeys_t implements Structure.ByValue { - - }; + * @param pchKey const char *
+ * C type : char*
+ * @param pchValue const char *
+ * C type : char* + */ + public AppOverrideKeys_t(Pointer pchKey, Pointer pchValue) { + super(); + this.pchKey = pchKey; + this.pchValue = pchValue; + } + public AppOverrideKeys_t(Pointer peer) { + super(peer); + } + public static class ByReference extends AppOverrideKeys_t implements Structure.ByReference { + + }; + public static class ByValue extends AppOverrideKeys_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/COpenVRContext.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/COpenVRContext.java index 8f85d1e5c7..b57646031b 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/COpenVRContext.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/COpenVRContext.java @@ -5,90 +5,105 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1291
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class COpenVRContext extends Structure { - /** - * class vr::IVRSystem *
- * C type : intptr_t - */ - public IntByReference m_pVRSystem; - /** - * class vr::IVRChaperone *
- * C type : intptr_t - */ - public IntByReference m_pVRChaperone; - /** - * class vr::IVRChaperoneSetup *
- * C type : intptr_t - */ - public IntByReference m_pVRChaperoneSetup; - /** - * class vr::IVRCompositor *
- * C type : intptr_t - */ - public IntByReference m_pVRCompositor; - /** - * class vr::IVROverlay *
- * C type : intptr_t - */ - public IntByReference m_pVROverlay; - /** - * class vr::IVRResources *
- * C type : intptr_t - */ - public IntByReference m_pVRResources; - /** - * class vr::IVRRenderModels *
- * C type : intptr_t - */ - public IntByReference m_pVRRenderModels; - /** - * class vr::IVRExtendedDisplay *
- * C type : intptr_t - */ - public IntByReference m_pVRExtendedDisplay; - /** - * class vr::IVRSettings *
- * C type : intptr_t - */ - public IntByReference m_pVRSettings; - /** - * class vr::IVRApplications *
- * C type : intptr_t - */ - public IntByReference m_pVRApplications; - /** - * class vr::IVRTrackedCamera *
- * C type : intptr_t - */ - public IntByReference m_pVRTrackedCamera; - /** - * class vr::IVRScreenshots *
- * C type : intptr_t - */ - public IntByReference m_pVRScreenshots; - /** - * class vr::IVRDriverManager *
- * C type : intptr_t - */ - public IntByReference m_pVRDriverManager; - public COpenVRContext() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m_pVRSystem", "m_pVRChaperone", "m_pVRChaperoneSetup", "m_pVRCompositor", "m_pVROverlay", "m_pVRResources", "m_pVRRenderModels", "m_pVRExtendedDisplay", "m_pVRSettings", "m_pVRApplications", "m_pVRTrackedCamera", "m_pVRScreenshots", "m_pVRDriverManager"); - } - public COpenVRContext(Pointer peer) { - super(peer); - } - public static class ByReference extends COpenVRContext implements Structure.ByReference { - - }; - public static class ByValue extends COpenVRContext implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1670
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class COpenVRContext extends Structure { + /** + * class vr::IVRSystem *
+ * C type : intptr_t + */ + public IntByReference m_pVRSystem; + /** + * class vr::IVRChaperone *
+ * C type : intptr_t + */ + public IntByReference m_pVRChaperone; + /** + * class vr::IVRChaperoneSetup *
+ * C type : intptr_t + */ + public IntByReference m_pVRChaperoneSetup; + /** + * class vr::IVRCompositor *
+ * C type : intptr_t + */ + public IntByReference m_pVRCompositor; + /** + * class vr::IVROverlay *
+ * C type : intptr_t + */ + public IntByReference m_pVROverlay; + /** + * class vr::IVRResources *
+ * C type : intptr_t + */ + public IntByReference m_pVRResources; + /** + * class vr::IVRRenderModels *
+ * C type : intptr_t + */ + public IntByReference m_pVRRenderModels; + /** + * class vr::IVRExtendedDisplay *
+ * C type : intptr_t + */ + public IntByReference m_pVRExtendedDisplay; + /** + * class vr::IVRSettings *
+ * C type : intptr_t + */ + public IntByReference m_pVRSettings; + /** + * class vr::IVRApplications *
+ * C type : intptr_t + */ + public IntByReference m_pVRApplications; + /** + * class vr::IVRTrackedCamera *
+ * C type : intptr_t + */ + public IntByReference m_pVRTrackedCamera; + /** + * class vr::IVRScreenshots *
+ * C type : intptr_t + */ + public IntByReference m_pVRScreenshots; + /** + * class vr::IVRDriverManager *
+ * C type : intptr_t + */ + public IntByReference m_pVRDriverManager; + /** + * class vr::IVRInput *
+ * C type : intptr_t + */ + public IntByReference m_pVRInput; + /** + * class vr::IVRIOBuffer *
+ * C type : intptr_t + */ + public IntByReference m_pVRIOBuffer; + /** + * class vr::IVRSpatialAnchors *
+ * C type : intptr_t + */ + public IntByReference m_pVRSpatialAnchors; + public COpenVRContext() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_pVRSystem", "m_pVRChaperone", "m_pVRChaperoneSetup", "m_pVRCompositor", "m_pVROverlay", "m_pVRResources", "m_pVRRenderModels", "m_pVRExtendedDisplay", "m_pVRSettings", "m_pVRApplications", "m_pVRTrackedCamera", "m_pVRScreenshots", "m_pVRDriverManager", "m_pVRInput", "m_pVRIOBuffer", "m_pVRSpatialAnchors"); + } + public COpenVRContext(Pointer peer) { + super(peer); + } + public static class ByReference extends COpenVRContext implements Structure.ByReference { + + }; + public static class ByValue extends COpenVRContext implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/CVRSettingHelper.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/CVRSettingHelper.java new file mode 100644 index 0000000000..d2c37f9df1 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/CVRSettingHelper.java @@ -0,0 +1,42 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import com.sun.jna.ptr.IntByReference; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1592
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class CVRSettingHelper extends Structure { + /** + * class vr::IVRSettings *
+ * C type : intptr_t + */ + public IntByReference m_pSettings; + public CVRSettingHelper() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_pSettings"); + } + /** + * @param m_pSettings class vr::IVRSettings *
+ * C type : intptr_t + */ + public CVRSettingHelper(IntByReference m_pSettings) { + super(); + this.m_pSettings = m_pSettings; + } + public CVRSettingHelper(Pointer peer) { + super(peer); + } + public static class ByReference extends CVRSettingHelper implements Structure.ByReference { + + }; + public static class ByValue extends CVRSettingHelper implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/CameraVideoStreamFrameHeader_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/CameraVideoStreamFrameHeader_t.java index d7f7f690b4..dd7f346f78 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/CameraVideoStreamFrameHeader_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/CameraVideoStreamFrameHeader_t.java @@ -4,50 +4,50 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1154
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class CameraVideoStreamFrameHeader_t extends Structure { + * native declaration : headers\openvr_capi.h:1466
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class CameraVideoStreamFrameHeader_t extends Structure { /** - * @see EVRTrackedCameraFrameType
- * C type : EVRTrackedCameraFrameType - */ - public int eFrameType; - public int nWidth; - public int nHeight; - public int nBytesPerPixel; - public int nFrameSequence; - /** C type : TrackedDevicePose_t */ - public TrackedDevicePose_t standingTrackedDevicePose; - public CameraVideoStreamFrameHeader_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("eFrameType", "nWidth", "nHeight", "nBytesPerPixel", "nFrameSequence", "standingTrackedDevicePose"); - } + * @see EVRTrackedCameraFrameType
+ * C type : EVRTrackedCameraFrameType + */ + public int eFrameType; + public int nWidth; + public int nHeight; + public int nBytesPerPixel; + public int nFrameSequence; + /** C type : TrackedDevicePose_t */ + public TrackedDevicePose_t standingTrackedDevicePose; + public CameraVideoStreamFrameHeader_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("eFrameType", "nWidth", "nHeight", "nBytesPerPixel", "nFrameSequence", "standingTrackedDevicePose"); + } /** - * @param eFrameType @see EVRTrackedCameraFrameType
- * C type : EVRTrackedCameraFrameType
- * @param standingTrackedDevicePose C type : TrackedDevicePose_t - */ - public CameraVideoStreamFrameHeader_t(int eFrameType, int nWidth, int nHeight, int nBytesPerPixel, int nFrameSequence, TrackedDevicePose_t standingTrackedDevicePose) { - super(); - this.eFrameType = eFrameType; - this.nWidth = nWidth; - this.nHeight = nHeight; - this.nBytesPerPixel = nBytesPerPixel; - this.nFrameSequence = nFrameSequence; - this.standingTrackedDevicePose = standingTrackedDevicePose; - } - public CameraVideoStreamFrameHeader_t(Pointer peer) { - super(peer); - } - public static class ByReference extends CameraVideoStreamFrameHeader_t implements Structure.ByReference { - - }; - public static class ByValue extends CameraVideoStreamFrameHeader_t implements Structure.ByValue { - - }; + * @param eFrameType @see EVRTrackedCameraFrameType
+ * C type : EVRTrackedCameraFrameType
+ * @param standingTrackedDevicePose C type : TrackedDevicePose_t + */ + public CameraVideoStreamFrameHeader_t(int eFrameType, int nWidth, int nHeight, int nBytesPerPixel, int nFrameSequence, TrackedDevicePose_t standingTrackedDevicePose) { + super(); + this.eFrameType = eFrameType; + this.nWidth = nWidth; + this.nHeight = nHeight; + this.nBytesPerPixel = nBytesPerPixel; + this.nFrameSequence = nFrameSequence; + this.standingTrackedDevicePose = standingTrackedDevicePose; + } + public CameraVideoStreamFrameHeader_t(Pointer peer) { + super(peer); + } + public static class ByReference extends CameraVideoStreamFrameHeader_t implements Structure.ByReference { + + }; + public static class ByValue extends CameraVideoStreamFrameHeader_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_CumulativeStats.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_CumulativeStats.java index 23f44fb911..c2e741fa42 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_CumulativeStats.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_CumulativeStats.java @@ -4,40 +4,40 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1203
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class Compositor_CumulativeStats extends Structure { - public int m_nPid; - public int m_nNumFramePresents; - public int m_nNumDroppedFrames; - public int m_nNumReprojectedFrames; - public int m_nNumFramePresentsOnStartup; - public int m_nNumDroppedFramesOnStartup; - public int m_nNumReprojectedFramesOnStartup; - public int m_nNumLoading; - public int m_nNumFramePresentsLoading; - public int m_nNumDroppedFramesLoading; - public int m_nNumReprojectedFramesLoading; - public int m_nNumTimedOut; - public int m_nNumFramePresentsTimedOut; - public int m_nNumDroppedFramesTimedOut; - public int m_nNumReprojectedFramesTimedOut; - public Compositor_CumulativeStats() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m_nPid", "m_nNumFramePresents", "m_nNumDroppedFrames", "m_nNumReprojectedFrames", "m_nNumFramePresentsOnStartup", "m_nNumDroppedFramesOnStartup", "m_nNumReprojectedFramesOnStartup", "m_nNumLoading", "m_nNumFramePresentsLoading", "m_nNumDroppedFramesLoading", "m_nNumReprojectedFramesLoading", "m_nNumTimedOut", "m_nNumFramePresentsTimedOut", "m_nNumDroppedFramesTimedOut", "m_nNumReprojectedFramesTimedOut"); - } - public Compositor_CumulativeStats(Pointer peer) { - super(peer); - } - public static class ByReference extends Compositor_CumulativeStats implements Structure.ByReference { - - }; - public static class ByValue extends Compositor_CumulativeStats implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1528
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class Compositor_CumulativeStats extends Structure { + public int m_nPid; + public int m_nNumFramePresents; + public int m_nNumDroppedFrames; + public int m_nNumReprojectedFrames; + public int m_nNumFramePresentsOnStartup; + public int m_nNumDroppedFramesOnStartup; + public int m_nNumReprojectedFramesOnStartup; + public int m_nNumLoading; + public int m_nNumFramePresentsLoading; + public int m_nNumDroppedFramesLoading; + public int m_nNumReprojectedFramesLoading; + public int m_nNumTimedOut; + public int m_nNumFramePresentsTimedOut; + public int m_nNumDroppedFramesTimedOut; + public int m_nNumReprojectedFramesTimedOut; + public Compositor_CumulativeStats() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_nPid", "m_nNumFramePresents", "m_nNumDroppedFrames", "m_nNumReprojectedFrames", "m_nNumFramePresentsOnStartup", "m_nNumDroppedFramesOnStartup", "m_nNumReprojectedFramesOnStartup", "m_nNumLoading", "m_nNumFramePresentsLoading", "m_nNumDroppedFramesLoading", "m_nNumReprojectedFramesLoading", "m_nNumTimedOut", "m_nNumFramePresentsTimedOut", "m_nNumDroppedFramesTimedOut", "m_nNumReprojectedFramesTimedOut"); + } + public Compositor_CumulativeStats(Pointer peer) { + super(peer); + } + public static class ByReference extends Compositor_CumulativeStats implements Structure.ByReference { + + }; + public static class ByValue extends Compositor_CumulativeStats implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_FrameTiming.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_FrameTiming.java index 680c463fd1..8157254c5a 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_FrameTiming.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_FrameTiming.java @@ -4,50 +4,50 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1186
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class Compositor_FrameTiming extends Structure { - public int m_nSize; - public int m_nFrameIndex; - public int m_nNumFramePresents; - public int m_nNumMisPresented; - public int m_nNumDroppedFrames; - public int m_nReprojectionFlags; - public double m_flSystemTimeInSeconds; - public float m_flPreSubmitGpuMs; - public float m_flPostSubmitGpuMs; - public float m_flTotalRenderGpuMs; - public float m_flCompositorRenderGpuMs; - public float m_flCompositorRenderCpuMs; - public float m_flCompositorIdleCpuMs; - public float m_flClientFrameIntervalMs; - public float m_flPresentCallCpuMs; - public float m_flWaitForPresentCpuMs; - public float m_flSubmitFrameMs; - public float m_flWaitGetPosesCalledMs; - public float m_flNewPosesReadyMs; - public float m_flNewFrameReadyMs; - public float m_flCompositorUpdateStartMs; - public float m_flCompositorUpdateEndMs; - public float m_flCompositorRenderStartMs; - /** C type : TrackedDevicePose_t */ - public TrackedDevicePose_t m_HmdPose; - public Compositor_FrameTiming() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m_nSize", "m_nFrameIndex", "m_nNumFramePresents", "m_nNumMisPresented", "m_nNumDroppedFrames", "m_nReprojectionFlags", "m_flSystemTimeInSeconds", "m_flPreSubmitGpuMs", "m_flPostSubmitGpuMs", "m_flTotalRenderGpuMs", "m_flCompositorRenderGpuMs", "m_flCompositorRenderCpuMs", "m_flCompositorIdleCpuMs", "m_flClientFrameIntervalMs", "m_flPresentCallCpuMs", "m_flWaitForPresentCpuMs", "m_flSubmitFrameMs", "m_flWaitGetPosesCalledMs", "m_flNewPosesReadyMs", "m_flNewFrameReadyMs", "m_flCompositorUpdateStartMs", "m_flCompositorUpdateEndMs", "m_flCompositorRenderStartMs", "m_HmdPose"); - } - public Compositor_FrameTiming(Pointer peer) { - super(peer); - } - public static class ByReference extends Compositor_FrameTiming implements Structure.ByReference { - - }; - public static class ByValue extends Compositor_FrameTiming implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1511
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class Compositor_FrameTiming extends Structure { + public int m_nSize; + public int m_nFrameIndex; + public int m_nNumFramePresents; + public int m_nNumMisPresented; + public int m_nNumDroppedFrames; + public int m_nReprojectionFlags; + public double m_flSystemTimeInSeconds; + public float m_flPreSubmitGpuMs; + public float m_flPostSubmitGpuMs; + public float m_flTotalRenderGpuMs; + public float m_flCompositorRenderGpuMs; + public float m_flCompositorRenderCpuMs; + public float m_flCompositorIdleCpuMs; + public float m_flClientFrameIntervalMs; + public float m_flPresentCallCpuMs; + public float m_flWaitForPresentCpuMs; + public float m_flSubmitFrameMs; + public float m_flWaitGetPosesCalledMs; + public float m_flNewPosesReadyMs; + public float m_flNewFrameReadyMs; + public float m_flCompositorUpdateStartMs; + public float m_flCompositorUpdateEndMs; + public float m_flCompositorRenderStartMs; + /** C type : TrackedDevicePose_t */ + public TrackedDevicePose_t m_HmdPose; + public Compositor_FrameTiming() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_nSize", "m_nFrameIndex", "m_nNumFramePresents", "m_nNumMisPresented", "m_nNumDroppedFrames", "m_nReprojectionFlags", "m_flSystemTimeInSeconds", "m_flPreSubmitGpuMs", "m_flPostSubmitGpuMs", "m_flTotalRenderGpuMs", "m_flCompositorRenderGpuMs", "m_flCompositorRenderCpuMs", "m_flCompositorIdleCpuMs", "m_flClientFrameIntervalMs", "m_flPresentCallCpuMs", "m_flWaitForPresentCpuMs", "m_flSubmitFrameMs", "m_flWaitGetPosesCalledMs", "m_flNewPosesReadyMs", "m_flNewFrameReadyMs", "m_flCompositorUpdateStartMs", "m_flCompositorUpdateEndMs", "m_flCompositorRenderStartMs", "m_HmdPose"); + } + public Compositor_FrameTiming(Pointer peer) { + super(peer); + } + public static class ByReference extends Compositor_FrameTiming implements Structure.ByReference { + + }; + public static class ByValue extends Compositor_FrameTiming implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_OverlaySettings.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_OverlaySettings.java index 9875cc9524..ebc1e88b7e 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_OverlaySettings.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_OverlaySettings.java @@ -4,40 +4,40 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1144
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class Compositor_OverlaySettings extends Structure { - public int size; - public byte curved; - public byte antialias; - public float scale; - public float distance; - public float alpha; - public float uOffset; - public float vOffset; - public float uScale; - public float vScale; - public float gridDivs; - public float gridWidth; - public float gridScale; - /** C type : HmdMatrix44_t */ - public HmdMatrix44_t transform; - public Compositor_OverlaySettings() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("size", "curved", "antialias", "scale", "distance", "alpha", "uOffset", "vOffset", "uScale", "vScale", "gridDivs", "gridWidth", "gridScale", "transform"); - } - public Compositor_OverlaySettings(Pointer peer) { - super(peer); - } - public static class ByReference extends Compositor_OverlaySettings implements Structure.ByReference { - - }; - public static class ByValue extends Compositor_OverlaySettings implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1452
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class Compositor_OverlaySettings extends Structure { + public int size; + public byte curved; + public byte antialias; + public float scale; + public float distance; + public float alpha; + public float uOffset; + public float vOffset; + public float uScale; + public float vScale; + public float gridDivs; + public float gridWidth; + public float gridScale; + /** C type : HmdMatrix44_t */ + public HmdMatrix44_t transform; + public Compositor_OverlaySettings() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("size", "curved", "antialias", "scale", "distance", "alpha", "uOffset", "vOffset", "uScale", "vScale", "gridDivs", "gridWidth", "gridScale", "transform"); + } + public Compositor_OverlaySettings(Pointer peer) { + super(peer); + } + public static class ByReference extends Compositor_OverlaySettings implements Structure.ByReference { + + }; + public static class ByValue extends Compositor_OverlaySettings implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/D3D12TextureData_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/D3D12TextureData_t.java index 5639198ca9..f6769e3e17 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/D3D12TextureData_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/D3D12TextureData_t.java @@ -6,48 +6,48 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1030
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class D3D12TextureData_t extends Structure { + * native declaration : headers\openvr_capi.h:1301
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class D3D12TextureData_t extends Structure { /** - * struct ID3D12Resource *
- * C type : ID3D12Resource* - */ - public ID3D12Resource m_pResource; + * struct ID3D12Resource *
+ * C type : ID3D12Resource* + */ + public ID3D12Resource m_pResource; /** - * struct ID3D12CommandQueue *
- * C type : ID3D12CommandQueue* - */ - public ID3D12CommandQueue m_pCommandQueue; - public int m_nNodeMask; - public D3D12TextureData_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m_pResource", "m_pCommandQueue", "m_nNodeMask"); - } + * struct ID3D12CommandQueue *
+ * C type : ID3D12CommandQueue* + */ + public ID3D12CommandQueue m_pCommandQueue; + public int m_nNodeMask; + public D3D12TextureData_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_pResource", "m_pCommandQueue", "m_nNodeMask"); + } /** - * @param m_pResource struct ID3D12Resource *
- * C type : ID3D12Resource*
- * @param m_pCommandQueue struct ID3D12CommandQueue *
- * C type : ID3D12CommandQueue* - */ - public D3D12TextureData_t(ID3D12Resource m_pResource, ID3D12CommandQueue m_pCommandQueue, int m_nNodeMask) { - super(); - this.m_pResource = m_pResource; - this.m_pCommandQueue = m_pCommandQueue; - this.m_nNodeMask = m_nNodeMask; - } - public D3D12TextureData_t(Pointer peer) { - super(peer); - } - public static class ByReference extends D3D12TextureData_t implements Structure.ByReference { - - }; - public static class ByValue extends D3D12TextureData_t implements Structure.ByValue { - - }; + * @param m_pResource struct ID3D12Resource *
+ * C type : ID3D12Resource*
+ * @param m_pCommandQueue struct ID3D12CommandQueue *
+ * C type : ID3D12CommandQueue* + */ + public D3D12TextureData_t(ID3D12Resource m_pResource, ID3D12CommandQueue m_pCommandQueue, int m_nNodeMask) { + super(); + this.m_pResource = m_pResource; + this.m_pCommandQueue = m_pCommandQueue; + this.m_nNodeMask = m_nNodeMask; + } + public D3D12TextureData_t(Pointer peer) { + super(peer); + } + public static class ByReference extends D3D12TextureData_t implements Structure.ByReference { + + }; + public static class ByValue extends D3D12TextureData_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/DistortionCoordinates_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/DistortionCoordinates_t.java index 780da58451..e2f61e38d0 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/DistortionCoordinates_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/DistortionCoordinates_t.java @@ -4,60 +4,60 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:981
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class DistortionCoordinates_t extends Structure { + * native declaration : headers\openvr_capi.h:1237
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class DistortionCoordinates_t extends Structure { /** - * float[2]
- * C type : float[2] - */ - public float[] rfRed = new float[2]; + * float[2]
+ * C type : float[2] + */ + public float[] rfRed = new float[2]; /** - * float[2]
- * C type : float[2] - */ - public float[] rfGreen = new float[2]; + * float[2]
+ * C type : float[2] + */ + public float[] rfGreen = new float[2]; /** - * float[2]
- * C type : float[2] - */ - public float[] rfBlue = new float[2]; - public DistortionCoordinates_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("rfRed", "rfGreen", "rfBlue"); - } + * float[2]
+ * C type : float[2] + */ + public float[] rfBlue = new float[2]; + public DistortionCoordinates_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("rfRed", "rfGreen", "rfBlue"); + } /** - * @param rfRed float[2]
- * C type : float[2]
- * @param rfGreen float[2]
- * C type : float[2]
- * @param rfBlue float[2]
- * C type : float[2] - */ - public DistortionCoordinates_t(float rfRed[], float rfGreen[], float rfBlue[]) { - super(); - if ((rfRed.length != this.rfRed.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.rfRed = rfRed; - if ((rfGreen.length != this.rfGreen.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.rfGreen = rfGreen; - if ((rfBlue.length != this.rfBlue.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.rfBlue = rfBlue; - } - public DistortionCoordinates_t(Pointer peer) { - super(peer); - } - public static class ByReference extends DistortionCoordinates_t implements Structure.ByReference { - - }; - public static class ByValue extends DistortionCoordinates_t implements Structure.ByValue { - - }; + * @param rfRed float[2]
+ * C type : float[2]
+ * @param rfGreen float[2]
+ * C type : float[2]
+ * @param rfBlue float[2]
+ * C type : float[2] + */ + public DistortionCoordinates_t(float rfRed[], float rfGreen[], float rfBlue[]) { + super(); + if ((rfRed.length != this.rfRed.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.rfRed = rfRed; + if ((rfGreen.length != this.rfGreen.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.rfGreen = rfGreen; + if ((rfBlue.length != this.rfBlue.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.rfBlue = rfBlue; + } + public DistortionCoordinates_t(Pointer peer) { + super(peer); + } + public static class ByReference extends DistortionCoordinates_t implements Structure.ByReference { + + }; + public static class ByValue extends DistortionCoordinates_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/DriverDirectMode_FrameTiming.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/DriverDirectMode_FrameTiming.java new file mode 100644 index 0000000000..ca52264aba --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/DriverDirectMode_FrameTiming.java @@ -0,0 +1,41 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1473
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class DriverDirectMode_FrameTiming extends Structure { + public int m_nSize; + public int m_nNumFramePresents; + public int m_nNumMisPresented; + public int m_nNumDroppedFrames; + public int m_nReprojectionFlags; + public DriverDirectMode_FrameTiming() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_nSize", "m_nNumFramePresents", "m_nNumMisPresented", "m_nNumDroppedFrames", "m_nReprojectionFlags"); + } + public DriverDirectMode_FrameTiming(int m_nSize, int m_nNumFramePresents, int m_nNumMisPresented, int m_nNumDroppedFrames, int m_nReprojectionFlags) { + super(); + this.m_nSize = m_nSize; + this.m_nNumFramePresents = m_nNumFramePresents; + this.m_nNumMisPresented = m_nNumMisPresented; + this.m_nNumDroppedFrames = m_nNumDroppedFrames; + this.m_nReprojectionFlags = m_nReprojectionFlags; + } + public DriverDirectMode_FrameTiming(Pointer peer) { + super(peer); + } + public static class ByReference extends DriverDirectMode_FrameTiming implements Structure.ByReference { + + }; + public static class ByValue extends DriverDirectMode_FrameTiming implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HiddenAreaMesh_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HiddenAreaMesh_t.java index 582f296c27..a1850de739 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HiddenAreaMesh_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HiddenAreaMesh_t.java @@ -4,40 +4,40 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1117
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class HiddenAreaMesh_t extends Structure { + * native declaration : headers\openvr_capi.h:1425
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HiddenAreaMesh_t extends Structure { /** - * const struct vr::HmdVector2_t *
- * C type : HmdVector2_t* - */ - public com.jme3.system.jopenvr.HmdVector2_t.ByReference pVertexData; - public int unTriangleCount; - public HiddenAreaMesh_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("pVertexData", "unTriangleCount"); - } + * const struct vr::HmdVector2_t *
+ * C type : HmdVector2_t* + */ + public com.jme3.system.jopenvr.HmdVector2_t.ByReference pVertexData; + public int unTriangleCount; + public HiddenAreaMesh_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("pVertexData", "unTriangleCount"); + } /** - * @param pVertexData const struct vr::HmdVector2_t *
- * C type : HmdVector2_t* - */ - public HiddenAreaMesh_t(com.jme3.system.jopenvr.HmdVector2_t.ByReference pVertexData, int unTriangleCount) { - super(); - this.pVertexData = pVertexData; - this.unTriangleCount = unTriangleCount; - } - public HiddenAreaMesh_t(Pointer peer) { - super(peer); - } - public static class ByReference extends HiddenAreaMesh_t implements Structure.ByReference { - - }; - public static class ByValue extends HiddenAreaMesh_t implements Structure.ByValue { - - }; + * @param pVertexData const struct vr::HmdVector2_t *
+ * C type : HmdVector2_t* + */ + public HiddenAreaMesh_t(com.jme3.system.jopenvr.HmdVector2_t.ByReference pVertexData, int unTriangleCount) { + super(); + this.pVertexData = pVertexData; + this.unTriangleCount = unTriangleCount; + } + public HiddenAreaMesh_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HiddenAreaMesh_t implements Structure.ByReference { + + }; + public static class ByValue extends HiddenAreaMesh_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdColor_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdColor_t.java index 32e3ef1fb3..78bedfbcf5 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdColor_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdColor_t.java @@ -4,36 +4,36 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:965
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class HmdColor_t extends Structure { - public float r; - public float g; - public float b; - public float a; - public HmdColor_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("r", "g", "b", "a"); - } - public HmdColor_t(float r, float g, float b, float a) { - super(); - this.r = r; - this.g = g; - this.b = b; - this.a = a; - } - public HmdColor_t(Pointer peer) { - super(peer); - } - public static class ByReference extends HmdColor_t implements Structure.ByReference { - - }; - public static class ByValue extends HmdColor_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1221
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdColor_t extends Structure { + public float r; + public float g; + public float b; + public float a; + public HmdColor_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("r", "g", "b", "a"); + } + public HmdColor_t(float r, float g, float b, float a) { + super(); + this.r = r; + this.g = g; + this.b = b; + this.a = a; + } + public HmdColor_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdColor_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdColor_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix33_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix33_t.java new file mode 100644 index 0000000000..df334358bd --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix33_t.java @@ -0,0 +1,43 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1183
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdMatrix33_t extends Structure { + /** + * float[3][3]
+ * C type : float[3][3] + */ + public float[] m = new float[((3) * (3))]; + public HmdMatrix33_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m"); + } + /** + * @param m float[3][3]
+ * C type : float[3][3] + */ + public HmdMatrix33_t(float m[]) { + super(); + if ((m.length != this.m.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.m = m; + } + public HmdMatrix33_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdMatrix33_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdMatrix33_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix34_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix34_t.java index e28e27c1dc..6593938053 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix34_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix34_t.java @@ -4,40 +4,40 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:933
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class HmdMatrix34_t extends Structure { + * native declaration : headers\openvr_capi.h:1179
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdMatrix34_t extends Structure { /** - * float[3][4]
- * C type : float[3][4] - */ - public float[] m = new float[((3) * (4))]; - public HmdMatrix34_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m"); - } + * float[3][4]
+ * C type : float[3][4] + */ + public float[] m = new float[((3) * (4))]; + public HmdMatrix34_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m"); + } /** - * @param m float[3][4]
- * C type : float[3][4] - */ - public HmdMatrix34_t(float m[]) { - super(); - if ((m.length != this.m.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.m = m; - } - public HmdMatrix34_t(Pointer peer) { - super(peer); - } - public static class ByReference extends HmdMatrix34_t implements Structure.ByReference { - - }; - public static class ByValue extends HmdMatrix34_t implements Structure.ByValue { - - }; + * @param m float[3][4]
+ * C type : float[3][4] + */ + public HmdMatrix34_t(float m[]) { + super(); + if ((m.length != this.m.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.m = m; + } + public HmdMatrix34_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdMatrix34_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdMatrix34_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix44_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix44_t.java index 83a093abd5..216aa73410 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix44_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix44_t.java @@ -4,40 +4,40 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:937
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class HmdMatrix44_t extends Structure { + * native declaration : headers\openvr_capi.h:1187
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdMatrix44_t extends Structure { /** - * float[4][4]
- * C type : float[4][4] - */ - public float[] m = new float[((4) * (4))]; - public HmdMatrix44_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m"); - } + * float[4][4]
+ * C type : float[4][4] + */ + public float[] m = new float[((4) * (4))]; + public HmdMatrix44_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m"); + } /** - * @param m float[4][4]
- * C type : float[4][4] - */ - public HmdMatrix44_t(float m[]) { - super(); - if ((m.length != this.m.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.m = m; - } - public HmdMatrix44_t(Pointer peer) { - super(peer); - } - public static class ByReference extends HmdMatrix44_t implements Structure.ByReference { - - }; - public static class ByValue extends HmdMatrix44_t implements Structure.ByValue { - - }; + * @param m float[4][4]
+ * C type : float[4][4] + */ + public HmdMatrix44_t(float m[]) { + super(); + if ((m.length != this.m.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.m = m; + } + public HmdMatrix44_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdMatrix44_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdMatrix44_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuad_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuad_t.java index f0ddccb70b..0142d8ef13 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuad_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuad_t.java @@ -4,40 +4,40 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:969
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class HmdQuad_t extends Structure { + * native declaration : headers\openvr_capi.h:1225
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdQuad_t extends Structure { /** - * struct vr::HmdVector3_t[4]
- * C type : HmdVector3_t[4] - */ - public HmdVector3_t[] vCorners = new HmdVector3_t[4]; - public HmdQuad_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("vCorners"); - } + * struct vr::HmdVector3_t[4]
+ * C type : HmdVector3_t[4] + */ + public HmdVector3_t[] vCorners = new HmdVector3_t[4]; + public HmdQuad_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("vCorners"); + } /** - * @param vCorners struct vr::HmdVector3_t[4]
- * C type : HmdVector3_t[4] - */ - public HmdQuad_t(HmdVector3_t vCorners[]) { - super(); - if ((vCorners.length != this.vCorners.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.vCorners = vCorners; - } - public HmdQuad_t(Pointer peer) { - super(peer); - } - public static class ByReference extends HmdQuad_t implements Structure.ByReference { - - }; - public static class ByValue extends HmdQuad_t implements Structure.ByValue { - - }; + * @param vCorners struct vr::HmdVector3_t[4]
+ * C type : HmdVector3_t[4] + */ + public HmdQuad_t(HmdVector3_t vCorners[]) { + super(); + if ((vCorners.length != this.vCorners.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.vCorners = vCorners; + } + public HmdQuad_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdQuad_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdQuad_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuaternion_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuaternion_t.java index a02389493d..fb0073ee79 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuaternion_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuaternion_t.java @@ -4,36 +4,36 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:959
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class HmdQuaternion_t extends Structure { - public double w; - public double x; - public double y; - public double z; - public HmdQuaternion_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("w", "x", "y", "z"); - } - public HmdQuaternion_t(double w, double x, double y, double z) { - super(); - this.w = w; - this.x = x; - this.y = y; - this.z = z; - } - public HmdQuaternion_t(Pointer peer) { - super(peer); - } - public static class ByReference extends HmdQuaternion_t implements Structure.ByReference { - - }; - public static class ByValue extends HmdQuaternion_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1209
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdQuaternion_t extends Structure { + public double w; + public double x; + public double y; + public double z; + public HmdQuaternion_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("w", "x", "y", "z"); + } + public HmdQuaternion_t(double w, double x, double y, double z) { + super(); + this.w = w; + this.x = x; + this.y = y; + this.z = z; + } + public HmdQuaternion_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdQuaternion_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdQuaternion_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuaternionf_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuaternionf_t.java new file mode 100644 index 0000000000..6a7b963d6b --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuaternionf_t.java @@ -0,0 +1,39 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1215
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdQuaternionf_t extends Structure { + public float w; + public float x; + public float y; + public float z; + public HmdQuaternionf_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("w", "x", "y", "z"); + } + public HmdQuaternionf_t(float w, float x, float y, float z) { + super(); + this.w = w; + this.x = x; + this.y = y; + this.z = z; + } + public HmdQuaternionf_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdQuaternionf_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdQuaternionf_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdRect2_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdRect2_t.java index 39fce7ebbd..210843deb6 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdRect2_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdRect2_t.java @@ -4,38 +4,38 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:973
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class HmdRect2_t extends Structure { - /** C type : HmdVector2_t */ - public HmdVector2_t vTopLeft; - /** C type : HmdVector2_t */ - public HmdVector2_t vBottomRight; - public HmdRect2_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("vTopLeft", "vBottomRight"); - } + * native declaration : headers\openvr_capi.h:1229
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdRect2_t extends Structure { + /** C type : HmdVector2_t */ + public HmdVector2_t vTopLeft; + /** C type : HmdVector2_t */ + public HmdVector2_t vBottomRight; + public HmdRect2_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("vTopLeft", "vBottomRight"); + } /** - * @param vTopLeft C type : HmdVector2_t
- * @param vBottomRight C type : HmdVector2_t - */ - public HmdRect2_t(HmdVector2_t vTopLeft, HmdVector2_t vBottomRight) { - super(); - this.vTopLeft = vTopLeft; - this.vBottomRight = vBottomRight; - } - public HmdRect2_t(Pointer peer) { - super(peer); - } - public static class ByReference extends HmdRect2_t implements Structure.ByReference { - - }; - public static class ByValue extends HmdRect2_t implements Structure.ByValue { - - }; + * @param vTopLeft C type : HmdVector2_t
+ * @param vBottomRight C type : HmdVector2_t + */ + public HmdRect2_t(HmdVector2_t vTopLeft, HmdVector2_t vBottomRight) { + super(); + this.vTopLeft = vTopLeft; + this.vBottomRight = vBottomRight; + } + public HmdRect2_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdRect2_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdRect2_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector2_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector2_t.java index 700bf9a5e2..7a885d4c7d 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector2_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector2_t.java @@ -4,40 +4,40 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:953
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class HmdVector2_t extends Structure { + * native declaration : headers\openvr_capi.h:1203
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdVector2_t extends Structure { /** - * float[2]
- * C type : float[2] - */ - public float[] v = new float[2]; - public HmdVector2_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("v"); - } + * float[2]
+ * C type : float[2] + */ + public float[] v = new float[2]; + public HmdVector2_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("v"); + } /** - * @param v float[2]
- * C type : float[2] - */ - public HmdVector2_t(float v[]) { - super(); - if ((v.length != this.v.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.v = v; - } - public HmdVector2_t(Pointer peer) { - super(peer); - } - public static class ByReference extends HmdVector2_t implements Structure.ByReference { - - }; - public static class ByValue extends HmdVector2_t implements Structure.ByValue { - - }; + * @param v float[2]
+ * C type : float[2] + */ + public HmdVector2_t(float v[]) { + super(); + if ((v.length != this.v.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.v = v; + } + public HmdVector2_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdVector2_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdVector2_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector3_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector3_t.java index b136791e12..ed87e69916 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector3_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector3_t.java @@ -4,40 +4,40 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:941
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class HmdVector3_t extends Structure { + * native declaration : headers\openvr_capi.h:1191
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdVector3_t extends Structure { /** - * float[3]
- * C type : float[3] - */ - public float[] v = new float[3]; - public HmdVector3_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("v"); - } + * float[3]
+ * C type : float[3] + */ + public float[] v = new float[3]; + public HmdVector3_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("v"); + } /** - * @param v float[3]
- * C type : float[3] - */ - public HmdVector3_t(float v[]) { - super(); - if ((v.length != this.v.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.v = v; - } - public HmdVector3_t(Pointer peer) { - super(peer); - } - public static class ByReference extends HmdVector3_t implements Structure.ByReference { - - }; - public static class ByValue extends HmdVector3_t implements Structure.ByValue { - - }; + * @param v float[3]
+ * C type : float[3] + */ + public HmdVector3_t(float v[]) { + super(); + if ((v.length != this.v.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.v = v; + } + public HmdVector3_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdVector3_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdVector3_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector3d_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector3d_t.java index 8a4f0b4994..1b1bfe2b9c 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector3d_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector3d_t.java @@ -4,40 +4,40 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:949
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class HmdVector3d_t extends Structure { + * native declaration : headers\openvr_capi.h:1199
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdVector3d_t extends Structure { /** - * double[3]
- * C type : double[3] - */ - public double[] v = new double[3]; - public HmdVector3d_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("v"); - } + * double[3]
+ * C type : double[3] + */ + public double[] v = new double[3]; + public HmdVector3d_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("v"); + } /** - * @param v double[3]
- * C type : double[3] - */ - public HmdVector3d_t(double v[]) { - super(); - if ((v.length != this.v.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.v = v; - } - public HmdVector3d_t(Pointer peer) { - super(peer); - } - public static class ByReference extends HmdVector3d_t implements Structure.ByReference { - - }; - public static class ByValue extends HmdVector3d_t implements Structure.ByValue { - - }; + * @param v double[3]
+ * C type : double[3] + */ + public HmdVector3d_t(double v[]) { + super(); + if ((v.length != this.v.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.v = v; + } + public HmdVector3d_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdVector3d_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdVector3d_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector4_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector4_t.java index c2c3d06a35..b022e05d61 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector4_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector4_t.java @@ -4,40 +4,40 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:945
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class HmdVector4_t extends Structure { + * native declaration : headers\openvr_capi.h:1195
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class HmdVector4_t extends Structure { /** - * float[4]
- * C type : float[4] - */ - public float[] v = new float[4]; - public HmdVector4_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("v"); - } + * float[4]
+ * C type : float[4] + */ + public float[] v = new float[4]; + public HmdVector4_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("v"); + } /** - * @param v float[4]
- * C type : float[4] - */ - public HmdVector4_t(float v[]) { - super(); - if ((v.length != this.v.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.v = v; - } - public HmdVector4_t(Pointer peer) { - super(peer); - } - public static class ByReference extends HmdVector4_t implements Structure.ByReference { - - }; - public static class ByValue extends HmdVector4_t implements Structure.ByValue { - - }; + * @param v float[4]
+ * C type : float[4] + */ + public HmdVector4_t(float v[]) { + super(); + if ((v.length != this.v.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.v = v; + } + public HmdVector4_t(Pointer peer) { + super(peer); + } + public static class ByReference extends HmdVector4_t implements Structure.ByReference { + + }; + public static class ByValue extends HmdVector4_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/ImuSample_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/ImuSample_t.java new file mode 100644 index 0000000000..799893d2eb --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/ImuSample_t.java @@ -0,0 +1,45 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1479
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class ImuSample_t extends Structure { + public double fSampleTime; + /** C type : HmdVector3d_t */ + public HmdVector3d_t vAccel; + /** C type : HmdVector3d_t */ + public HmdVector3d_t vGyro; + public int unOffScaleFlags; + public ImuSample_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("fSampleTime", "vAccel", "vGyro", "unOffScaleFlags"); + } + /** + * @param vAccel C type : HmdVector3d_t
+ * @param vGyro C type : HmdVector3d_t + */ + public ImuSample_t(double fSampleTime, HmdVector3d_t vAccel, HmdVector3d_t vGyro, int unOffScaleFlags) { + super(); + this.fSampleTime = fSampleTime; + this.vAccel = vAccel; + this.vGyro = vGyro; + this.unOffScaleFlags = unOffScaleFlags; + } + public ImuSample_t(Pointer peer) { + super(peer); + } + public static class ByReference extends ImuSample_t implements Structure.ByReference { + + }; + public static class ByValue extends ImuSample_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputAnalogActionData_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputAnalogActionData_t.java new file mode 100644 index 0000000000..61fee6243c --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputAnalogActionData_t.java @@ -0,0 +1,51 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1603
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class InputAnalogActionData_t extends Structure { + public byte bActive; + /** C type : VRInputValueHandle_t */ + public long activeOrigin; + public float x; + public float y; + public float z; + public float deltaX; + public float deltaY; + public float deltaZ; + public float fUpdateTime; + public InputAnalogActionData_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("bActive", "activeOrigin", "x", "y", "z", "deltaX", "deltaY", "deltaZ", "fUpdateTime"); + } + /** @param activeOrigin C type : VRInputValueHandle_t */ + public InputAnalogActionData_t(byte bActive, long activeOrigin, float x, float y, float z, float deltaX, float deltaY, float deltaZ, float fUpdateTime) { + super(); + this.bActive = bActive; + this.activeOrigin = activeOrigin; + this.x = x; + this.y = y; + this.z = z; + this.deltaX = deltaX; + this.deltaY = deltaY; + this.deltaZ = deltaZ; + this.fUpdateTime = fUpdateTime; + } + public InputAnalogActionData_t(Pointer peer) { + super(peer); + } + public static class ByReference extends InputAnalogActionData_t implements Structure.ByReference { + + }; + public static class ByValue extends InputAnalogActionData_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputDigitalActionData_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputDigitalActionData_t.java new file mode 100644 index 0000000000..7325022eea --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputDigitalActionData_t.java @@ -0,0 +1,43 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1610
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class InputDigitalActionData_t extends Structure { + public byte bActive; + /** C type : VRInputValueHandle_t */ + public long activeOrigin; + public byte bState; + public byte bChanged; + public float fUpdateTime; + public InputDigitalActionData_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("bActive", "activeOrigin", "bState", "bChanged", "fUpdateTime"); + } + /** @param activeOrigin C type : VRInputValueHandle_t */ + public InputDigitalActionData_t(byte bActive, long activeOrigin, byte bState, byte bChanged, float fUpdateTime) { + super(); + this.bActive = bActive; + this.activeOrigin = activeOrigin; + this.bState = bState; + this.bChanged = bChanged; + this.fUpdateTime = fUpdateTime; + } + public InputDigitalActionData_t(Pointer peer) { + super(peer); + } + public static class ByReference extends InputDigitalActionData_t implements Structure.ByReference { + + }; + public static class ByValue extends InputDigitalActionData_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputOriginInfo_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputOriginInfo_t.java new file mode 100644 index 0000000000..f63555b8cc --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputOriginInfo_t.java @@ -0,0 +1,51 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1626
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class InputOriginInfo_t extends Structure { + /** C type : VRInputValueHandle_t */ + public long devicePath; + /** C type : TrackedDeviceIndex_t */ + public int trackedDeviceIndex; + /** + * char[128]
+ * C type : char*[128] + */ + public Pointer[] rchRenderModelComponentName = new Pointer[128]; + public InputOriginInfo_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("devicePath", "trackedDeviceIndex", "rchRenderModelComponentName"); + } + /** + * @param devicePath C type : VRInputValueHandle_t
+ * @param trackedDeviceIndex C type : TrackedDeviceIndex_t
+ * @param rchRenderModelComponentName char[128]
+ * C type : char*[128] + */ + public InputOriginInfo_t(long devicePath, int trackedDeviceIndex, Pointer rchRenderModelComponentName[]) { + super(); + this.devicePath = devicePath; + this.trackedDeviceIndex = trackedDeviceIndex; + if ((rchRenderModelComponentName.length != this.rchRenderModelComponentName.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.rchRenderModelComponentName = rchRenderModelComponentName; + } + public InputOriginInfo_t(Pointer peer) { + super(peer); + } + public static class ByReference extends InputOriginInfo_t implements Structure.ByReference { + + }; + public static class ByValue extends InputOriginInfo_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputPoseActionData_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputPoseActionData_t.java new file mode 100644 index 0000000000..747493078a --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputPoseActionData_t.java @@ -0,0 +1,43 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1615
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class InputPoseActionData_t extends Structure { + public byte bActive; + /** C type : VRInputValueHandle_t */ + public long activeOrigin; + /** C type : TrackedDevicePose_t */ + public TrackedDevicePose_t pose; + public InputPoseActionData_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("bActive", "activeOrigin", "pose"); + } + /** + * @param activeOrigin C type : VRInputValueHandle_t
+ * @param pose C type : TrackedDevicePose_t + */ + public InputPoseActionData_t(byte bActive, long activeOrigin, TrackedDevicePose_t pose) { + super(); + this.bActive = bActive; + this.activeOrigin = activeOrigin; + this.pose = pose; + } + public InputPoseActionData_t(Pointer peer) { + super(peer); + } + public static class ByReference extends InputPoseActionData_t implements Structure.ByReference { + + }; + public static class ByValue extends InputPoseActionData_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputSkeletalActionData_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputSkeletalActionData_t.java new file mode 100644 index 0000000000..d9d32b9516 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/InputSkeletalActionData_t.java @@ -0,0 +1,39 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1620
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class InputSkeletalActionData_t extends Structure { + public byte bActive; + /** C type : VRInputValueHandle_t */ + public long activeOrigin; + public int boneCount; + public InputSkeletalActionData_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("bActive", "activeOrigin", "boneCount"); + } + /** @param activeOrigin C type : VRInputValueHandle_t */ + public InputSkeletalActionData_t(byte bActive, long activeOrigin, int boneCount) { + super(); + this.bActive = bActive; + this.activeOrigin = activeOrigin; + this.boneCount = boneCount; + } + public InputSkeletalActionData_t(Pointer peer) { + super(peer); + } + public static class ByReference extends InputSkeletalActionData_t implements Structure.ByReference { + + }; + public static class ByValue extends InputSkeletalActionData_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/IntersectionMaskCircle_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/IntersectionMaskCircle_t.java index 2cf98516fd..631a127a95 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/IntersectionMaskCircle_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/IntersectionMaskCircle_t.java @@ -4,34 +4,34 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1227
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class IntersectionMaskCircle_t extends Structure { - public float m_flCenterX; - public float m_flCenterY; - public float m_flRadius; - public IntersectionMaskCircle_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m_flCenterX", "m_flCenterY", "m_flRadius"); - } - public IntersectionMaskCircle_t(float m_flCenterX, float m_flCenterY, float m_flRadius) { - super(); - this.m_flCenterX = m_flCenterX; - this.m_flCenterY = m_flCenterY; - this.m_flRadius = m_flRadius; - } - public IntersectionMaskCircle_t(Pointer peer) { - super(peer); - } - public static class ByReference extends IntersectionMaskCircle_t implements Structure.ByReference { - - }; - public static class ByValue extends IntersectionMaskCircle_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1552
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class IntersectionMaskCircle_t extends Structure { + public float m_flCenterX; + public float m_flCenterY; + public float m_flRadius; + public IntersectionMaskCircle_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_flCenterX", "m_flCenterY", "m_flRadius"); + } + public IntersectionMaskCircle_t(float m_flCenterX, float m_flCenterY, float m_flRadius) { + super(); + this.m_flCenterX = m_flCenterX; + this.m_flCenterY = m_flCenterY; + this.m_flRadius = m_flRadius; + } + public IntersectionMaskCircle_t(Pointer peer) { + super(peer); + } + public static class ByReference extends IntersectionMaskCircle_t implements Structure.ByReference { + + }; + public static class ByValue extends IntersectionMaskCircle_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/IntersectionMaskRectangle_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/IntersectionMaskRectangle_t.java index bb9b3e0da5..bbb4c0f578 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/IntersectionMaskRectangle_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/IntersectionMaskRectangle_t.java @@ -4,36 +4,36 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1222
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class IntersectionMaskRectangle_t extends Structure { - public float m_flTopLeftX; - public float m_flTopLeftY; - public float m_flWidth; - public float m_flHeight; - public IntersectionMaskRectangle_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m_flTopLeftX", "m_flTopLeftY", "m_flWidth", "m_flHeight"); - } - public IntersectionMaskRectangle_t(float m_flTopLeftX, float m_flTopLeftY, float m_flWidth, float m_flHeight) { - super(); - this.m_flTopLeftX = m_flTopLeftX; - this.m_flTopLeftY = m_flTopLeftY; - this.m_flWidth = m_flWidth; - this.m_flHeight = m_flHeight; - } - public IntersectionMaskRectangle_t(Pointer peer) { - super(peer); - } - public static class ByReference extends IntersectionMaskRectangle_t implements Structure.ByReference { - - }; - public static class ByValue extends IntersectionMaskRectangle_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1547
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class IntersectionMaskRectangle_t extends Structure { + public float m_flTopLeftX; + public float m_flTopLeftY; + public float m_flWidth; + public float m_flHeight; + public IntersectionMaskRectangle_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_flTopLeftX", "m_flTopLeftY", "m_flWidth", "m_flHeight"); + } + public IntersectionMaskRectangle_t(float m_flTopLeftX, float m_flTopLeftY, float m_flWidth, float m_flHeight) { + super(); + this.m_flTopLeftX = m_flTopLeftX; + this.m_flTopLeftY = m_flTopLeftY; + this.m_flWidth = m_flWidth; + this.m_flHeight = m_flHeight; + } + public IntersectionMaskRectangle_t(Pointer peer) { + super(peer); + } + public static class ByReference extends IntersectionMaskRectangle_t implements Structure.ByReference { + + }; + public static class ByValue extends IntersectionMaskRectangle_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/JOpenVRLibrary.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/JOpenVRLibrary.java index 2a3b99733f..1cf9c869c7 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/JOpenVRLibrary.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/JOpenVRLibrary.java @@ -5,16 +5,16 @@ import com.sun.jna.Pointer; import com.sun.jna.PointerType; import com.sun.jna.ptr.IntByReference; + import java.nio.IntBuffer; import java.util.logging.Logger; /** - * JNA Wrapper for library JOpenVR
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class JOpenVRLibrary implements Library { - + * JNA Wrapper for library JOpenVR
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class JOpenVRLibrary implements Library { private static final Logger logger = Logger.getLogger(JOpenVRLibrary.class.getName()); private static String JNA_LIBRARY_NAME; @@ -26,11 +26,7 @@ public class JOpenVRLibrary implements Library { * If this property is not set, the embedded library is loaded. */ public static final String JNA_OPENVR_LIBRARY_PATH = "openvr.library.path"; -/* - static { - init(); - } -*/ + /** * Init the native binding to the underlying system library. * @return true if the link is effective and false otherwise. @@ -65,1828 +61,2271 @@ public static void init() throws UnsatisfiedLinkError { public static String getSystemLibraryName(){ return ""+JNA_LIBRARY_NAME; } - + + /** - * native declaration : headers\openvr_capi.h:181
- * enum values - */ - public static interface EVREye { - /** native declaration : headers\openvr_capi.h:179 */ - public static final int EVREye_Eye_Left = 0; - /** native declaration : headers\openvr_capi.h:180 */ - public static final int EVREye_Eye_Right = 1; - }; - /** - * native declaration : headers\openvr_capi.h:188
- * enum values - */ - public static interface ETextureType { - /** native declaration : headers\openvr_capi.h:183 */ - public static final int ETextureType_TextureType_DirectX = 0; - /** native declaration : headers\openvr_capi.h:184 */ - public static final int ETextureType_TextureType_OpenGL = 1; - /** native declaration : headers\openvr_capi.h:185 */ - public static final int ETextureType_TextureType_Vulkan = 2; - /** native declaration : headers\openvr_capi.h:186 */ - public static final int ETextureType_TextureType_IOSurface = 3; - /** native declaration : headers\openvr_capi.h:187 */ - public static final int ETextureType_TextureType_DirectX12 = 4; - }; - /** - * native declaration : headers\openvr_capi.h:193
- * enum values - */ - public static interface EColorSpace { - /** native declaration : headers\openvr_capi.h:190 */ - public static final int EColorSpace_ColorSpace_Auto = 0; - /** native declaration : headers\openvr_capi.h:191 */ - public static final int EColorSpace_ColorSpace_Gamma = 1; - /** native declaration : headers\openvr_capi.h:192 */ - public static final int EColorSpace_ColorSpace_Linear = 2; - }; - /** - * native declaration : headers\openvr_capi.h:200
- * enum values - */ - public static interface ETrackingResult { - /** native declaration : headers\openvr_capi.h:195 */ - public static final int ETrackingResult_TrackingResult_Uninitialized = 1; - /** native declaration : headers\openvr_capi.h:196 */ - public static final int ETrackingResult_TrackingResult_Calibrating_InProgress = 100; - /** native declaration : headers\openvr_capi.h:197 */ - public static final int ETrackingResult_TrackingResult_Calibrating_OutOfRange = 101; - /** native declaration : headers\openvr_capi.h:198 */ - public static final int ETrackingResult_TrackingResult_Running_OK = 200; - /** native declaration : headers\openvr_capi.h:199 */ - public static final int ETrackingResult_TrackingResult_Running_OutOfRange = 201; - }; - /** - * native declaration : headers\openvr_capi.h:208
- * enum values - */ - public static interface ETrackedDeviceClass { - /** native declaration : headers\openvr_capi.h:202 */ - public static final int ETrackedDeviceClass_TrackedDeviceClass_Invalid = 0; - /** native declaration : headers\openvr_capi.h:203 */ - public static final int ETrackedDeviceClass_TrackedDeviceClass_HMD = 1; - /** native declaration : headers\openvr_capi.h:204 */ - public static final int ETrackedDeviceClass_TrackedDeviceClass_Controller = 2; - /** native declaration : headers\openvr_capi.h:205 */ - public static final int ETrackedDeviceClass_TrackedDeviceClass_GenericTracker = 3; - /** native declaration : headers\openvr_capi.h:206 */ - public static final int ETrackedDeviceClass_TrackedDeviceClass_TrackingReference = 4; - /** native declaration : headers\openvr_capi.h:207 */ - public static final int ETrackedDeviceClass_TrackedDeviceClass_DisplayRedirect = 5; - }; - /** - * native declaration : headers\openvr_capi.h:213
- * enum values - */ - public static interface ETrackedControllerRole { - /** native declaration : headers\openvr_capi.h:210 */ - public static final int ETrackedControllerRole_TrackedControllerRole_Invalid = 0; - /** native declaration : headers\openvr_capi.h:211 */ - public static final int ETrackedControllerRole_TrackedControllerRole_LeftHand = 1; - /** native declaration : headers\openvr_capi.h:212 */ - public static final int ETrackedControllerRole_TrackedControllerRole_RightHand = 2; - }; - /** - * native declaration : headers\openvr_capi.h:218
- * enum values - */ - public static interface ETrackingUniverseOrigin { - /** native declaration : headers\openvr_capi.h:215 */ - public static final int ETrackingUniverseOrigin_TrackingUniverseSeated = 0; - /** native declaration : headers\openvr_capi.h:216 */ - public static final int ETrackingUniverseOrigin_TrackingUniverseStanding = 1; - /** native declaration : headers\openvr_capi.h:217 */ - public static final int ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated = 2; - }; - /** - * native declaration : headers\openvr_capi.h:339
- * enum values - */ - public static interface ETrackedDeviceProperty { - /** native declaration : headers\openvr_capi.h:220 */ - public static final int ETrackedDeviceProperty_Prop_Invalid = 0; - /** native declaration : headers\openvr_capi.h:221 */ - public static final int ETrackedDeviceProperty_Prop_TrackingSystemName_String = 1000; - /** native declaration : headers\openvr_capi.h:222 */ - public static final int ETrackedDeviceProperty_Prop_ModelNumber_String = 1001; - /** native declaration : headers\openvr_capi.h:223 */ - public static final int ETrackedDeviceProperty_Prop_SerialNumber_String = 1002; - /** native declaration : headers\openvr_capi.h:224 */ - public static final int ETrackedDeviceProperty_Prop_RenderModelName_String = 1003; - /** native declaration : headers\openvr_capi.h:225 */ - public static final int ETrackedDeviceProperty_Prop_WillDriftInYaw_Bool = 1004; - /** native declaration : headers\openvr_capi.h:226 */ - public static final int ETrackedDeviceProperty_Prop_ManufacturerName_String = 1005; - /** native declaration : headers\openvr_capi.h:227 */ - public static final int ETrackedDeviceProperty_Prop_TrackingFirmwareVersion_String = 1006; - /** native declaration : headers\openvr_capi.h:228 */ - public static final int ETrackedDeviceProperty_Prop_HardwareRevision_String = 1007; - /** native declaration : headers\openvr_capi.h:229 */ - public static final int ETrackedDeviceProperty_Prop_AllWirelessDongleDescriptions_String = 1008; - /** native declaration : headers\openvr_capi.h:230 */ - public static final int ETrackedDeviceProperty_Prop_ConnectedWirelessDongle_String = 1009; - /** native declaration : headers\openvr_capi.h:231 */ - public static final int ETrackedDeviceProperty_Prop_DeviceIsWireless_Bool = 1010; - /** native declaration : headers\openvr_capi.h:232 */ - public static final int ETrackedDeviceProperty_Prop_DeviceIsCharging_Bool = 1011; - /** native declaration : headers\openvr_capi.h:233 */ - public static final int ETrackedDeviceProperty_Prop_DeviceBatteryPercentage_Float = 1012; - /** native declaration : headers\openvr_capi.h:234 */ - public static final int ETrackedDeviceProperty_Prop_StatusDisplayTransform_Matrix34 = 1013; - /** native declaration : headers\openvr_capi.h:235 */ - public static final int ETrackedDeviceProperty_Prop_Firmware_UpdateAvailable_Bool = 1014; - /** native declaration : headers\openvr_capi.h:236 */ - public static final int ETrackedDeviceProperty_Prop_Firmware_ManualUpdate_Bool = 1015; - /** native declaration : headers\openvr_capi.h:237 */ - public static final int ETrackedDeviceProperty_Prop_Firmware_ManualUpdateURL_String = 1016; - /** native declaration : headers\openvr_capi.h:238 */ - public static final int ETrackedDeviceProperty_Prop_HardwareRevision_Uint64 = 1017; - /** native declaration : headers\openvr_capi.h:239 */ - public static final int ETrackedDeviceProperty_Prop_FirmwareVersion_Uint64 = 1018; - /** native declaration : headers\openvr_capi.h:240 */ - public static final int ETrackedDeviceProperty_Prop_FPGAVersion_Uint64 = 1019; - /** native declaration : headers\openvr_capi.h:241 */ - public static final int ETrackedDeviceProperty_Prop_VRCVersion_Uint64 = 1020; - /** native declaration : headers\openvr_capi.h:242 */ - public static final int ETrackedDeviceProperty_Prop_RadioVersion_Uint64 = 1021; - /** native declaration : headers\openvr_capi.h:243 */ - public static final int ETrackedDeviceProperty_Prop_DongleVersion_Uint64 = 1022; - /** native declaration : headers\openvr_capi.h:244 */ - public static final int ETrackedDeviceProperty_Prop_BlockServerShutdown_Bool = 1023; - /** native declaration : headers\openvr_capi.h:245 */ - public static final int ETrackedDeviceProperty_Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024; - /** native declaration : headers\openvr_capi.h:246 */ - public static final int ETrackedDeviceProperty_Prop_ContainsProximitySensor_Bool = 1025; - /** native declaration : headers\openvr_capi.h:247 */ - public static final int ETrackedDeviceProperty_Prop_DeviceProvidesBatteryStatus_Bool = 1026; - /** native declaration : headers\openvr_capi.h:248 */ - public static final int ETrackedDeviceProperty_Prop_DeviceCanPowerOff_Bool = 1027; - /** native declaration : headers\openvr_capi.h:249 */ - public static final int ETrackedDeviceProperty_Prop_Firmware_ProgrammingTarget_String = 1028; - /** native declaration : headers\openvr_capi.h:250 */ - public static final int ETrackedDeviceProperty_Prop_DeviceClass_Int32 = 1029; - /** native declaration : headers\openvr_capi.h:251 */ - public static final int ETrackedDeviceProperty_Prop_HasCamera_Bool = 1030; - /** native declaration : headers\openvr_capi.h:252 */ - public static final int ETrackedDeviceProperty_Prop_DriverVersion_String = 1031; - /** native declaration : headers\openvr_capi.h:253 */ - public static final int ETrackedDeviceProperty_Prop_Firmware_ForceUpdateRequired_Bool = 1032; - /** native declaration : headers\openvr_capi.h:254 */ - public static final int ETrackedDeviceProperty_Prop_ViveSystemButtonFixRequired_Bool = 1033; - /** native declaration : headers\openvr_capi.h:255 */ - public static final int ETrackedDeviceProperty_Prop_ParentDriver_Uint64 = 1034; - /** native declaration : headers\openvr_capi.h:256 */ - public static final int ETrackedDeviceProperty_Prop_ResourceRoot_String = 1035; - /** native declaration : headers\openvr_capi.h:257 */ - public static final int ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000; - /** native declaration : headers\openvr_capi.h:258 */ - public static final int ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001; - /** native declaration : headers\openvr_capi.h:259 */ - public static final int ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002; - /** native declaration : headers\openvr_capi.h:260 */ - public static final int ETrackedDeviceProperty_Prop_UserIpdMeters_Float = 2003; - /** native declaration : headers\openvr_capi.h:261 */ - public static final int ETrackedDeviceProperty_Prop_CurrentUniverseId_Uint64 = 2004; - /** native declaration : headers\openvr_capi.h:262 */ - public static final int ETrackedDeviceProperty_Prop_PreviousUniverseId_Uint64 = 2005; - /** native declaration : headers\openvr_capi.h:263 */ - public static final int ETrackedDeviceProperty_Prop_DisplayFirmwareVersion_Uint64 = 2006; - /** native declaration : headers\openvr_capi.h:264 */ - public static final int ETrackedDeviceProperty_Prop_IsOnDesktop_Bool = 2007; - /** native declaration : headers\openvr_capi.h:265 */ - public static final int ETrackedDeviceProperty_Prop_DisplayMCType_Int32 = 2008; - /** native declaration : headers\openvr_capi.h:266 */ - public static final int ETrackedDeviceProperty_Prop_DisplayMCOffset_Float = 2009; - /** native declaration : headers\openvr_capi.h:267 */ - public static final int ETrackedDeviceProperty_Prop_DisplayMCScale_Float = 2010; - /** native declaration : headers\openvr_capi.h:268 */ - public static final int ETrackedDeviceProperty_Prop_EdidVendorID_Int32 = 2011; - /** native declaration : headers\openvr_capi.h:269 */ - public static final int ETrackedDeviceProperty_Prop_DisplayMCImageLeft_String = 2012; - /** native declaration : headers\openvr_capi.h:270 */ - public static final int ETrackedDeviceProperty_Prop_DisplayMCImageRight_String = 2013; - /** native declaration : headers\openvr_capi.h:271 */ - public static final int ETrackedDeviceProperty_Prop_DisplayGCBlackClamp_Float = 2014; - /** native declaration : headers\openvr_capi.h:272 */ - public static final int ETrackedDeviceProperty_Prop_EdidProductID_Int32 = 2015; - /** native declaration : headers\openvr_capi.h:273 */ - public static final int ETrackedDeviceProperty_Prop_CameraToHeadTransform_Matrix34 = 2016; - /** native declaration : headers\openvr_capi.h:274 */ - public static final int ETrackedDeviceProperty_Prop_DisplayGCType_Int32 = 2017; - /** native declaration : headers\openvr_capi.h:275 */ - public static final int ETrackedDeviceProperty_Prop_DisplayGCOffset_Float = 2018; - /** native declaration : headers\openvr_capi.h:276 */ - public static final int ETrackedDeviceProperty_Prop_DisplayGCScale_Float = 2019; - /** native declaration : headers\openvr_capi.h:277 */ - public static final int ETrackedDeviceProperty_Prop_DisplayGCPrescale_Float = 2020; - /** native declaration : headers\openvr_capi.h:278 */ - public static final int ETrackedDeviceProperty_Prop_DisplayGCImage_String = 2021; - /** native declaration : headers\openvr_capi.h:279 */ - public static final int ETrackedDeviceProperty_Prop_LensCenterLeftU_Float = 2022; - /** native declaration : headers\openvr_capi.h:280 */ - public static final int ETrackedDeviceProperty_Prop_LensCenterLeftV_Float = 2023; - /** native declaration : headers\openvr_capi.h:281 */ - public static final int ETrackedDeviceProperty_Prop_LensCenterRightU_Float = 2024; - /** native declaration : headers\openvr_capi.h:282 */ - public static final int ETrackedDeviceProperty_Prop_LensCenterRightV_Float = 2025; - /** native declaration : headers\openvr_capi.h:283 */ - public static final int ETrackedDeviceProperty_Prop_UserHeadToEyeDepthMeters_Float = 2026; - /** native declaration : headers\openvr_capi.h:284 */ - public static final int ETrackedDeviceProperty_Prop_CameraFirmwareVersion_Uint64 = 2027; - /** native declaration : headers\openvr_capi.h:285 */ - public static final int ETrackedDeviceProperty_Prop_CameraFirmwareDescription_String = 2028; - /** native declaration : headers\openvr_capi.h:286 */ - public static final int ETrackedDeviceProperty_Prop_DisplayFPGAVersion_Uint64 = 2029; - /** native declaration : headers\openvr_capi.h:287 */ - public static final int ETrackedDeviceProperty_Prop_DisplayBootloaderVersion_Uint64 = 2030; - /** native declaration : headers\openvr_capi.h:288 */ - public static final int ETrackedDeviceProperty_Prop_DisplayHardwareVersion_Uint64 = 2031; - /** native declaration : headers\openvr_capi.h:289 */ - public static final int ETrackedDeviceProperty_Prop_AudioFirmwareVersion_Uint64 = 2032; - /** native declaration : headers\openvr_capi.h:290 */ - public static final int ETrackedDeviceProperty_Prop_CameraCompatibilityMode_Int32 = 2033; - /** native declaration : headers\openvr_capi.h:291 */ - public static final int ETrackedDeviceProperty_Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034; - /** native declaration : headers\openvr_capi.h:292 */ - public static final int ETrackedDeviceProperty_Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035; - /** native declaration : headers\openvr_capi.h:293 */ - public static final int ETrackedDeviceProperty_Prop_DisplaySuppressed_Bool = 2036; - /** native declaration : headers\openvr_capi.h:294 */ - public static final int ETrackedDeviceProperty_Prop_DisplayAllowNightMode_Bool = 2037; - /** native declaration : headers\openvr_capi.h:295 */ - public static final int ETrackedDeviceProperty_Prop_DisplayMCImageWidth_Int32 = 2038; - /** native declaration : headers\openvr_capi.h:296 */ - public static final int ETrackedDeviceProperty_Prop_DisplayMCImageHeight_Int32 = 2039; - /** native declaration : headers\openvr_capi.h:297 */ - public static final int ETrackedDeviceProperty_Prop_DisplayMCImageNumChannels_Int32 = 2040; - /** native declaration : headers\openvr_capi.h:298 */ - public static final int ETrackedDeviceProperty_Prop_DisplayMCImageData_Binary = 2041; - /** native declaration : headers\openvr_capi.h:299 */ - public static final int ETrackedDeviceProperty_Prop_SecondsFromPhotonsToVblank_Float = 2042; - /** native declaration : headers\openvr_capi.h:300 */ - public static final int ETrackedDeviceProperty_Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043; - /** native declaration : headers\openvr_capi.h:301 */ - public static final int ETrackedDeviceProperty_Prop_DisplayDebugMode_Bool = 2044; - /** native declaration : headers\openvr_capi.h:302 */ - public static final int ETrackedDeviceProperty_Prop_GraphicsAdapterLuid_Uint64 = 2045; - /** native declaration : headers\openvr_capi.h:303 */ - public static final int ETrackedDeviceProperty_Prop_DriverProvidedChaperonePath_String = 2048; - /** native declaration : headers\openvr_capi.h:304 */ - public static final int ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000; - /** native declaration : headers\openvr_capi.h:305 */ - public static final int ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001; - /** native declaration : headers\openvr_capi.h:306 */ - public static final int ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002; - /** native declaration : headers\openvr_capi.h:307 */ - public static final int ETrackedDeviceProperty_Prop_Axis1Type_Int32 = 3003; - /** native declaration : headers\openvr_capi.h:308 */ - public static final int ETrackedDeviceProperty_Prop_Axis2Type_Int32 = 3004; - /** native declaration : headers\openvr_capi.h:309 */ - public static final int ETrackedDeviceProperty_Prop_Axis3Type_Int32 = 3005; - /** native declaration : headers\openvr_capi.h:310 */ - public static final int ETrackedDeviceProperty_Prop_Axis4Type_Int32 = 3006; - /** native declaration : headers\openvr_capi.h:311 */ - public static final int ETrackedDeviceProperty_Prop_ControllerRoleHint_Int32 = 3007; - /** native declaration : headers\openvr_capi.h:312 */ - public static final int ETrackedDeviceProperty_Prop_FieldOfViewLeftDegrees_Float = 4000; - /** native declaration : headers\openvr_capi.h:313 */ - public static final int ETrackedDeviceProperty_Prop_FieldOfViewRightDegrees_Float = 4001; - /** native declaration : headers\openvr_capi.h:314 */ - public static final int ETrackedDeviceProperty_Prop_FieldOfViewTopDegrees_Float = 4002; - /** native declaration : headers\openvr_capi.h:315 */ - public static final int ETrackedDeviceProperty_Prop_FieldOfViewBottomDegrees_Float = 4003; - /** native declaration : headers\openvr_capi.h:316 */ - public static final int ETrackedDeviceProperty_Prop_TrackingRangeMinimumMeters_Float = 4004; - /** native declaration : headers\openvr_capi.h:317 */ - public static final int ETrackedDeviceProperty_Prop_TrackingRangeMaximumMeters_Float = 4005; - /** native declaration : headers\openvr_capi.h:318 */ - public static final int ETrackedDeviceProperty_Prop_ModeLabel_String = 4006; - /** native declaration : headers\openvr_capi.h:319 */ - public static final int ETrackedDeviceProperty_Prop_IconPathName_String = 5000; - /** native declaration : headers\openvr_capi.h:320 */ - public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceOff_String = 5001; - /** native declaration : headers\openvr_capi.h:321 */ - public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceSearching_String = 5002; - /** native declaration : headers\openvr_capi.h:322 */ - public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceSearchingAlert_String = 5003; - /** native declaration : headers\openvr_capi.h:323 */ - public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceReady_String = 5004; - /** native declaration : headers\openvr_capi.h:324 */ - public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceReadyAlert_String = 5005; - /** native declaration : headers\openvr_capi.h:325 */ - public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceNotReady_String = 5006; - /** native declaration : headers\openvr_capi.h:326 */ - public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceStandby_String = 5007; - /** native declaration : headers\openvr_capi.h:327 */ - public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceAlertLow_String = 5008; - /** native declaration : headers\openvr_capi.h:328 */ - public static final int ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_Start = 5100; - /** native declaration : headers\openvr_capi.h:329 */ - public static final int ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_End = 5150; - /** native declaration : headers\openvr_capi.h:330 */ - public static final int ETrackedDeviceProperty_Prop_UserConfigPath_String = 6000; - /** native declaration : headers\openvr_capi.h:331 */ - public static final int ETrackedDeviceProperty_Prop_InstallPath_String = 6001; - /** native declaration : headers\openvr_capi.h:332 */ - public static final int ETrackedDeviceProperty_Prop_HasDisplayComponent_Bool = 6002; - /** native declaration : headers\openvr_capi.h:333 */ - public static final int ETrackedDeviceProperty_Prop_HasControllerComponent_Bool = 6003; - /** native declaration : headers\openvr_capi.h:334 */ - public static final int ETrackedDeviceProperty_Prop_HasCameraComponent_Bool = 6004; - /** native declaration : headers\openvr_capi.h:335 */ - public static final int ETrackedDeviceProperty_Prop_HasDriverDirectModeComponent_Bool = 6005; - /** native declaration : headers\openvr_capi.h:336 */ - public static final int ETrackedDeviceProperty_Prop_HasVirtualDisplayComponent_Bool = 6006; - /** native declaration : headers\openvr_capi.h:337 */ - public static final int ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_Start = 10000; - /** native declaration : headers\openvr_capi.h:338 */ - public static final int ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_End = 10999; - }; - /** - * native declaration : headers\openvr_capi.h:353
- * enum values - */ - public static interface ETrackedPropertyError { - /** native declaration : headers\openvr_capi.h:341 */ - public static final int ETrackedPropertyError_TrackedProp_Success = 0; - /** native declaration : headers\openvr_capi.h:342 */ - public static final int ETrackedPropertyError_TrackedProp_WrongDataType = 1; - /** native declaration : headers\openvr_capi.h:343 */ - public static final int ETrackedPropertyError_TrackedProp_WrongDeviceClass = 2; - /** native declaration : headers\openvr_capi.h:344 */ - public static final int ETrackedPropertyError_TrackedProp_BufferTooSmall = 3; - /** native declaration : headers\openvr_capi.h:345 */ - public static final int ETrackedPropertyError_TrackedProp_UnknownProperty = 4; - /** native declaration : headers\openvr_capi.h:346 */ - public static final int ETrackedPropertyError_TrackedProp_InvalidDevice = 5; - /** native declaration : headers\openvr_capi.h:347 */ - public static final int ETrackedPropertyError_TrackedProp_CouldNotContactServer = 6; - /** native declaration : headers\openvr_capi.h:348 */ - public static final int ETrackedPropertyError_TrackedProp_ValueNotProvidedByDevice = 7; - /** native declaration : headers\openvr_capi.h:349 */ - public static final int ETrackedPropertyError_TrackedProp_StringExceedsMaximumLength = 8; - /** native declaration : headers\openvr_capi.h:350 */ - public static final int ETrackedPropertyError_TrackedProp_NotYetAvailable = 9; - /** native declaration : headers\openvr_capi.h:351 */ - public static final int ETrackedPropertyError_TrackedProp_PermissionDenied = 10; - /** native declaration : headers\openvr_capi.h:352 */ - public static final int ETrackedPropertyError_TrackedProp_InvalidOperation = 11; - }; - /** - * native declaration : headers\openvr_capi.h:359
- * enum values - */ - public static interface EVRSubmitFlags { - /** native declaration : headers\openvr_capi.h:355 */ - public static final int EVRSubmitFlags_Submit_Default = 0; - /** native declaration : headers\openvr_capi.h:356 */ - public static final int EVRSubmitFlags_Submit_LensDistortionAlreadyApplied = 1; - /** native declaration : headers\openvr_capi.h:357 */ - public static final int EVRSubmitFlags_Submit_GlRenderBuffer = 2; - /** native declaration : headers\openvr_capi.h:358 */ - public static final int EVRSubmitFlags_Submit_Reserved = 4; - }; - /** - * native declaration : headers\openvr_capi.h:370
- * enum values - */ - public static interface EVRState { - /** native declaration : headers\openvr_capi.h:361 */ - public static final int EVRState_VRState_Undefined = -1; - /** native declaration : headers\openvr_capi.h:362 */ - public static final int EVRState_VRState_Off = 0; - /** native declaration : headers\openvr_capi.h:363 */ - public static final int EVRState_VRState_Searching = 1; - /** native declaration : headers\openvr_capi.h:364 */ - public static final int EVRState_VRState_Searching_Alert = 2; - /** native declaration : headers\openvr_capi.h:365 */ - public static final int EVRState_VRState_Ready = 3; - /** native declaration : headers\openvr_capi.h:366 */ - public static final int EVRState_VRState_Ready_Alert = 4; - /** native declaration : headers\openvr_capi.h:367 */ - public static final int EVRState_VRState_NotReady = 5; - /** native declaration : headers\openvr_capi.h:368 */ - public static final int EVRState_VRState_Standby = 6; - /** native declaration : headers\openvr_capi.h:369 */ - public static final int EVRState_VRState_Ready_Alert_Low = 7; - }; - /** - * native declaration : headers\openvr_capi.h:486
- * enum values - */ - public static interface EVREventType { - /** native declaration : headers\openvr_capi.h:372 */ - public static final int EVREventType_VREvent_None = 0; - /** native declaration : headers\openvr_capi.h:373 */ - public static final int EVREventType_VREvent_TrackedDeviceActivated = 100; - /** native declaration : headers\openvr_capi.h:374 */ - public static final int EVREventType_VREvent_TrackedDeviceDeactivated = 101; - /** native declaration : headers\openvr_capi.h:375 */ - public static final int EVREventType_VREvent_TrackedDeviceUpdated = 102; - /** native declaration : headers\openvr_capi.h:376 */ - public static final int EVREventType_VREvent_TrackedDeviceUserInteractionStarted = 103; - /** native declaration : headers\openvr_capi.h:377 */ - public static final int EVREventType_VREvent_TrackedDeviceUserInteractionEnded = 104; - /** native declaration : headers\openvr_capi.h:378 */ - public static final int EVREventType_VREvent_IpdChanged = 105; - /** native declaration : headers\openvr_capi.h:379 */ - public static final int EVREventType_VREvent_EnterStandbyMode = 106; - /** native declaration : headers\openvr_capi.h:380 */ - public static final int EVREventType_VREvent_LeaveStandbyMode = 107; - /** native declaration : headers\openvr_capi.h:381 */ - public static final int EVREventType_VREvent_TrackedDeviceRoleChanged = 108; - /** native declaration : headers\openvr_capi.h:382 */ - public static final int EVREventType_VREvent_WatchdogWakeUpRequested = 109; - /** native declaration : headers\openvr_capi.h:383 */ - public static final int EVREventType_VREvent_LensDistortionChanged = 110; - /** native declaration : headers\openvr_capi.h:384 */ - public static final int EVREventType_VREvent_PropertyChanged = 111; - /** native declaration : headers\openvr_capi.h:385 */ - public static final int EVREventType_VREvent_WirelessDisconnect = 112; - /** native declaration : headers\openvr_capi.h:386 */ - public static final int EVREventType_VREvent_WirelessReconnect = 113; - /** native declaration : headers\openvr_capi.h:387 */ - public static final int EVREventType_VREvent_ButtonPress = 200; - /** native declaration : headers\openvr_capi.h:388 */ - public static final int EVREventType_VREvent_ButtonUnpress = 201; - /** native declaration : headers\openvr_capi.h:389 */ - public static final int EVREventType_VREvent_ButtonTouch = 202; - /** native declaration : headers\openvr_capi.h:390 */ - public static final int EVREventType_VREvent_ButtonUntouch = 203; - /** native declaration : headers\openvr_capi.h:391 */ - public static final int EVREventType_VREvent_MouseMove = 300; - /** native declaration : headers\openvr_capi.h:392 */ - public static final int EVREventType_VREvent_MouseButtonDown = 301; - /** native declaration : headers\openvr_capi.h:393 */ - public static final int EVREventType_VREvent_MouseButtonUp = 302; - /** native declaration : headers\openvr_capi.h:394 */ - public static final int EVREventType_VREvent_FocusEnter = 303; - /** native declaration : headers\openvr_capi.h:395 */ - public static final int EVREventType_VREvent_FocusLeave = 304; - /** native declaration : headers\openvr_capi.h:396 */ - public static final int EVREventType_VREvent_Scroll = 305; - /** native declaration : headers\openvr_capi.h:397 */ - public static final int EVREventType_VREvent_TouchPadMove = 306; - /** native declaration : headers\openvr_capi.h:398 */ - public static final int EVREventType_VREvent_OverlayFocusChanged = 307; - /** native declaration : headers\openvr_capi.h:399 */ - public static final int EVREventType_VREvent_InputFocusCaptured = 400; - /** native declaration : headers\openvr_capi.h:400 */ - public static final int EVREventType_VREvent_InputFocusReleased = 401; - /** native declaration : headers\openvr_capi.h:401 */ - public static final int EVREventType_VREvent_SceneFocusLost = 402; - /** native declaration : headers\openvr_capi.h:402 */ - public static final int EVREventType_VREvent_SceneFocusGained = 403; - /** native declaration : headers\openvr_capi.h:403 */ - public static final int EVREventType_VREvent_SceneApplicationChanged = 404; - /** native declaration : headers\openvr_capi.h:404 */ - public static final int EVREventType_VREvent_SceneFocusChanged = 405; - /** native declaration : headers\openvr_capi.h:405 */ - public static final int EVREventType_VREvent_InputFocusChanged = 406; - /** native declaration : headers\openvr_capi.h:406 */ - public static final int EVREventType_VREvent_SceneApplicationSecondaryRenderingStarted = 407; - /** native declaration : headers\openvr_capi.h:407 */ - public static final int EVREventType_VREvent_HideRenderModels = 410; - /** native declaration : headers\openvr_capi.h:408 */ - public static final int EVREventType_VREvent_ShowRenderModels = 411; - /** native declaration : headers\openvr_capi.h:409 */ - public static final int EVREventType_VREvent_OverlayShown = 500; - /** native declaration : headers\openvr_capi.h:410 */ - public static final int EVREventType_VREvent_OverlayHidden = 501; - /** native declaration : headers\openvr_capi.h:411 */ - public static final int EVREventType_VREvent_DashboardActivated = 502; - /** native declaration : headers\openvr_capi.h:412 */ - public static final int EVREventType_VREvent_DashboardDeactivated = 503; - /** native declaration : headers\openvr_capi.h:413 */ - public static final int EVREventType_VREvent_DashboardThumbSelected = 504; - /** native declaration : headers\openvr_capi.h:414 */ - public static final int EVREventType_VREvent_DashboardRequested = 505; - /** native declaration : headers\openvr_capi.h:415 */ - public static final int EVREventType_VREvent_ResetDashboard = 506; - /** native declaration : headers\openvr_capi.h:416 */ - public static final int EVREventType_VREvent_RenderToast = 507; - /** native declaration : headers\openvr_capi.h:417 */ - public static final int EVREventType_VREvent_ImageLoaded = 508; - /** native declaration : headers\openvr_capi.h:418 */ - public static final int EVREventType_VREvent_ShowKeyboard = 509; - /** native declaration : headers\openvr_capi.h:419 */ - public static final int EVREventType_VREvent_HideKeyboard = 510; - /** native declaration : headers\openvr_capi.h:420 */ - public static final int EVREventType_VREvent_OverlayGamepadFocusGained = 511; - /** native declaration : headers\openvr_capi.h:421 */ - public static final int EVREventType_VREvent_OverlayGamepadFocusLost = 512; - /** native declaration : headers\openvr_capi.h:422 */ - public static final int EVREventType_VREvent_OverlaySharedTextureChanged = 513; - /** native declaration : headers\openvr_capi.h:423 */ - public static final int EVREventType_VREvent_DashboardGuideButtonDown = 514; - /** native declaration : headers\openvr_capi.h:424 */ - public static final int EVREventType_VREvent_DashboardGuideButtonUp = 515; - /** native declaration : headers\openvr_capi.h:425 */ - public static final int EVREventType_VREvent_ScreenshotTriggered = 516; - /** native declaration : headers\openvr_capi.h:426 */ - public static final int EVREventType_VREvent_ImageFailed = 517; - /** native declaration : headers\openvr_capi.h:427 */ - public static final int EVREventType_VREvent_DashboardOverlayCreated = 518; - /** native declaration : headers\openvr_capi.h:428 */ - public static final int EVREventType_VREvent_RequestScreenshot = 520; - /** native declaration : headers\openvr_capi.h:429 */ - public static final int EVREventType_VREvent_ScreenshotTaken = 521; - /** native declaration : headers\openvr_capi.h:430 */ - public static final int EVREventType_VREvent_ScreenshotFailed = 522; - /** native declaration : headers\openvr_capi.h:431 */ - public static final int EVREventType_VREvent_SubmitScreenshotToDashboard = 523; - /** native declaration : headers\openvr_capi.h:432 */ - public static final int EVREventType_VREvent_ScreenshotProgressToDashboard = 524; - /** native declaration : headers\openvr_capi.h:433 */ - public static final int EVREventType_VREvent_PrimaryDashboardDeviceChanged = 525; - /** native declaration : headers\openvr_capi.h:434 */ - public static final int EVREventType_VREvent_Notification_Shown = 600; - /** native declaration : headers\openvr_capi.h:435 */ - public static final int EVREventType_VREvent_Notification_Hidden = 601; - /** native declaration : headers\openvr_capi.h:436 */ - public static final int EVREventType_VREvent_Notification_BeginInteraction = 602; - /** native declaration : headers\openvr_capi.h:437 */ - public static final int EVREventType_VREvent_Notification_Destroyed = 603; - /** native declaration : headers\openvr_capi.h:438 */ - public static final int EVREventType_VREvent_Quit = 700; - /** native declaration : headers\openvr_capi.h:439 */ - public static final int EVREventType_VREvent_ProcessQuit = 701; - /** native declaration : headers\openvr_capi.h:440 */ - public static final int EVREventType_VREvent_QuitAborted_UserPrompt = 702; - /** native declaration : headers\openvr_capi.h:441 */ - public static final int EVREventType_VREvent_QuitAcknowledged = 703; - /** native declaration : headers\openvr_capi.h:442 */ - public static final int EVREventType_VREvent_DriverRequestedQuit = 704; - /** native declaration : headers\openvr_capi.h:443 */ - public static final int EVREventType_VREvent_ChaperoneDataHasChanged = 800; - /** native declaration : headers\openvr_capi.h:444 */ - public static final int EVREventType_VREvent_ChaperoneUniverseHasChanged = 801; - /** native declaration : headers\openvr_capi.h:445 */ - public static final int EVREventType_VREvent_ChaperoneTempDataHasChanged = 802; - /** native declaration : headers\openvr_capi.h:446 */ - public static final int EVREventType_VREvent_ChaperoneSettingsHaveChanged = 803; - /** native declaration : headers\openvr_capi.h:447 */ - public static final int EVREventType_VREvent_SeatedZeroPoseReset = 804; - /** native declaration : headers\openvr_capi.h:448 */ - public static final int EVREventType_VREvent_AudioSettingsHaveChanged = 820; - /** native declaration : headers\openvr_capi.h:449 */ - public static final int EVREventType_VREvent_BackgroundSettingHasChanged = 850; - /** native declaration : headers\openvr_capi.h:450 */ - public static final int EVREventType_VREvent_CameraSettingsHaveChanged = 851; - /** native declaration : headers\openvr_capi.h:451 */ - public static final int EVREventType_VREvent_ReprojectionSettingHasChanged = 852; - /** native declaration : headers\openvr_capi.h:452 */ - public static final int EVREventType_VREvent_ModelSkinSettingsHaveChanged = 853; - /** native declaration : headers\openvr_capi.h:453 */ - public static final int EVREventType_VREvent_EnvironmentSettingsHaveChanged = 854; - /** native declaration : headers\openvr_capi.h:454 */ - public static final int EVREventType_VREvent_PowerSettingsHaveChanged = 855; - /** native declaration : headers\openvr_capi.h:455 */ - public static final int EVREventType_VREvent_EnableHomeAppSettingsHaveChanged = 856; - /** native declaration : headers\openvr_capi.h:456 */ - public static final int EVREventType_VREvent_StatusUpdate = 900; - /** native declaration : headers\openvr_capi.h:457 */ - public static final int EVREventType_VREvent_MCImageUpdated = 1000; - /** native declaration : headers\openvr_capi.h:458 */ - public static final int EVREventType_VREvent_FirmwareUpdateStarted = 1100; - /** native declaration : headers\openvr_capi.h:459 */ - public static final int EVREventType_VREvent_FirmwareUpdateFinished = 1101; - /** native declaration : headers\openvr_capi.h:460 */ - public static final int EVREventType_VREvent_KeyboardClosed = 1200; - /** native declaration : headers\openvr_capi.h:461 */ - public static final int EVREventType_VREvent_KeyboardCharInput = 1201; - /** native declaration : headers\openvr_capi.h:462 */ - public static final int EVREventType_VREvent_KeyboardDone = 1202; - /** native declaration : headers\openvr_capi.h:463 */ - public static final int EVREventType_VREvent_ApplicationTransitionStarted = 1300; - /** native declaration : headers\openvr_capi.h:464 */ - public static final int EVREventType_VREvent_ApplicationTransitionAborted = 1301; - /** native declaration : headers\openvr_capi.h:465 */ - public static final int EVREventType_VREvent_ApplicationTransitionNewAppStarted = 1302; - /** native declaration : headers\openvr_capi.h:466 */ - public static final int EVREventType_VREvent_ApplicationListUpdated = 1303; - /** native declaration : headers\openvr_capi.h:467 */ - public static final int EVREventType_VREvent_ApplicationMimeTypeLoad = 1304; - /** native declaration : headers\openvr_capi.h:468 */ - public static final int EVREventType_VREvent_ApplicationTransitionNewAppLaunchComplete = 1305; - /** native declaration : headers\openvr_capi.h:469 */ - public static final int EVREventType_VREvent_ProcessConnected = 1306; - /** native declaration : headers\openvr_capi.h:470 */ - public static final int EVREventType_VREvent_ProcessDisconnected = 1307; - /** native declaration : headers\openvr_capi.h:471 */ - public static final int EVREventType_VREvent_Compositor_MirrorWindowShown = 1400; - /** native declaration : headers\openvr_capi.h:472 */ - public static final int EVREventType_VREvent_Compositor_MirrorWindowHidden = 1401; - /** native declaration : headers\openvr_capi.h:473 */ - public static final int EVREventType_VREvent_Compositor_ChaperoneBoundsShown = 1410; - /** native declaration : headers\openvr_capi.h:474 */ - public static final int EVREventType_VREvent_Compositor_ChaperoneBoundsHidden = 1411; - /** native declaration : headers\openvr_capi.h:475 */ - public static final int EVREventType_VREvent_TrackedCamera_StartVideoStream = 1500; - /** native declaration : headers\openvr_capi.h:476 */ - public static final int EVREventType_VREvent_TrackedCamera_StopVideoStream = 1501; - /** native declaration : headers\openvr_capi.h:477 */ - public static final int EVREventType_VREvent_TrackedCamera_PauseVideoStream = 1502; - /** native declaration : headers\openvr_capi.h:478 */ - public static final int EVREventType_VREvent_TrackedCamera_ResumeVideoStream = 1503; - /** native declaration : headers\openvr_capi.h:479 */ - public static final int EVREventType_VREvent_TrackedCamera_EditingSurface = 1550; - /** native declaration : headers\openvr_capi.h:480 */ - public static final int EVREventType_VREvent_PerformanceTest_EnableCapture = 1600; - /** native declaration : headers\openvr_capi.h:481 */ - public static final int EVREventType_VREvent_PerformanceTest_DisableCapture = 1601; - /** native declaration : headers\openvr_capi.h:482 */ - public static final int EVREventType_VREvent_PerformanceTest_FidelityLevel = 1602; - /** native declaration : headers\openvr_capi.h:483 */ - public static final int EVREventType_VREvent_MessageOverlay_Closed = 1650; - /** native declaration : headers\openvr_capi.h:484 */ - public static final int EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000; - /** native declaration : headers\openvr_capi.h:485 */ - public static final int EVREventType_VREvent_VendorSpecific_Reserved_End = 19999; - }; - /** - * native declaration : headers\openvr_capi.h:493
- * enum values - */ - public static interface EDeviceActivityLevel { - /** native declaration : headers\openvr_capi.h:488 */ - public static final int EDeviceActivityLevel_k_EDeviceActivityLevel_Unknown = -1; - /** native declaration : headers\openvr_capi.h:489 */ - public static final int EDeviceActivityLevel_k_EDeviceActivityLevel_Idle = 0; - /** native declaration : headers\openvr_capi.h:490 */ - public static final int EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction = 1; - /** native declaration : headers\openvr_capi.h:491 */ - public static final int EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction_Timeout = 2; - /** native declaration : headers\openvr_capi.h:492 */ - public static final int EDeviceActivityLevel_k_EDeviceActivityLevel_Standby = 3; - }; - /** - * native declaration : headers\openvr_capi.h:513
- * enum values - */ - public static interface EVRButtonId { - /** native declaration : headers\openvr_capi.h:495 */ - public static final int EVRButtonId_k_EButton_System = 0; - /** native declaration : headers\openvr_capi.h:496 */ - public static final int EVRButtonId_k_EButton_ApplicationMenu = 1; - /** native declaration : headers\openvr_capi.h:497 */ - public static final int EVRButtonId_k_EButton_Grip = 2; - /** native declaration : headers\openvr_capi.h:498 */ - public static final int EVRButtonId_k_EButton_DPad_Left = 3; - /** native declaration : headers\openvr_capi.h:499 */ - public static final int EVRButtonId_k_EButton_DPad_Up = 4; - /** native declaration : headers\openvr_capi.h:500 */ - public static final int EVRButtonId_k_EButton_DPad_Right = 5; - /** native declaration : headers\openvr_capi.h:501 */ - public static final int EVRButtonId_k_EButton_DPad_Down = 6; - /** native declaration : headers\openvr_capi.h:502 */ - public static final int EVRButtonId_k_EButton_A = 7; - /** native declaration : headers\openvr_capi.h:503 */ - public static final int EVRButtonId_k_EButton_ProximitySensor = 31; - /** native declaration : headers\openvr_capi.h:504 */ - public static final int EVRButtonId_k_EButton_Axis0 = 32; - /** native declaration : headers\openvr_capi.h:505 */ - public static final int EVRButtonId_k_EButton_Axis1 = 33; - /** native declaration : headers\openvr_capi.h:506 */ - public static final int EVRButtonId_k_EButton_Axis2 = 34; - /** native declaration : headers\openvr_capi.h:507 */ - public static final int EVRButtonId_k_EButton_Axis3 = 35; - /** native declaration : headers\openvr_capi.h:508 */ - public static final int EVRButtonId_k_EButton_Axis4 = 36; - /** native declaration : headers\openvr_capi.h:509 */ - public static final int EVRButtonId_k_EButton_SteamVR_Touchpad = 32; - /** native declaration : headers\openvr_capi.h:510 */ - public static final int EVRButtonId_k_EButton_SteamVR_Trigger = 33; - /** native declaration : headers\openvr_capi.h:511 */ - public static final int EVRButtonId_k_EButton_Dashboard_Back = 2; - /** native declaration : headers\openvr_capi.h:512 */ - public static final int EVRButtonId_k_EButton_Max = 64; - }; - /** - * native declaration : headers\openvr_capi.h:518
- * enum values - */ - public static interface EVRMouseButton { - /** native declaration : headers\openvr_capi.h:515 */ - public static final int EVRMouseButton_VRMouseButton_Left = 1; - /** native declaration : headers\openvr_capi.h:516 */ - public static final int EVRMouseButton_VRMouseButton_Right = 2; - /** native declaration : headers\openvr_capi.h:517 */ - public static final int EVRMouseButton_VRMouseButton_Middle = 4; - }; - /** - * native declaration : headers\openvr_capi.h:524
- * enum values - */ - public static interface EHiddenAreaMeshType { - /** native declaration : headers\openvr_capi.h:520 */ - public static final int EHiddenAreaMeshType_k_eHiddenAreaMesh_Standard = 0; - /** native declaration : headers\openvr_capi.h:521 */ - public static final int EHiddenAreaMeshType_k_eHiddenAreaMesh_Inverse = 1; - /** native declaration : headers\openvr_capi.h:522 */ - public static final int EHiddenAreaMeshType_k_eHiddenAreaMesh_LineLoop = 2; - /** native declaration : headers\openvr_capi.h:523 */ - public static final int EHiddenAreaMeshType_k_eHiddenAreaMesh_Max = 3; - }; - /** - * native declaration : headers\openvr_capi.h:530
- * enum values - */ - public static interface EVRControllerAxisType { - /** native declaration : headers\openvr_capi.h:526 */ - public static final int EVRControllerAxisType_k_eControllerAxis_None = 0; - /** native declaration : headers\openvr_capi.h:527 */ - public static final int EVRControllerAxisType_k_eControllerAxis_TrackPad = 1; - /** native declaration : headers\openvr_capi.h:528 */ - public static final int EVRControllerAxisType_k_eControllerAxis_Joystick = 2; - /** native declaration : headers\openvr_capi.h:529 */ - public static final int EVRControllerAxisType_k_eControllerAxis_Trigger = 3; - }; - /** - * native declaration : headers\openvr_capi.h:534
- * enum values - */ - public static interface EVRControllerEventOutputType { - /** native declaration : headers\openvr_capi.h:532 */ - public static final int EVRControllerEventOutputType_ControllerEventOutput_OSEvents = 0; - /** native declaration : headers\openvr_capi.h:533 */ - public static final int EVRControllerEventOutputType_ControllerEventOutput_VREvents = 1; - }; - /** - * native declaration : headers\openvr_capi.h:542
- * enum values - */ - public static interface ECollisionBoundsStyle { - /** native declaration : headers\openvr_capi.h:536 */ - public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_BEGINNER = 0; - /** native declaration : headers\openvr_capi.h:537 */ - public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_INTERMEDIATE = 1; - /** native declaration : headers\openvr_capi.h:538 */ - public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_SQUARES = 2; - /** native declaration : headers\openvr_capi.h:539 */ - public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_ADVANCED = 3; - /** native declaration : headers\openvr_capi.h:540 */ - public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_NONE = 4; - /** native declaration : headers\openvr_capi.h:541 */ - public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_COUNT = 5; - }; - /** - * native declaration : headers\openvr_capi.h:565
- * enum values - */ - public static interface EVROverlayError { - /** native declaration : headers\openvr_capi.h:544 */ - public static final int EVROverlayError_VROverlayError_None = 0; - /** native declaration : headers\openvr_capi.h:545 */ - public static final int EVROverlayError_VROverlayError_UnknownOverlay = 10; - /** native declaration : headers\openvr_capi.h:546 */ - public static final int EVROverlayError_VROverlayError_InvalidHandle = 11; - /** native declaration : headers\openvr_capi.h:547 */ - public static final int EVROverlayError_VROverlayError_PermissionDenied = 12; - /** native declaration : headers\openvr_capi.h:548 */ - public static final int EVROverlayError_VROverlayError_OverlayLimitExceeded = 13; - /** native declaration : headers\openvr_capi.h:549 */ - public static final int EVROverlayError_VROverlayError_WrongVisibilityType = 14; - /** native declaration : headers\openvr_capi.h:550 */ - public static final int EVROverlayError_VROverlayError_KeyTooLong = 15; - /** native declaration : headers\openvr_capi.h:551 */ - public static final int EVROverlayError_VROverlayError_NameTooLong = 16; - /** native declaration : headers\openvr_capi.h:552 */ - public static final int EVROverlayError_VROverlayError_KeyInUse = 17; - /** native declaration : headers\openvr_capi.h:553 */ - public static final int EVROverlayError_VROverlayError_WrongTransformType = 18; - /** native declaration : headers\openvr_capi.h:554 */ - public static final int EVROverlayError_VROverlayError_InvalidTrackedDevice = 19; - /** native declaration : headers\openvr_capi.h:555 */ - public static final int EVROverlayError_VROverlayError_InvalidParameter = 20; - /** native declaration : headers\openvr_capi.h:556 */ - public static final int EVROverlayError_VROverlayError_ThumbnailCantBeDestroyed = 21; - /** native declaration : headers\openvr_capi.h:557 */ - public static final int EVROverlayError_VROverlayError_ArrayTooSmall = 22; - /** native declaration : headers\openvr_capi.h:558 */ - public static final int EVROverlayError_VROverlayError_RequestFailed = 23; - /** native declaration : headers\openvr_capi.h:559 */ - public static final int EVROverlayError_VROverlayError_InvalidTexture = 24; - /** native declaration : headers\openvr_capi.h:560 */ - public static final int EVROverlayError_VROverlayError_UnableToLoadFile = 25; - /** native declaration : headers\openvr_capi.h:561 */ - public static final int EVROverlayError_VROverlayError_KeyboardAlreadyInUse = 26; - /** native declaration : headers\openvr_capi.h:562 */ - public static final int EVROverlayError_VROverlayError_NoNeighbor = 27; - /** native declaration : headers\openvr_capi.h:563 */ - public static final int EVROverlayError_VROverlayError_TooManyMaskPrimitives = 29; - /** native declaration : headers\openvr_capi.h:564 */ - public static final int EVROverlayError_VROverlayError_BadMaskPrimitive = 30; - }; - /** - * native declaration : headers\openvr_capi.h:576
- * enum values - */ - public static interface EVRApplicationType { - /** native declaration : headers\openvr_capi.h:567 */ - public static final int EVRApplicationType_VRApplication_Other = 0; - /** native declaration : headers\openvr_capi.h:568 */ - public static final int EVRApplicationType_VRApplication_Scene = 1; - /** native declaration : headers\openvr_capi.h:569 */ - public static final int EVRApplicationType_VRApplication_Overlay = 2; - /** native declaration : headers\openvr_capi.h:570 */ - public static final int EVRApplicationType_VRApplication_Background = 3; - /** native declaration : headers\openvr_capi.h:571 */ - public static final int EVRApplicationType_VRApplication_Utility = 4; - /** native declaration : headers\openvr_capi.h:572 */ - public static final int EVRApplicationType_VRApplication_VRMonitor = 5; - /** native declaration : headers\openvr_capi.h:573 */ - public static final int EVRApplicationType_VRApplication_SteamWatchdog = 6; - /** native declaration : headers\openvr_capi.h:574 */ - public static final int EVRApplicationType_VRApplication_Bootstrapper = 7; - /** native declaration : headers\openvr_capi.h:575 */ - public static final int EVRApplicationType_VRApplication_Max = 8; - }; - /** - * native declaration : headers\openvr_capi.h:581
- * enum values - */ - public static interface EVRFirmwareError { - /** native declaration : headers\openvr_capi.h:578 */ - public static final int EVRFirmwareError_VRFirmwareError_None = 0; - /** native declaration : headers\openvr_capi.h:579 */ - public static final int EVRFirmwareError_VRFirmwareError_Success = 1; - /** native declaration : headers\openvr_capi.h:580 */ - public static final int EVRFirmwareError_VRFirmwareError_Fail = 2; - }; - /** - * native declaration : headers\openvr_capi.h:588
- * enum values - */ - public static interface EVRNotificationError { - /** native declaration : headers\openvr_capi.h:583 */ - public static final int EVRNotificationError_VRNotificationError_OK = 0; - /** native declaration : headers\openvr_capi.h:584 */ - public static final int EVRNotificationError_VRNotificationError_InvalidNotificationId = 100; - /** native declaration : headers\openvr_capi.h:585 */ - public static final int EVRNotificationError_VRNotificationError_NotificationQueueFull = 101; - /** native declaration : headers\openvr_capi.h:586 */ - public static final int EVRNotificationError_VRNotificationError_InvalidOverlayHandle = 102; - /** native declaration : headers\openvr_capi.h:587 */ - public static final int EVRNotificationError_VRNotificationError_SystemWithUserValueAlreadyExists = 103; - }; - /** - * native declaration : headers\openvr_capi.h:671
- * enum values - */ - public static interface EVRInitError { - /** native declaration : headers\openvr_capi.h:590 */ - public static final int EVRInitError_VRInitError_None = 0; - /** native declaration : headers\openvr_capi.h:591 */ - public static final int EVRInitError_VRInitError_Unknown = 1; - /** native declaration : headers\openvr_capi.h:592 */ - public static final int EVRInitError_VRInitError_Init_InstallationNotFound = 100; - /** native declaration : headers\openvr_capi.h:593 */ - public static final int EVRInitError_VRInitError_Init_InstallationCorrupt = 101; - /** native declaration : headers\openvr_capi.h:594 */ - public static final int EVRInitError_VRInitError_Init_VRClientDLLNotFound = 102; - /** native declaration : headers\openvr_capi.h:595 */ - public static final int EVRInitError_VRInitError_Init_FileNotFound = 103; - /** native declaration : headers\openvr_capi.h:596 */ - public static final int EVRInitError_VRInitError_Init_FactoryNotFound = 104; - /** native declaration : headers\openvr_capi.h:597 */ - public static final int EVRInitError_VRInitError_Init_InterfaceNotFound = 105; - /** native declaration : headers\openvr_capi.h:598 */ - public static final int EVRInitError_VRInitError_Init_InvalidInterface = 106; - /** native declaration : headers\openvr_capi.h:599 */ - public static final int EVRInitError_VRInitError_Init_UserConfigDirectoryInvalid = 107; - /** native declaration : headers\openvr_capi.h:600 */ - public static final int EVRInitError_VRInitError_Init_HmdNotFound = 108; - /** native declaration : headers\openvr_capi.h:601 */ - public static final int EVRInitError_VRInitError_Init_NotInitialized = 109; - /** native declaration : headers\openvr_capi.h:602 */ - public static final int EVRInitError_VRInitError_Init_PathRegistryNotFound = 110; - /** native declaration : headers\openvr_capi.h:603 */ - public static final int EVRInitError_VRInitError_Init_NoConfigPath = 111; - /** native declaration : headers\openvr_capi.h:604 */ - public static final int EVRInitError_VRInitError_Init_NoLogPath = 112; - /** native declaration : headers\openvr_capi.h:605 */ - public static final int EVRInitError_VRInitError_Init_PathRegistryNotWritable = 113; - /** native declaration : headers\openvr_capi.h:606 */ - public static final int EVRInitError_VRInitError_Init_AppInfoInitFailed = 114; - /** native declaration : headers\openvr_capi.h:607 */ - public static final int EVRInitError_VRInitError_Init_Retry = 115; - /** native declaration : headers\openvr_capi.h:608 */ - public static final int EVRInitError_VRInitError_Init_InitCanceledByUser = 116; - /** native declaration : headers\openvr_capi.h:609 */ - public static final int EVRInitError_VRInitError_Init_AnotherAppLaunching = 117; - /** native declaration : headers\openvr_capi.h:610 */ - public static final int EVRInitError_VRInitError_Init_SettingsInitFailed = 118; - /** native declaration : headers\openvr_capi.h:611 */ - public static final int EVRInitError_VRInitError_Init_ShuttingDown = 119; - /** native declaration : headers\openvr_capi.h:612 */ - public static final int EVRInitError_VRInitError_Init_TooManyObjects = 120; - /** native declaration : headers\openvr_capi.h:613 */ - public static final int EVRInitError_VRInitError_Init_NoServerForBackgroundApp = 121; - /** native declaration : headers\openvr_capi.h:614 */ - public static final int EVRInitError_VRInitError_Init_NotSupportedWithCompositor = 122; - /** native declaration : headers\openvr_capi.h:615 */ - public static final int EVRInitError_VRInitError_Init_NotAvailableToUtilityApps = 123; - /** native declaration : headers\openvr_capi.h:616 */ - public static final int EVRInitError_VRInitError_Init_Internal = 124; - /** native declaration : headers\openvr_capi.h:617 */ - public static final int EVRInitError_VRInitError_Init_HmdDriverIdIsNone = 125; - /** native declaration : headers\openvr_capi.h:618 */ - public static final int EVRInitError_VRInitError_Init_HmdNotFoundPresenceFailed = 126; - /** native declaration : headers\openvr_capi.h:619 */ - public static final int EVRInitError_VRInitError_Init_VRMonitorNotFound = 127; - /** native declaration : headers\openvr_capi.h:620 */ - public static final int EVRInitError_VRInitError_Init_VRMonitorStartupFailed = 128; - /** native declaration : headers\openvr_capi.h:621 */ - public static final int EVRInitError_VRInitError_Init_LowPowerWatchdogNotSupported = 129; - /** native declaration : headers\openvr_capi.h:622 */ - public static final int EVRInitError_VRInitError_Init_InvalidApplicationType = 130; - /** native declaration : headers\openvr_capi.h:623 */ - public static final int EVRInitError_VRInitError_Init_NotAvailableToWatchdogApps = 131; - /** native declaration : headers\openvr_capi.h:624 */ - public static final int EVRInitError_VRInitError_Init_WatchdogDisabledInSettings = 132; - /** native declaration : headers\openvr_capi.h:625 */ - public static final int EVRInitError_VRInitError_Init_VRDashboardNotFound = 133; - /** native declaration : headers\openvr_capi.h:626 */ - public static final int EVRInitError_VRInitError_Init_VRDashboardStartupFailed = 134; - /** native declaration : headers\openvr_capi.h:627 */ - public static final int EVRInitError_VRInitError_Init_VRHomeNotFound = 135; - /** native declaration : headers\openvr_capi.h:628 */ - public static final int EVRInitError_VRInitError_Init_VRHomeStartupFailed = 136; - /** native declaration : headers\openvr_capi.h:629 */ - public static final int EVRInitError_VRInitError_Driver_Failed = 200; - /** native declaration : headers\openvr_capi.h:630 */ - public static final int EVRInitError_VRInitError_Driver_Unknown = 201; - /** native declaration : headers\openvr_capi.h:631 */ - public static final int EVRInitError_VRInitError_Driver_HmdUnknown = 202; - /** native declaration : headers\openvr_capi.h:632 */ - public static final int EVRInitError_VRInitError_Driver_NotLoaded = 203; - /** native declaration : headers\openvr_capi.h:633 */ - public static final int EVRInitError_VRInitError_Driver_RuntimeOutOfDate = 204; - /** native declaration : headers\openvr_capi.h:634 */ - public static final int EVRInitError_VRInitError_Driver_HmdInUse = 205; - /** native declaration : headers\openvr_capi.h:635 */ - public static final int EVRInitError_VRInitError_Driver_NotCalibrated = 206; - /** native declaration : headers\openvr_capi.h:636 */ - public static final int EVRInitError_VRInitError_Driver_CalibrationInvalid = 207; - /** native declaration : headers\openvr_capi.h:637 */ - public static final int EVRInitError_VRInitError_Driver_HmdDisplayNotFound = 208; - /** native declaration : headers\openvr_capi.h:638 */ - public static final int EVRInitError_VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209; - /** native declaration : headers\openvr_capi.h:639 */ - public static final int EVRInitError_VRInitError_Driver_HmdDriverIdOutOfBounds = 211; - /** native declaration : headers\openvr_capi.h:640 */ - public static final int EVRInitError_VRInitError_Driver_HmdDisplayMirrored = 212; - /** native declaration : headers\openvr_capi.h:641 */ - public static final int EVRInitError_VRInitError_IPC_ServerInitFailed = 300; - /** native declaration : headers\openvr_capi.h:642 */ - public static final int EVRInitError_VRInitError_IPC_ConnectFailed = 301; - /** native declaration : headers\openvr_capi.h:643 */ - public static final int EVRInitError_VRInitError_IPC_SharedStateInitFailed = 302; - /** native declaration : headers\openvr_capi.h:644 */ - public static final int EVRInitError_VRInitError_IPC_CompositorInitFailed = 303; - /** native declaration : headers\openvr_capi.h:645 */ - public static final int EVRInitError_VRInitError_IPC_MutexInitFailed = 304; - /** native declaration : headers\openvr_capi.h:646 */ - public static final int EVRInitError_VRInitError_IPC_Failed = 305; - /** native declaration : headers\openvr_capi.h:647 */ - public static final int EVRInitError_VRInitError_IPC_CompositorConnectFailed = 306; - /** native declaration : headers\openvr_capi.h:648 */ - public static final int EVRInitError_VRInitError_IPC_CompositorInvalidConnectResponse = 307; - /** native declaration : headers\openvr_capi.h:649 */ - public static final int EVRInitError_VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308; - /** native declaration : headers\openvr_capi.h:650 */ - public static final int EVRInitError_VRInitError_Compositor_Failed = 400; - /** native declaration : headers\openvr_capi.h:651 */ - public static final int EVRInitError_VRInitError_Compositor_D3D11HardwareRequired = 401; - /** native declaration : headers\openvr_capi.h:652 */ - public static final int EVRInitError_VRInitError_Compositor_FirmwareRequiresUpdate = 402; - /** native declaration : headers\openvr_capi.h:653 */ - public static final int EVRInitError_VRInitError_Compositor_OverlayInitFailed = 403; - /** native declaration : headers\openvr_capi.h:654 */ - public static final int EVRInitError_VRInitError_Compositor_ScreenshotsInitFailed = 404; - /** native declaration : headers\openvr_capi.h:655 */ - public static final int EVRInitError_VRInitError_Compositor_UnableToCreateDevice = 405; - /** native declaration : headers\openvr_capi.h:656 */ - public static final int EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000; - /** native declaration : headers\openvr_capi.h:657 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101; - /** native declaration : headers\openvr_capi.h:658 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102; - /** native declaration : headers\openvr_capi.h:659 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103; - /** native declaration : headers\openvr_capi.h:660 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104; - /** native declaration : headers\openvr_capi.h:661 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105; - /** native declaration : headers\openvr_capi.h:662 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106; - /** native declaration : headers\openvr_capi.h:663 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107; - /** native declaration : headers\openvr_capi.h:664 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108; - /** native declaration : headers\openvr_capi.h:665 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109; - /** native declaration : headers\openvr_capi.h:666 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110; - /** native declaration : headers\openvr_capi.h:667 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111; - /** native declaration : headers\openvr_capi.h:668 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataError = 1112; - /** native declaration : headers\openvr_capi.h:669 */ - public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113; - /** native declaration : headers\openvr_capi.h:670 */ - public static final int EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000; - }; - /** - * native declaration : headers\openvr_capi.h:679
- * enum values - */ - public static interface EVRScreenshotType { - /** native declaration : headers\openvr_capi.h:673 */ - public static final int EVRScreenshotType_VRScreenshotType_None = 0; - /** native declaration : headers\openvr_capi.h:674 */ - public static final int EVRScreenshotType_VRScreenshotType_Mono = 1; - /** native declaration : headers\openvr_capi.h:675 */ - public static final int EVRScreenshotType_VRScreenshotType_Stereo = 2; - /** native declaration : headers\openvr_capi.h:676 */ - public static final int EVRScreenshotType_VRScreenshotType_Cubemap = 3; - /** native declaration : headers\openvr_capi.h:677 */ - public static final int EVRScreenshotType_VRScreenshotType_MonoPanorama = 4; - /** native declaration : headers\openvr_capi.h:678 */ - public static final int EVRScreenshotType_VRScreenshotType_StereoPanorama = 5; - }; - /** - * native declaration : headers\openvr_capi.h:683
- * enum values - */ - public static interface EVRScreenshotPropertyFilenames { - /** native declaration : headers\openvr_capi.h:681 */ - public static final int EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_Preview = 0; - /** native declaration : headers\openvr_capi.h:682 */ - public static final int EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_VR = 1; - }; - /** - * native declaration : headers\openvr_capi.h:702
- * enum values - */ - public static interface EVRTrackedCameraError { - /** native declaration : headers\openvr_capi.h:685 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_None = 0; - /** native declaration : headers\openvr_capi.h:686 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_OperationFailed = 100; - /** native declaration : headers\openvr_capi.h:687 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidHandle = 101; - /** native declaration : headers\openvr_capi.h:688 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidFrameHeaderVersion = 102; - /** native declaration : headers\openvr_capi.h:689 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_OutOfHandles = 103; - /** native declaration : headers\openvr_capi.h:690 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_IPCFailure = 104; - /** native declaration : headers\openvr_capi.h:691 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_NotSupportedForThisDevice = 105; - /** native declaration : headers\openvr_capi.h:692 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_SharedMemoryFailure = 106; - /** native declaration : headers\openvr_capi.h:693 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_FrameBufferingFailure = 107; - /** native declaration : headers\openvr_capi.h:694 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_StreamSetupFailure = 108; - /** native declaration : headers\openvr_capi.h:695 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidGLTextureId = 109; - /** native declaration : headers\openvr_capi.h:696 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidSharedTextureHandle = 110; - /** native declaration : headers\openvr_capi.h:697 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_FailedToGetGLTextureId = 111; - /** native declaration : headers\openvr_capi.h:698 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_SharedTextureFailure = 112; - /** native declaration : headers\openvr_capi.h:699 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_NoFrameAvailable = 113; - /** native declaration : headers\openvr_capi.h:700 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidArgument = 114; - /** native declaration : headers\openvr_capi.h:701 */ - public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidFrameBufferSize = 115; - }; - /** - * native declaration : headers\openvr_capi.h:708
- * enum values - */ - public static interface EVRTrackedCameraFrameType { - /** native declaration : headers\openvr_capi.h:704 */ - public static final int EVRTrackedCameraFrameType_VRTrackedCameraFrameType_Distorted = 0; - /** native declaration : headers\openvr_capi.h:705 */ - public static final int EVRTrackedCameraFrameType_VRTrackedCameraFrameType_Undistorted = 1; - /** native declaration : headers\openvr_capi.h:706 */ - public static final int EVRTrackedCameraFrameType_VRTrackedCameraFrameType_MaximumUndistorted = 2; - /** native declaration : headers\openvr_capi.h:707 */ - public static final int EVRTrackedCameraFrameType_MAX_CAMERA_FRAME_TYPES = 3; - }; - /** - * native declaration : headers\openvr_capi.h:731
- * enum values - */ - public static interface EVRApplicationError { - /** native declaration : headers\openvr_capi.h:710 */ - public static final int EVRApplicationError_VRApplicationError_None = 0; - /** native declaration : headers\openvr_capi.h:711 */ - public static final int EVRApplicationError_VRApplicationError_AppKeyAlreadyExists = 100; - /** native declaration : headers\openvr_capi.h:712 */ - public static final int EVRApplicationError_VRApplicationError_NoManifest = 101; - /** native declaration : headers\openvr_capi.h:713 */ - public static final int EVRApplicationError_VRApplicationError_NoApplication = 102; - /** native declaration : headers\openvr_capi.h:714 */ - public static final int EVRApplicationError_VRApplicationError_InvalidIndex = 103; - /** native declaration : headers\openvr_capi.h:715 */ - public static final int EVRApplicationError_VRApplicationError_UnknownApplication = 104; - /** native declaration : headers\openvr_capi.h:716 */ - public static final int EVRApplicationError_VRApplicationError_IPCFailed = 105; - /** native declaration : headers\openvr_capi.h:717 */ - public static final int EVRApplicationError_VRApplicationError_ApplicationAlreadyRunning = 106; - /** native declaration : headers\openvr_capi.h:718 */ - public static final int EVRApplicationError_VRApplicationError_InvalidManifest = 107; - /** native declaration : headers\openvr_capi.h:719 */ - public static final int EVRApplicationError_VRApplicationError_InvalidApplication = 108; - /** native declaration : headers\openvr_capi.h:720 */ - public static final int EVRApplicationError_VRApplicationError_LaunchFailed = 109; - /** native declaration : headers\openvr_capi.h:721 */ - public static final int EVRApplicationError_VRApplicationError_ApplicationAlreadyStarting = 110; - /** native declaration : headers\openvr_capi.h:722 */ - public static final int EVRApplicationError_VRApplicationError_LaunchInProgress = 111; - /** native declaration : headers\openvr_capi.h:723 */ - public static final int EVRApplicationError_VRApplicationError_OldApplicationQuitting = 112; - /** native declaration : headers\openvr_capi.h:724 */ - public static final int EVRApplicationError_VRApplicationError_TransitionAborted = 113; - /** native declaration : headers\openvr_capi.h:725 */ - public static final int EVRApplicationError_VRApplicationError_IsTemplate = 114; - /** native declaration : headers\openvr_capi.h:726 */ - public static final int EVRApplicationError_VRApplicationError_SteamVRIsExiting = 115; - /** native declaration : headers\openvr_capi.h:727 */ - public static final int EVRApplicationError_VRApplicationError_BufferTooSmall = 200; - /** native declaration : headers\openvr_capi.h:728 */ - public static final int EVRApplicationError_VRApplicationError_PropertyNotSet = 201; - /** native declaration : headers\openvr_capi.h:729 */ - public static final int EVRApplicationError_VRApplicationError_UnknownProperty = 202; - /** native declaration : headers\openvr_capi.h:730 */ - public static final int EVRApplicationError_VRApplicationError_InvalidParameter = 203; - }; - /** - * native declaration : headers\openvr_capi.h:749
- * enum values - */ - public static interface EVRApplicationProperty { - /** native declaration : headers\openvr_capi.h:733 */ - public static final int EVRApplicationProperty_VRApplicationProperty_Name_String = 0; - /** native declaration : headers\openvr_capi.h:734 */ - public static final int EVRApplicationProperty_VRApplicationProperty_LaunchType_String = 11; - /** native declaration : headers\openvr_capi.h:735 */ - public static final int EVRApplicationProperty_VRApplicationProperty_WorkingDirectory_String = 12; - /** native declaration : headers\openvr_capi.h:736 */ - public static final int EVRApplicationProperty_VRApplicationProperty_BinaryPath_String = 13; - /** native declaration : headers\openvr_capi.h:737 */ - public static final int EVRApplicationProperty_VRApplicationProperty_Arguments_String = 14; - /** native declaration : headers\openvr_capi.h:738 */ - public static final int EVRApplicationProperty_VRApplicationProperty_URL_String = 15; - /** native declaration : headers\openvr_capi.h:739 */ - public static final int EVRApplicationProperty_VRApplicationProperty_Description_String = 50; - /** native declaration : headers\openvr_capi.h:740 */ - public static final int EVRApplicationProperty_VRApplicationProperty_NewsURL_String = 51; - /** native declaration : headers\openvr_capi.h:741 */ - public static final int EVRApplicationProperty_VRApplicationProperty_ImagePath_String = 52; - /** native declaration : headers\openvr_capi.h:742 */ - public static final int EVRApplicationProperty_VRApplicationProperty_Source_String = 53; - /** native declaration : headers\openvr_capi.h:743 */ - public static final int EVRApplicationProperty_VRApplicationProperty_IsDashboardOverlay_Bool = 60; - /** native declaration : headers\openvr_capi.h:744 */ - public static final int EVRApplicationProperty_VRApplicationProperty_IsTemplate_Bool = 61; - /** native declaration : headers\openvr_capi.h:745 */ - public static final int EVRApplicationProperty_VRApplicationProperty_IsInstanced_Bool = 62; - /** native declaration : headers\openvr_capi.h:746 */ - public static final int EVRApplicationProperty_VRApplicationProperty_IsInternal_Bool = 63; - /** native declaration : headers\openvr_capi.h:747 */ - public static final int EVRApplicationProperty_VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64; - /** native declaration : headers\openvr_capi.h:748 */ - public static final int EVRApplicationProperty_VRApplicationProperty_LastLaunchTime_Uint64 = 70; - }; - /** - * native declaration : headers\openvr_capi.h:755
- * enum values - */ - public static interface EVRApplicationTransitionState { - /** native declaration : headers\openvr_capi.h:751 */ - public static final int EVRApplicationTransitionState_VRApplicationTransition_None = 0; - /** native declaration : headers\openvr_capi.h:752 */ - public static final int EVRApplicationTransitionState_VRApplicationTransition_OldAppQuitSent = 10; - /** native declaration : headers\openvr_capi.h:753 */ - public static final int EVRApplicationTransitionState_VRApplicationTransition_WaitingForExternalLaunch = 11; - /** native declaration : headers\openvr_capi.h:754 */ - public static final int EVRApplicationTransitionState_VRApplicationTransition_NewAppLaunched = 20; - }; - /** - * native declaration : headers\openvr_capi.h:767
- * enum values - */ - public static interface ChaperoneCalibrationState { - /** native declaration : headers\openvr_capi.h:757 */ - public static final int ChaperoneCalibrationState_OK = 1; - /** native declaration : headers\openvr_capi.h:758 */ - public static final int ChaperoneCalibrationState_Warning = 100; - /** native declaration : headers\openvr_capi.h:759 */ - public static final int ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101; - /** native declaration : headers\openvr_capi.h:760 */ - public static final int ChaperoneCalibrationState_Warning_BaseStationRemoved = 102; - /** native declaration : headers\openvr_capi.h:761 */ - public static final int ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103; - /** native declaration : headers\openvr_capi.h:762 */ - public static final int ChaperoneCalibrationState_Error = 200; - /** native declaration : headers\openvr_capi.h:763 */ - public static final int ChaperoneCalibrationState_Error_BaseStationUninitialized = 201; - /** native declaration : headers\openvr_capi.h:764 */ - public static final int ChaperoneCalibrationState_Error_BaseStationConflict = 202; - /** native declaration : headers\openvr_capi.h:765 */ - public static final int ChaperoneCalibrationState_Error_PlayAreaInvalid = 203; - /** native declaration : headers\openvr_capi.h:766 */ - public static final int ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204; - }; - /** - * native declaration : headers\openvr_capi.h:771
- * enum values - */ - public static interface EChaperoneConfigFile { - /** native declaration : headers\openvr_capi.h:769 */ - public static final int EChaperoneConfigFile_Live = 1; - /** native declaration : headers\openvr_capi.h:770 */ - public static final int EChaperoneConfigFile_Temp = 2; - }; - /** - * native declaration : headers\openvr_capi.h:774
- * enum values - */ - public static interface EChaperoneImportFlags { - /** native declaration : headers\openvr_capi.h:773 */ - public static final int EChaperoneImportFlags_EChaperoneImport_BoundsOnly = 1; - }; + * native declaration : headers\openvr_capi.h:229
+ * enum values + */ + public static interface EVREye { + /** native declaration : headers\openvr_capi.h:227 */ + public static final int EVREye_Eye_Left = 0; + /** native declaration : headers\openvr_capi.h:228 */ + public static final int EVREye_Eye_Right = 1; + }; /** - * native declaration : headers\openvr_capi.h:788
- * enum values - */ - public static interface EVRCompositorError { - /** native declaration : headers\openvr_capi.h:776 */ - public static final int EVRCompositorError_VRCompositorError_None = 0; - /** native declaration : headers\openvr_capi.h:777 */ - public static final int EVRCompositorError_VRCompositorError_RequestFailed = 1; - /** native declaration : headers\openvr_capi.h:778 */ - public static final int EVRCompositorError_VRCompositorError_IncompatibleVersion = 100; - /** native declaration : headers\openvr_capi.h:779 */ - public static final int EVRCompositorError_VRCompositorError_DoNotHaveFocus = 101; - /** native declaration : headers\openvr_capi.h:780 */ - public static final int EVRCompositorError_VRCompositorError_InvalidTexture = 102; - /** native declaration : headers\openvr_capi.h:781 */ - public static final int EVRCompositorError_VRCompositorError_IsNotSceneApplication = 103; - /** native declaration : headers\openvr_capi.h:782 */ - public static final int EVRCompositorError_VRCompositorError_TextureIsOnWrongDevice = 104; - /** native declaration : headers\openvr_capi.h:783 */ - public static final int EVRCompositorError_VRCompositorError_TextureUsesUnsupportedFormat = 105; - /** native declaration : headers\openvr_capi.h:784 */ - public static final int EVRCompositorError_VRCompositorError_SharedTexturesNotSupported = 106; - /** native declaration : headers\openvr_capi.h:785 */ - public static final int EVRCompositorError_VRCompositorError_IndexOutOfRange = 107; - /** native declaration : headers\openvr_capi.h:786 */ - public static final int EVRCompositorError_VRCompositorError_AlreadySubmitted = 108; - /** native declaration : headers\openvr_capi.h:787 */ - public static final int EVRCompositorError_VRCompositorError_InvalidBounds = 109; - }; - /** - * native declaration : headers\openvr_capi.h:792
- * enum values - */ - public static interface VROverlayInputMethod { - /** native declaration : headers\openvr_capi.h:790 */ - public static final int VROverlayInputMethod_None = 0; - /** native declaration : headers\openvr_capi.h:791 */ - public static final int VROverlayInputMethod_Mouse = 1; - }; - /** - * native declaration : headers\openvr_capi.h:798
- * enum values - */ - public static interface VROverlayTransformType { - /** native declaration : headers\openvr_capi.h:794 */ - public static final int VROverlayTransformType_VROverlayTransform_Absolute = 0; - /** native declaration : headers\openvr_capi.h:795 */ - public static final int VROverlayTransformType_VROverlayTransform_TrackedDeviceRelative = 1; - /** native declaration : headers\openvr_capi.h:796 */ - public static final int VROverlayTransformType_VROverlayTransform_SystemOverlay = 2; - /** native declaration : headers\openvr_capi.h:797 */ - public static final int VROverlayTransformType_VROverlayTransform_TrackedComponent = 3; - }; - /** - * native declaration : headers\openvr_capi.h:816
- * enum values - */ - public static interface VROverlayFlags { - /** native declaration : headers\openvr_capi.h:800 */ - public static final int VROverlayFlags_None = 0; - /** native declaration : headers\openvr_capi.h:801 */ - public static final int VROverlayFlags_Curved = 1; - /** native declaration : headers\openvr_capi.h:802 */ - public static final int VROverlayFlags_RGSS4X = 2; - /** native declaration : headers\openvr_capi.h:803 */ - public static final int VROverlayFlags_NoDashboardTab = 3; - /** native declaration : headers\openvr_capi.h:804 */ - public static final int VROverlayFlags_AcceptsGamepadEvents = 4; - /** native declaration : headers\openvr_capi.h:805 */ - public static final int VROverlayFlags_ShowGamepadFocus = 5; - /** native declaration : headers\openvr_capi.h:806 */ - public static final int VROverlayFlags_SendVRScrollEvents = 6; - /** native declaration : headers\openvr_capi.h:807 */ - public static final int VROverlayFlags_SendVRTouchpadEvents = 7; - /** native declaration : headers\openvr_capi.h:808 */ - public static final int VROverlayFlags_ShowTouchPadScrollWheel = 8; - /** native declaration : headers\openvr_capi.h:809 */ - public static final int VROverlayFlags_TransferOwnershipToInternalProcess = 9; - /** native declaration : headers\openvr_capi.h:810 */ - public static final int VROverlayFlags_SideBySide_Parallel = 10; - /** native declaration : headers\openvr_capi.h:811 */ - public static final int VROverlayFlags_SideBySide_Crossed = 11; - /** native declaration : headers\openvr_capi.h:812 */ - public static final int VROverlayFlags_Panorama = 12; - /** native declaration : headers\openvr_capi.h:813 */ - public static final int VROverlayFlags_StereoPanorama = 13; - /** native declaration : headers\openvr_capi.h:814 */ - public static final int VROverlayFlags_SortWithNonSceneOverlays = 14; - /** native declaration : headers\openvr_capi.h:815 */ - public static final int VROverlayFlags_VisibleInDashboard = 15; - }; - /** - * native declaration : headers\openvr_capi.h:825
- * enum values - */ - public static interface VRMessageOverlayResponse { - /** native declaration : headers\openvr_capi.h:818 */ - public static final int VRMessageOverlayResponse_ButtonPress_0 = 0; - /** native declaration : headers\openvr_capi.h:819 */ - public static final int VRMessageOverlayResponse_ButtonPress_1 = 1; - /** native declaration : headers\openvr_capi.h:820 */ - public static final int VRMessageOverlayResponse_ButtonPress_2 = 2; - /** native declaration : headers\openvr_capi.h:821 */ - public static final int VRMessageOverlayResponse_ButtonPress_3 = 3; - /** native declaration : headers\openvr_capi.h:822 */ - public static final int VRMessageOverlayResponse_CouldntFindSystemOverlay = 4; - /** native declaration : headers\openvr_capi.h:823 */ - public static final int VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay = 5; - /** native declaration : headers\openvr_capi.h:824 */ - public static final int VRMessageOverlayResponse_ApplicationQuit = 6; - }; - /** - * native declaration : headers\openvr_capi.h:830
- * enum values - */ - public static interface EGamepadTextInputMode { - /** native declaration : headers\openvr_capi.h:827 */ - public static final int EGamepadTextInputMode_k_EGamepadTextInputModeNormal = 0; - /** native declaration : headers\openvr_capi.h:828 */ - public static final int EGamepadTextInputMode_k_EGamepadTextInputModePassword = 1; - /** native declaration : headers\openvr_capi.h:829 */ - public static final int EGamepadTextInputMode_k_EGamepadTextInputModeSubmit = 2; - }; - /** - * native declaration : headers\openvr_capi.h:834
- * enum values - */ - public static interface EGamepadTextInputLineMode { - /** native declaration : headers\openvr_capi.h:832 */ - public static final int EGamepadTextInputLineMode_k_EGamepadTextInputLineModeSingleLine = 0; - /** native declaration : headers\openvr_capi.h:833 */ - public static final int EGamepadTextInputLineMode_k_EGamepadTextInputLineModeMultipleLines = 1; - }; - /** - * native declaration : headers\openvr_capi.h:841
- * enum values - */ - public static interface EOverlayDirection { - /** native declaration : headers\openvr_capi.h:836 */ - public static final int EOverlayDirection_OverlayDirection_Up = 0; - /** native declaration : headers\openvr_capi.h:837 */ - public static final int EOverlayDirection_OverlayDirection_Down = 1; - /** native declaration : headers\openvr_capi.h:838 */ - public static final int EOverlayDirection_OverlayDirection_Left = 2; - /** native declaration : headers\openvr_capi.h:839 */ - public static final int EOverlayDirection_OverlayDirection_Right = 3; - /** native declaration : headers\openvr_capi.h:840 */ - public static final int EOverlayDirection_OverlayDirection_Count = 4; - }; - /** - * native declaration : headers\openvr_capi.h:845
- * enum values - */ - public static interface EVROverlayIntersectionMaskPrimitiveType { - /** native declaration : headers\openvr_capi.h:843 */ - public static final int EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Rectangle = 0; - /** native declaration : headers\openvr_capi.h:844 */ - public static final int EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Circle = 1; - }; - /** - * native declaration : headers\openvr_capi.h:860
- * enum values - */ - public static interface EVRRenderModelError { - /** native declaration : headers\openvr_capi.h:847 */ - public static final int EVRRenderModelError_VRRenderModelError_None = 0; - /** native declaration : headers\openvr_capi.h:848 */ - public static final int EVRRenderModelError_VRRenderModelError_Loading = 100; - /** native declaration : headers\openvr_capi.h:849 */ - public static final int EVRRenderModelError_VRRenderModelError_NotSupported = 200; - /** native declaration : headers\openvr_capi.h:850 */ - public static final int EVRRenderModelError_VRRenderModelError_InvalidArg = 300; - /** native declaration : headers\openvr_capi.h:851 */ - public static final int EVRRenderModelError_VRRenderModelError_InvalidModel = 301; - /** native declaration : headers\openvr_capi.h:852 */ - public static final int EVRRenderModelError_VRRenderModelError_NoShapes = 302; - /** native declaration : headers\openvr_capi.h:853 */ - public static final int EVRRenderModelError_VRRenderModelError_MultipleShapes = 303; - /** native declaration : headers\openvr_capi.h:854 */ - public static final int EVRRenderModelError_VRRenderModelError_TooManyVertices = 304; - /** native declaration : headers\openvr_capi.h:855 */ - public static final int EVRRenderModelError_VRRenderModelError_MultipleTextures = 305; - /** native declaration : headers\openvr_capi.h:856 */ - public static final int EVRRenderModelError_VRRenderModelError_BufferTooSmall = 306; - /** native declaration : headers\openvr_capi.h:857 */ - public static final int EVRRenderModelError_VRRenderModelError_NotEnoughNormals = 307; - /** native declaration : headers\openvr_capi.h:858 */ - public static final int EVRRenderModelError_VRRenderModelError_NotEnoughTexCoords = 308; - /** native declaration : headers\openvr_capi.h:859 */ - public static final int EVRRenderModelError_VRRenderModelError_InvalidTexture = 400; - }; - /** - * native declaration : headers\openvr_capi.h:867
- * enum values - */ - public static interface EVRComponentProperty { - /** native declaration : headers\openvr_capi.h:862 */ - public static final int EVRComponentProperty_VRComponentProperty_IsStatic = 1; - /** native declaration : headers\openvr_capi.h:863 */ - public static final int EVRComponentProperty_VRComponentProperty_IsVisible = 2; - /** native declaration : headers\openvr_capi.h:864 */ - public static final int EVRComponentProperty_VRComponentProperty_IsTouched = 4; - /** native declaration : headers\openvr_capi.h:865 */ - public static final int EVRComponentProperty_VRComponentProperty_IsPressed = 8; - /** native declaration : headers\openvr_capi.h:866 */ - public static final int EVRComponentProperty_VRComponentProperty_IsScrolled = 16; - }; - /** - * native declaration : headers\openvr_capi.h:872
- * enum values - */ - public static interface EVRNotificationType { - /** native declaration : headers\openvr_capi.h:869 */ - public static final int EVRNotificationType_Transient = 0; - /** native declaration : headers\openvr_capi.h:870 */ - public static final int EVRNotificationType_Persistent = 1; - /** native declaration : headers\openvr_capi.h:871 */ - public static final int EVRNotificationType_Transient_SystemWithUserValue = 2; - }; - /** - * native declaration : headers\openvr_capi.h:879
- * enum values - */ - public static interface EVRNotificationStyle { - /** native declaration : headers\openvr_capi.h:874 */ - public static final int EVRNotificationStyle_None = 0; - /** native declaration : headers\openvr_capi.h:875 */ - public static final int EVRNotificationStyle_Application = 100; - /** native declaration : headers\openvr_capi.h:876 */ - public static final int EVRNotificationStyle_Contact_Disabled = 200; - /** native declaration : headers\openvr_capi.h:877 */ - public static final int EVRNotificationStyle_Contact_Enabled = 201; - /** native declaration : headers\openvr_capi.h:878 */ - public static final int EVRNotificationStyle_Contact_Active = 202; - }; - /** - * native declaration : headers\openvr_capi.h:887
- * enum values - */ - public static interface EVRSettingsError { - /** native declaration : headers\openvr_capi.h:881 */ - public static final int EVRSettingsError_VRSettingsError_None = 0; - /** native declaration : headers\openvr_capi.h:882 */ - public static final int EVRSettingsError_VRSettingsError_IPCFailed = 1; - /** native declaration : headers\openvr_capi.h:883 */ - public static final int EVRSettingsError_VRSettingsError_WriteFailed = 2; - /** native declaration : headers\openvr_capi.h:884 */ - public static final int EVRSettingsError_VRSettingsError_ReadFailed = 3; - /** native declaration : headers\openvr_capi.h:885 */ - public static final int EVRSettingsError_VRSettingsError_JsonParseFailed = 4; - /** native declaration : headers\openvr_capi.h:886 */ - public static final int EVRSettingsError_VRSettingsError_UnsetSettingHasNoDefault = 5; - }; - /** - * native declaration : headers\openvr_capi.h:895
- * enum values - */ - public static interface EVRScreenshotError { - /** native declaration : headers\openvr_capi.h:889 */ - public static final int EVRScreenshotError_VRScreenshotError_None = 0; - /** native declaration : headers\openvr_capi.h:890 */ - public static final int EVRScreenshotError_VRScreenshotError_RequestFailed = 1; - /** native declaration : headers\openvr_capi.h:891 */ - public static final int EVRScreenshotError_VRScreenshotError_IncompatibleVersion = 100; - /** native declaration : headers\openvr_capi.h:892 */ - public static final int EVRScreenshotError_VRScreenshotError_NotFound = 101; - /** native declaration : headers\openvr_capi.h:893 */ - public static final int EVRScreenshotError_VRScreenshotError_BufferTooSmall = 102; - /** native declaration : headers\openvr_capi.h:894 */ - public static final int EVRScreenshotError_VRScreenshotError_ScreenshotAlreadyInProgress = 108; - }; - - /** OpenVR Constants */ - public static final long k_nDriverNone = 4294967295L; - public static final int k_unMaxDriverDebugResponseSize = 32768; - public static final int k_unTrackedDeviceIndex_Hmd = 0; - public static final int k_unMaxTrackedDeviceCount = 16; - public static final int k_unTrackedDeviceIndexOther = -2; - public static final long k_unTrackedDeviceIndexInvalid = 4294967295L; - public static final long k_ulInvalidPropertyContainer = 0; - public static final int k_unInvalidPropertyTag = 0; - public static final int k_unFloatPropertyTag = 1; - public static final int k_unInt32PropertyTag = 2; - public static final int k_unUint64PropertyTag = 3; - public static final int k_unBoolPropertyTag = 4; - public static final int k_unStringPropertyTag = 5; - public static final int k_unHmdMatrix34PropertyTag = 20; - public static final int k_unHmdMatrix44PropertyTag = 21; - public static final int k_unHmdVector3PropertyTag = 22; - public static final int k_unHmdVector4PropertyTag = 23; - public static final int k_unHiddenAreaPropertyTag = 30; - public static final int k_unOpenVRInternalReserved_Start = 1000; - public static final int k_unOpenVRInternalReserved_End = 10000; - public static final int k_unMaxPropertyStringSize = 32768; - public static final int k_unControllerStateAxisCount = 5; - public static final long k_ulOverlayHandleInvalid = 0; - public static final int k_unScreenshotHandleInvalid = 0; - - - public static final int k_unMaxApplicationKeyLength = 128; - - public static final String k_pch_MimeType_HomeApp = "vr/home"; - public static final String k_pch_MimeType_GameTheater = "vr/game_theater"; - - - public static final int k_unVROverlayMaxKeyLength = 128; - public static final int k_unVROverlayMaxNameLength = 128; - public static final int k_unMaxOverlayCount = 64; - public static final int k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; - - - public static final String k_pch_Controller_Component_GDC2015 = "gdc2015"; - public static final String k_pch_Controller_Component_Base = "base"; - public static final String k_pch_Controller_Component_Tip = "tip"; - public static final String k_pch_Controller_Component_HandGrip = "handgrip"; - public static final String k_pch_Controller_Component_Status = "status"; - - - public static final int k_unNotificationTextMaxSize = 256; - - public static final int k_unMaxSettingsKeyLength = 128; - - public static final String k_pch_SteamVR_Section = "steamvr"; - public static final String k_pch_SteamVR_RequireHmd_String = "requireHmd"; - public static final String k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; - public static final String k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; - public static final String k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; - public static final String k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; - public static final String k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; - public static final String k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; - public static final String k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps"; - public static final String k_pch_SteamVR_LogLevel_Int32 = "loglevel"; - public static final String k_pch_SteamVR_IPD_Float = "ipd"; - public static final String k_pch_SteamVR_Background_String = "background"; - public static final String k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; - public static final String k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; - public static final String k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; - public static final String k_pch_SteamVR_GridColor_String = "gridColor"; - public static final String k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; - public static final String k_pch_SteamVR_ShowStage_Bool = "showStage"; - public static final String k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; - public static final String k_pch_SteamVR_DirectMode_Bool = "directMode"; - public static final String k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; - public static final String k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; - public static final String k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; - public static final String k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; - public static final String k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; - public static final String k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; - public static final String k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; - public static final String k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection"; - public static final String k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection"; - public static final String k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; - public static final String k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; - public static final String k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; - public static final String k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; - public static final String k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; - public static final String k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; - public static final String k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; - public static final String k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; - public static final String k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard"; - public static final String k_pch_SteamVR_EnableHomeApp = "enableHomeApp"; - public static final String k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec"; - public static final String k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; - public static final String k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; - public static final String k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; - public static final String k_pch_Lighthouse_Section = "driver_lighthouse"; - public static final String k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; - public static final String k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; - public static final String k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; - public static final String k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; - public static final String k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; - public static final String k_pch_Null_Section = "driver_null"; - public static final String k_pch_Null_SerialNumber_String = "serialNumber"; - public static final String k_pch_Null_ModelNumber_String = "modelNumber"; - public static final String k_pch_Null_WindowX_Int32 = "windowX"; - public static final String k_pch_Null_WindowY_Int32 = "windowY"; - public static final String k_pch_Null_WindowWidth_Int32 = "windowWidth"; - public static final String k_pch_Null_WindowHeight_Int32 = "windowHeight"; - public static final String k_pch_Null_RenderWidth_Int32 = "renderWidth"; - public static final String k_pch_Null_RenderHeight_Int32 = "renderHeight"; - public static final String k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; - public static final String k_pch_Null_DisplayFrequency_Float = "displayFrequency"; - public static final String k_pch_UserInterface_Section = "userinterface"; - public static final String k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; - public static final String k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; - public static final String k_pch_UserInterface_Screenshots_Bool = "screenshots"; - public static final String k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; - public static final String k_pch_Notifications_Section = "notifications"; - public static final String k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; - public static final String k_pch_Keyboard_Section = "keyboard"; - public static final String k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; - public static final String k_pch_Keyboard_ScaleX = "ScaleX"; - public static final String k_pch_Keyboard_ScaleY = "ScaleY"; - public static final String k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; - public static final String k_pch_Keyboard_OffsetRightX = "OffsetRightX"; - public static final String k_pch_Keyboard_OffsetY = "OffsetY"; - public static final String k_pch_Keyboard_Smoothing = "Smoothing"; - public static final String k_pch_Perf_Section = "perfcheck"; - public static final String k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; - public static final String k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; - public static final String k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; - public static final String k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; - public static final String k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; - public static final String k_pch_Perf_TestData_Float = "perfTestData"; - public static final String k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling"; - public static final String k_pch_CollisionBounds_Section = "collisionBounds"; - public static final String k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; - public static final String k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; - public static final String k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; - public static final String k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; - public static final String k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; - public static final String k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; - public static final String k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; - public static final String k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; - public static final String k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; - public static final String k_pch_Camera_Section = "camera"; - public static final String k_pch_Camera_EnableCamera_Bool = "enableCamera"; - public static final String k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; - public static final String k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; - public static final String k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; - public static final String k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; - public static final String k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; - public static final String k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; - public static final String k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; - public static final String k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; - public static final String k_pch_audio_Section = "audio"; - public static final String k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; - public static final String k_pch_audio_OnRecordDevice_String = "onRecordDevice"; - public static final String k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; - public static final String k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; - public static final String k_pch_audio_OffRecordDevice_String = "offRecordDevice"; - public static final String k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; - public static final String k_pch_Power_Section = "power"; - public static final String k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; - public static final String k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; - public static final String k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout"; - public static final String k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout"; - public static final String k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; - public static final String k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby"; - public static final String k_pch_Dashboard_Section = "dashboard"; - public static final String k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; - public static final String k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; - public static final String k_pch_modelskin_Section = "modelskins"; - public static final String k_pch_Driver_Enable_Bool = "enable"; - - - public static final String IVRApplications_Version = "FnTable:IVRApplications_006"; - public static final String IVRChaperone_Version = "FnTable:IVRChaperone_003"; - public static final String IVRChaperoneSetup_Version = "FnTable:IVRChaperoneSetup_005"; - public static final String IVRCompositor_Version = "FnTable:IVRCompositor_020"; - public static final String IVRSystem_Version = "FnTable:IVRSystem_016"; - public static final String IVRExtendedDisplay_Version = "FnTable:IVRExtendedDisplay_001"; - public static final String IVRTrackedCamera_Version = "FnTable:IVRTrackedCamera_003"; - public static final String IVROverlay_Version = "FnTable:IVROverlay_016"; - public static final String IVRRenderModels_Version = "FnTable:IVRRenderModels_005"; - public static final String IVRNotifications_Version = "FnTable:IVRNotifications_002"; - public static final String IVRSettings_Version = "FnTable:IVRSettings_002"; - public static final String IVRScreenshots_Version = "FnTable:IVRScreenshots_001"; - public static final String IVRResources_Version = "FnTable:IVRResources_001"; - public static final String IVRDriverManager_Version = "FnTable:IVRDriverManager_001"; - + * native declaration : headers\openvr_capi.h:239
+ * enum values + */ + public static interface ETextureType { + /** native declaration : headers\openvr_capi.h:231 */ + public static final int ETextureType_TextureType_Invalid = -1; + /** native declaration : headers\openvr_capi.h:232 */ + public static final int ETextureType_TextureType_DirectX = 0; + /** native declaration : headers\openvr_capi.h:233 */ + public static final int ETextureType_TextureType_OpenGL = 1; + /** native declaration : headers\openvr_capi.h:234 */ + public static final int ETextureType_TextureType_Vulkan = 2; + /** native declaration : headers\openvr_capi.h:235 */ + public static final int ETextureType_TextureType_IOSurface = 3; + /** native declaration : headers\openvr_capi.h:236 */ + public static final int ETextureType_TextureType_DirectX12 = 4; + /** native declaration : headers\openvr_capi.h:237 */ + public static final int ETextureType_TextureType_DXGISharedHandle = 5; + /** native declaration : headers\openvr_capi.h:238 */ + public static final int ETextureType_TextureType_Metal = 6; + }; /** - * Global entry points
- * Original signature : intptr_t VR_InitInternal(EVRInitError*, EVRApplicationType)
- * native declaration : headers\openvr_capi.h:1923
- * @deprecated use the safer methods {@link #VR_InitInternal(java.nio.IntBuffer, int)} and {@link #VR_InitInternal(com.sun.jna.ptr.IntByReference, int)} instead - */ - @Deprecated - public static native IntByReference VR_InitInternal(IntByReference peError, int eType); + * native declaration : headers\openvr_capi.h:244
+ * enum values + */ + public static interface EColorSpace { + /** native declaration : headers\openvr_capi.h:241 */ + public static final int EColorSpace_ColorSpace_Auto = 0; + /** native declaration : headers\openvr_capi.h:242 */ + public static final int EColorSpace_ColorSpace_Gamma = 1; + /** native declaration : headers\openvr_capi.h:243 */ + public static final int EColorSpace_ColorSpace_Linear = 2; + }; /** - * Global entry points
- * Original signature : intptr_t VR_InitInternal(EVRInitError*, EVRApplicationType)
- * native declaration : headers\openvr_capi.h:1923 - */ - public static native IntByReference VR_InitInternal(IntBuffer peError, int eType); + * native declaration : headers\openvr_capi.h:251
+ * enum values + */ + public static interface ETrackingResult { + /** native declaration : headers\openvr_capi.h:246 */ + public static final int ETrackingResult_TrackingResult_Uninitialized = 1; + /** native declaration : headers\openvr_capi.h:247 */ + public static final int ETrackingResult_TrackingResult_Calibrating_InProgress = 100; + /** native declaration : headers\openvr_capi.h:248 */ + public static final int ETrackingResult_TrackingResult_Calibrating_OutOfRange = 101; + /** native declaration : headers\openvr_capi.h:249 */ + public static final int ETrackingResult_TrackingResult_Running_OK = 200; + /** native declaration : headers\openvr_capi.h:250 */ + public static final int ETrackingResult_TrackingResult_Running_OutOfRange = 201; + }; /** - * Original signature : void VR_ShutdownInternal()
- * native declaration : headers\openvr_capi.h:1925 - */ - public static native void VR_ShutdownInternal(); + * native declaration : headers\openvr_capi.h:260
+ * enum values + */ + public static interface ETrackedDeviceClass { + /** native declaration : headers\openvr_capi.h:253 */ + public static final int ETrackedDeviceClass_TrackedDeviceClass_Invalid = 0; + /** native declaration : headers\openvr_capi.h:254 */ + public static final int ETrackedDeviceClass_TrackedDeviceClass_HMD = 1; + /** native declaration : headers\openvr_capi.h:255 */ + public static final int ETrackedDeviceClass_TrackedDeviceClass_Controller = 2; + /** native declaration : headers\openvr_capi.h:256 */ + public static final int ETrackedDeviceClass_TrackedDeviceClass_GenericTracker = 3; + /** native declaration : headers\openvr_capi.h:257 */ + public static final int ETrackedDeviceClass_TrackedDeviceClass_TrackingReference = 4; + /** native declaration : headers\openvr_capi.h:258 */ + public static final int ETrackedDeviceClass_TrackedDeviceClass_DisplayRedirect = 5; + /** native declaration : headers\openvr_capi.h:259 */ + public static final int ETrackedDeviceClass_TrackedDeviceClass_Max = 6; + }; /** - * Original signature : bool VR_IsHmdPresent()
- * native declaration : headers\openvr_capi.h:1927 - */ - public static native byte VR_IsHmdPresent(); + * native declaration : headers\openvr_capi.h:267
+ * enum values + */ + public static interface ETrackedControllerRole { + /** native declaration : headers\openvr_capi.h:262 */ + public static final int ETrackedControllerRole_TrackedControllerRole_Invalid = 0; + /** native declaration : headers\openvr_capi.h:263 */ + public static final int ETrackedControllerRole_TrackedControllerRole_LeftHand = 1; + /** native declaration : headers\openvr_capi.h:264 */ + public static final int ETrackedControllerRole_TrackedControllerRole_RightHand = 2; + /** native declaration : headers\openvr_capi.h:265 */ + public static final int ETrackedControllerRole_TrackedControllerRole_OptOut = 3; + /** native declaration : headers\openvr_capi.h:266 */ + public static final int ETrackedControllerRole_TrackedControllerRole_Max = 4; + }; /** - * Original signature : intptr_t VR_GetGenericInterface(const char*, EVRInitError*)
- * native declaration : headers\openvr_capi.h:1929
- * @deprecated use the safer methods {@link #VR_GetGenericInterface(java.lang.String, java.nio.IntBuffer)} and {@link #VR_GetGenericInterface(com.sun.jna.Pointer, com.sun.jna.ptr.IntByReference)} instead - */ - @Deprecated - public static native IntByReference VR_GetGenericInterface(Pointer pchInterfaceVersion, IntByReference peError); + * native declaration : headers\openvr_capi.h:272
+ * enum values + */ + public static interface ETrackingUniverseOrigin { + /** native declaration : headers\openvr_capi.h:269 */ + public static final int ETrackingUniverseOrigin_TrackingUniverseSeated = 0; + /** native declaration : headers\openvr_capi.h:270 */ + public static final int ETrackingUniverseOrigin_TrackingUniverseStanding = 1; + /** native declaration : headers\openvr_capi.h:271 */ + public static final int ETrackingUniverseOrigin_TrackingUniverseRawAndUncalibrated = 2; + }; /** - * Original signature : intptr_t VR_GetGenericInterface(const char*, EVRInitError*)
- * native declaration : headers\openvr_capi.h:1929 - */ - public static native IntByReference VR_GetGenericInterface(String pchInterfaceVersion, IntByReference peError); + * native declaration : headers\openvr_capi.h:432
+ * enum values + */ + public static interface ETrackedDeviceProperty { + /** native declaration : headers\openvr_capi.h:274 */ + public static final int ETrackedDeviceProperty_Prop_Invalid = 0; + /** native declaration : headers\openvr_capi.h:275 */ + public static final int ETrackedDeviceProperty_Prop_TrackingSystemName_String = 1000; + /** native declaration : headers\openvr_capi.h:276 */ + public static final int ETrackedDeviceProperty_Prop_ModelNumber_String = 1001; + /** native declaration : headers\openvr_capi.h:277 */ + public static final int ETrackedDeviceProperty_Prop_SerialNumber_String = 1002; + /** native declaration : headers\openvr_capi.h:278 */ + public static final int ETrackedDeviceProperty_Prop_RenderModelName_String = 1003; + /** native declaration : headers\openvr_capi.h:279 */ + public static final int ETrackedDeviceProperty_Prop_WillDriftInYaw_Bool = 1004; + /** native declaration : headers\openvr_capi.h:280 */ + public static final int ETrackedDeviceProperty_Prop_ManufacturerName_String = 1005; + /** native declaration : headers\openvr_capi.h:281 */ + public static final int ETrackedDeviceProperty_Prop_TrackingFirmwareVersion_String = 1006; + /** native declaration : headers\openvr_capi.h:282 */ + public static final int ETrackedDeviceProperty_Prop_HardwareRevision_String = 1007; + /** native declaration : headers\openvr_capi.h:283 */ + public static final int ETrackedDeviceProperty_Prop_AllWirelessDongleDescriptions_String = 1008; + /** native declaration : headers\openvr_capi.h:284 */ + public static final int ETrackedDeviceProperty_Prop_ConnectedWirelessDongle_String = 1009; + /** native declaration : headers\openvr_capi.h:285 */ + public static final int ETrackedDeviceProperty_Prop_DeviceIsWireless_Bool = 1010; + /** native declaration : headers\openvr_capi.h:286 */ + public static final int ETrackedDeviceProperty_Prop_DeviceIsCharging_Bool = 1011; + /** native declaration : headers\openvr_capi.h:287 */ + public static final int ETrackedDeviceProperty_Prop_DeviceBatteryPercentage_Float = 1012; + /** native declaration : headers\openvr_capi.h:288 */ + public static final int ETrackedDeviceProperty_Prop_StatusDisplayTransform_Matrix34 = 1013; + /** native declaration : headers\openvr_capi.h:289 */ + public static final int ETrackedDeviceProperty_Prop_Firmware_UpdateAvailable_Bool = 1014; + /** native declaration : headers\openvr_capi.h:290 */ + public static final int ETrackedDeviceProperty_Prop_Firmware_ManualUpdate_Bool = 1015; + /** native declaration : headers\openvr_capi.h:291 */ + public static final int ETrackedDeviceProperty_Prop_Firmware_ManualUpdateURL_String = 1016; + /** native declaration : headers\openvr_capi.h:292 */ + public static final int ETrackedDeviceProperty_Prop_HardwareRevision_Uint64 = 1017; + /** native declaration : headers\openvr_capi.h:293 */ + public static final int ETrackedDeviceProperty_Prop_FirmwareVersion_Uint64 = 1018; + /** native declaration : headers\openvr_capi.h:294 */ + public static final int ETrackedDeviceProperty_Prop_FPGAVersion_Uint64 = 1019; + /** native declaration : headers\openvr_capi.h:295 */ + public static final int ETrackedDeviceProperty_Prop_VRCVersion_Uint64 = 1020; + /** native declaration : headers\openvr_capi.h:296 */ + public static final int ETrackedDeviceProperty_Prop_RadioVersion_Uint64 = 1021; + /** native declaration : headers\openvr_capi.h:297 */ + public static final int ETrackedDeviceProperty_Prop_DongleVersion_Uint64 = 1022; + /** native declaration : headers\openvr_capi.h:298 */ + public static final int ETrackedDeviceProperty_Prop_BlockServerShutdown_Bool = 1023; + /** native declaration : headers\openvr_capi.h:299 */ + public static final int ETrackedDeviceProperty_Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024; + /** native declaration : headers\openvr_capi.h:300 */ + public static final int ETrackedDeviceProperty_Prop_ContainsProximitySensor_Bool = 1025; + /** native declaration : headers\openvr_capi.h:301 */ + public static final int ETrackedDeviceProperty_Prop_DeviceProvidesBatteryStatus_Bool = 1026; + /** native declaration : headers\openvr_capi.h:302 */ + public static final int ETrackedDeviceProperty_Prop_DeviceCanPowerOff_Bool = 1027; + /** native declaration : headers\openvr_capi.h:303 */ + public static final int ETrackedDeviceProperty_Prop_Firmware_ProgrammingTarget_String = 1028; + /** native declaration : headers\openvr_capi.h:304 */ + public static final int ETrackedDeviceProperty_Prop_DeviceClass_Int32 = 1029; + /** native declaration : headers\openvr_capi.h:305 */ + public static final int ETrackedDeviceProperty_Prop_HasCamera_Bool = 1030; + /** native declaration : headers\openvr_capi.h:306 */ + public static final int ETrackedDeviceProperty_Prop_DriverVersion_String = 1031; + /** native declaration : headers\openvr_capi.h:307 */ + public static final int ETrackedDeviceProperty_Prop_Firmware_ForceUpdateRequired_Bool = 1032; + /** native declaration : headers\openvr_capi.h:308 */ + public static final int ETrackedDeviceProperty_Prop_ViveSystemButtonFixRequired_Bool = 1033; + /** native declaration : headers\openvr_capi.h:309 */ + public static final int ETrackedDeviceProperty_Prop_ParentDriver_Uint64 = 1034; + /** native declaration : headers\openvr_capi.h:310 */ + public static final int ETrackedDeviceProperty_Prop_ResourceRoot_String = 1035; + /** native declaration : headers\openvr_capi.h:311 */ + public static final int ETrackedDeviceProperty_Prop_RegisteredDeviceType_String = 1036; + /** native declaration : headers\openvr_capi.h:312 */ + public static final int ETrackedDeviceProperty_Prop_InputProfilePath_String = 1037; + /** native declaration : headers\openvr_capi.h:313 */ + public static final int ETrackedDeviceProperty_Prop_NeverTracked_Bool = 1038; + /** native declaration : headers\openvr_capi.h:314 */ + public static final int ETrackedDeviceProperty_Prop_NumCameras_Int32 = 1039; + /** native declaration : headers\openvr_capi.h:315 */ + public static final int ETrackedDeviceProperty_Prop_CameraFrameLayout_Int32 = 1040; + /** native declaration : headers\openvr_capi.h:316 */ + public static final int ETrackedDeviceProperty_Prop_ReportsTimeSinceVSync_Bool = 2000; + /** native declaration : headers\openvr_capi.h:317 */ + public static final int ETrackedDeviceProperty_Prop_SecondsFromVsyncToPhotons_Float = 2001; + /** native declaration : headers\openvr_capi.h:318 */ + public static final int ETrackedDeviceProperty_Prop_DisplayFrequency_Float = 2002; + /** native declaration : headers\openvr_capi.h:319 */ + public static final int ETrackedDeviceProperty_Prop_UserIpdMeters_Float = 2003; + /** native declaration : headers\openvr_capi.h:320 */ + public static final int ETrackedDeviceProperty_Prop_CurrentUniverseId_Uint64 = 2004; + /** native declaration : headers\openvr_capi.h:321 */ + public static final int ETrackedDeviceProperty_Prop_PreviousUniverseId_Uint64 = 2005; + /** native declaration : headers\openvr_capi.h:322 */ + public static final int ETrackedDeviceProperty_Prop_DisplayFirmwareVersion_Uint64 = 2006; + /** native declaration : headers\openvr_capi.h:323 */ + public static final int ETrackedDeviceProperty_Prop_IsOnDesktop_Bool = 2007; + /** native declaration : headers\openvr_capi.h:324 */ + public static final int ETrackedDeviceProperty_Prop_DisplayMCType_Int32 = 2008; + /** native declaration : headers\openvr_capi.h:325 */ + public static final int ETrackedDeviceProperty_Prop_DisplayMCOffset_Float = 2009; + /** native declaration : headers\openvr_capi.h:326 */ + public static final int ETrackedDeviceProperty_Prop_DisplayMCScale_Float = 2010; + /** native declaration : headers\openvr_capi.h:327 */ + public static final int ETrackedDeviceProperty_Prop_EdidVendorID_Int32 = 2011; + /** native declaration : headers\openvr_capi.h:328 */ + public static final int ETrackedDeviceProperty_Prop_DisplayMCImageLeft_String = 2012; + /** native declaration : headers\openvr_capi.h:329 */ + public static final int ETrackedDeviceProperty_Prop_DisplayMCImageRight_String = 2013; + /** native declaration : headers\openvr_capi.h:330 */ + public static final int ETrackedDeviceProperty_Prop_DisplayGCBlackClamp_Float = 2014; + /** native declaration : headers\openvr_capi.h:331 */ + public static final int ETrackedDeviceProperty_Prop_EdidProductID_Int32 = 2015; + /** native declaration : headers\openvr_capi.h:332 */ + public static final int ETrackedDeviceProperty_Prop_CameraToHeadTransform_Matrix34 = 2016; + /** native declaration : headers\openvr_capi.h:333 */ + public static final int ETrackedDeviceProperty_Prop_DisplayGCType_Int32 = 2017; + /** native declaration : headers\openvr_capi.h:334 */ + public static final int ETrackedDeviceProperty_Prop_DisplayGCOffset_Float = 2018; + /** native declaration : headers\openvr_capi.h:335 */ + public static final int ETrackedDeviceProperty_Prop_DisplayGCScale_Float = 2019; + /** native declaration : headers\openvr_capi.h:336 */ + public static final int ETrackedDeviceProperty_Prop_DisplayGCPrescale_Float = 2020; + /** native declaration : headers\openvr_capi.h:337 */ + public static final int ETrackedDeviceProperty_Prop_DisplayGCImage_String = 2021; + /** native declaration : headers\openvr_capi.h:338 */ + public static final int ETrackedDeviceProperty_Prop_LensCenterLeftU_Float = 2022; + /** native declaration : headers\openvr_capi.h:339 */ + public static final int ETrackedDeviceProperty_Prop_LensCenterLeftV_Float = 2023; + /** native declaration : headers\openvr_capi.h:340 */ + public static final int ETrackedDeviceProperty_Prop_LensCenterRightU_Float = 2024; + /** native declaration : headers\openvr_capi.h:341 */ + public static final int ETrackedDeviceProperty_Prop_LensCenterRightV_Float = 2025; + /** native declaration : headers\openvr_capi.h:342 */ + public static final int ETrackedDeviceProperty_Prop_UserHeadToEyeDepthMeters_Float = 2026; + /** native declaration : headers\openvr_capi.h:343 */ + public static final int ETrackedDeviceProperty_Prop_CameraFirmwareVersion_Uint64 = 2027; + /** native declaration : headers\openvr_capi.h:344 */ + public static final int ETrackedDeviceProperty_Prop_CameraFirmwareDescription_String = 2028; + /** native declaration : headers\openvr_capi.h:345 */ + public static final int ETrackedDeviceProperty_Prop_DisplayFPGAVersion_Uint64 = 2029; + /** native declaration : headers\openvr_capi.h:346 */ + public static final int ETrackedDeviceProperty_Prop_DisplayBootloaderVersion_Uint64 = 2030; + /** native declaration : headers\openvr_capi.h:347 */ + public static final int ETrackedDeviceProperty_Prop_DisplayHardwareVersion_Uint64 = 2031; + /** native declaration : headers\openvr_capi.h:348 */ + public static final int ETrackedDeviceProperty_Prop_AudioFirmwareVersion_Uint64 = 2032; + /** native declaration : headers\openvr_capi.h:349 */ + public static final int ETrackedDeviceProperty_Prop_CameraCompatibilityMode_Int32 = 2033; + /** native declaration : headers\openvr_capi.h:350 */ + public static final int ETrackedDeviceProperty_Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034; + /** native declaration : headers\openvr_capi.h:351 */ + public static final int ETrackedDeviceProperty_Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035; + /** native declaration : headers\openvr_capi.h:352 */ + public static final int ETrackedDeviceProperty_Prop_DisplaySuppressed_Bool = 2036; + /** native declaration : headers\openvr_capi.h:353 */ + public static final int ETrackedDeviceProperty_Prop_DisplayAllowNightMode_Bool = 2037; + /** native declaration : headers\openvr_capi.h:354 */ + public static final int ETrackedDeviceProperty_Prop_DisplayMCImageWidth_Int32 = 2038; + /** native declaration : headers\openvr_capi.h:355 */ + public static final int ETrackedDeviceProperty_Prop_DisplayMCImageHeight_Int32 = 2039; + /** native declaration : headers\openvr_capi.h:356 */ + public static final int ETrackedDeviceProperty_Prop_DisplayMCImageNumChannels_Int32 = 2040; + /** native declaration : headers\openvr_capi.h:357 */ + public static final int ETrackedDeviceProperty_Prop_DisplayMCImageData_Binary = 2041; + /** native declaration : headers\openvr_capi.h:358 */ + public static final int ETrackedDeviceProperty_Prop_SecondsFromPhotonsToVblank_Float = 2042; + /** native declaration : headers\openvr_capi.h:359 */ + public static final int ETrackedDeviceProperty_Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043; + /** native declaration : headers\openvr_capi.h:360 */ + public static final int ETrackedDeviceProperty_Prop_DisplayDebugMode_Bool = 2044; + /** native declaration : headers\openvr_capi.h:361 */ + public static final int ETrackedDeviceProperty_Prop_GraphicsAdapterLuid_Uint64 = 2045; + /** native declaration : headers\openvr_capi.h:362 */ + public static final int ETrackedDeviceProperty_Prop_DriverProvidedChaperonePath_String = 2048; + /** native declaration : headers\openvr_capi.h:363 */ + public static final int ETrackedDeviceProperty_Prop_ExpectedTrackingReferenceCount_Int32 = 2049; + /** native declaration : headers\openvr_capi.h:364 */ + public static final int ETrackedDeviceProperty_Prop_ExpectedControllerCount_Int32 = 2050; + /** native declaration : headers\openvr_capi.h:365 */ + public static final int ETrackedDeviceProperty_Prop_NamedIconPathControllerLeftDeviceOff_String = 2051; + /** native declaration : headers\openvr_capi.h:366 */ + public static final int ETrackedDeviceProperty_Prop_NamedIconPathControllerRightDeviceOff_String = 2052; + /** native declaration : headers\openvr_capi.h:367 */ + public static final int ETrackedDeviceProperty_Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053; + /** native declaration : headers\openvr_capi.h:368 */ + public static final int ETrackedDeviceProperty_Prop_DoNotApplyPrediction_Bool = 2054; + /** native declaration : headers\openvr_capi.h:369 */ + public static final int ETrackedDeviceProperty_Prop_CameraToHeadTransforms_Matrix34_Array = 2055; + /** native declaration : headers\openvr_capi.h:370 */ + public static final int ETrackedDeviceProperty_Prop_DistortionMeshResolution_Int32 = 2056; + /** native declaration : headers\openvr_capi.h:371 */ + public static final int ETrackedDeviceProperty_Prop_DriverIsDrawingControllers_Bool = 2057; + /** native declaration : headers\openvr_capi.h:372 */ + public static final int ETrackedDeviceProperty_Prop_DriverRequestsApplicationPause_Bool = 2058; + /** native declaration : headers\openvr_capi.h:373 */ + public static final int ETrackedDeviceProperty_Prop_DriverRequestsReducedRendering_Bool = 2059; + /** native declaration : headers\openvr_capi.h:374 */ + public static final int ETrackedDeviceProperty_Prop_MinimumIpdStepMeters_Float = 2060; + /** native declaration : headers\openvr_capi.h:375 */ + public static final int ETrackedDeviceProperty_Prop_AudioBridgeFirmwareVersion_Uint64 = 2061; + /** native declaration : headers\openvr_capi.h:376 */ + public static final int ETrackedDeviceProperty_Prop_ImageBridgeFirmwareVersion_Uint64 = 2062; + /** native declaration : headers\openvr_capi.h:377 */ + public static final int ETrackedDeviceProperty_Prop_ImuToHeadTransform_Matrix34 = 2063; + /** native declaration : headers\openvr_capi.h:378 */ + public static final int ETrackedDeviceProperty_Prop_ImuFactoryGyroBias_Vector3 = 2064; + /** native declaration : headers\openvr_capi.h:379 */ + public static final int ETrackedDeviceProperty_Prop_ImuFactoryGyroScale_Vector3 = 2065; + /** native declaration : headers\openvr_capi.h:380 */ + public static final int ETrackedDeviceProperty_Prop_ImuFactoryAccelerometerBias_Vector3 = 2066; + /** native declaration : headers\openvr_capi.h:381 */ + public static final int ETrackedDeviceProperty_Prop_ImuFactoryAccelerometerScale_Vector3 = 2067; + /** native declaration : headers\openvr_capi.h:382 */ + public static final int ETrackedDeviceProperty_Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069; + /** native declaration : headers\openvr_capi.h:383 */ + public static final int ETrackedDeviceProperty_Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200; + /** native declaration : headers\openvr_capi.h:384 */ + public static final int ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201; + /** native declaration : headers\openvr_capi.h:385 */ + public static final int ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202; + /** native declaration : headers\openvr_capi.h:386 */ + public static final int ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203; + /** native declaration : headers\openvr_capi.h:387 */ + public static final int ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204; + /** native declaration : headers\openvr_capi.h:388 */ + public static final int ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205; + /** native declaration : headers\openvr_capi.h:389 */ + public static final int ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206; + /** native declaration : headers\openvr_capi.h:390 */ + public static final int ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207; + /** native declaration : headers\openvr_capi.h:391 */ + public static final int ETrackedDeviceProperty_Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208; + /** native declaration : headers\openvr_capi.h:392 */ + public static final int ETrackedDeviceProperty_Prop_AttachedDeviceId_String = 3000; + /** native declaration : headers\openvr_capi.h:393 */ + public static final int ETrackedDeviceProperty_Prop_SupportedButtons_Uint64 = 3001; + /** native declaration : headers\openvr_capi.h:394 */ + public static final int ETrackedDeviceProperty_Prop_Axis0Type_Int32 = 3002; + /** native declaration : headers\openvr_capi.h:395 */ + public static final int ETrackedDeviceProperty_Prop_Axis1Type_Int32 = 3003; + /** native declaration : headers\openvr_capi.h:396 */ + public static final int ETrackedDeviceProperty_Prop_Axis2Type_Int32 = 3004; + /** native declaration : headers\openvr_capi.h:397 */ + public static final int ETrackedDeviceProperty_Prop_Axis3Type_Int32 = 3005; + /** native declaration : headers\openvr_capi.h:398 */ + public static final int ETrackedDeviceProperty_Prop_Axis4Type_Int32 = 3006; + /** native declaration : headers\openvr_capi.h:399 */ + public static final int ETrackedDeviceProperty_Prop_ControllerRoleHint_Int32 = 3007; + /** native declaration : headers\openvr_capi.h:400 */ + public static final int ETrackedDeviceProperty_Prop_FieldOfViewLeftDegrees_Float = 4000; + /** native declaration : headers\openvr_capi.h:401 */ + public static final int ETrackedDeviceProperty_Prop_FieldOfViewRightDegrees_Float = 4001; + /** native declaration : headers\openvr_capi.h:402 */ + public static final int ETrackedDeviceProperty_Prop_FieldOfViewTopDegrees_Float = 4002; + /** native declaration : headers\openvr_capi.h:403 */ + public static final int ETrackedDeviceProperty_Prop_FieldOfViewBottomDegrees_Float = 4003; + /** native declaration : headers\openvr_capi.h:404 */ + public static final int ETrackedDeviceProperty_Prop_TrackingRangeMinimumMeters_Float = 4004; + /** native declaration : headers\openvr_capi.h:405 */ + public static final int ETrackedDeviceProperty_Prop_TrackingRangeMaximumMeters_Float = 4005; + /** native declaration : headers\openvr_capi.h:406 */ + public static final int ETrackedDeviceProperty_Prop_ModeLabel_String = 4006; + /** native declaration : headers\openvr_capi.h:407 */ + public static final int ETrackedDeviceProperty_Prop_IconPathName_String = 5000; + /** native declaration : headers\openvr_capi.h:408 */ + public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceOff_String = 5001; + /** native declaration : headers\openvr_capi.h:409 */ + public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceSearching_String = 5002; + /** native declaration : headers\openvr_capi.h:410 */ + public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceSearchingAlert_String = 5003; + /** native declaration : headers\openvr_capi.h:411 */ + public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceReady_String = 5004; + /** native declaration : headers\openvr_capi.h:412 */ + public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceReadyAlert_String = 5005; + /** native declaration : headers\openvr_capi.h:413 */ + public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceNotReady_String = 5006; + /** native declaration : headers\openvr_capi.h:414 */ + public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceStandby_String = 5007; + /** native declaration : headers\openvr_capi.h:415 */ + public static final int ETrackedDeviceProperty_Prop_NamedIconPathDeviceAlertLow_String = 5008; + /** native declaration : headers\openvr_capi.h:416 */ + public static final int ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_Start = 5100; + /** native declaration : headers\openvr_capi.h:417 */ + public static final int ETrackedDeviceProperty_Prop_DisplayHiddenArea_Binary_End = 5150; + /** native declaration : headers\openvr_capi.h:418 */ + public static final int ETrackedDeviceProperty_Prop_ParentContainer = 5151; + /** native declaration : headers\openvr_capi.h:419 */ + public static final int ETrackedDeviceProperty_Prop_UserConfigPath_String = 6000; + /** native declaration : headers\openvr_capi.h:420 */ + public static final int ETrackedDeviceProperty_Prop_InstallPath_String = 6001; + /** native declaration : headers\openvr_capi.h:421 */ + public static final int ETrackedDeviceProperty_Prop_HasDisplayComponent_Bool = 6002; + /** native declaration : headers\openvr_capi.h:422 */ + public static final int ETrackedDeviceProperty_Prop_HasControllerComponent_Bool = 6003; + /** native declaration : headers\openvr_capi.h:423 */ + public static final int ETrackedDeviceProperty_Prop_HasCameraComponent_Bool = 6004; + /** native declaration : headers\openvr_capi.h:424 */ + public static final int ETrackedDeviceProperty_Prop_HasDriverDirectModeComponent_Bool = 6005; + /** native declaration : headers\openvr_capi.h:425 */ + public static final int ETrackedDeviceProperty_Prop_HasVirtualDisplayComponent_Bool = 6006; + /** native declaration : headers\openvr_capi.h:426 */ + public static final int ETrackedDeviceProperty_Prop_HasSpatialAnchorsSupport_Bool = 6007; + /** native declaration : headers\openvr_capi.h:427 */ + public static final int ETrackedDeviceProperty_Prop_ControllerType_String = 7000; + /** native declaration : headers\openvr_capi.h:428 */ + public static final int ETrackedDeviceProperty_Prop_LegacyInputProfile_String = 7001; + /** native declaration : headers\openvr_capi.h:429 */ + public static final int ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_Start = 10000; + /** native declaration : headers\openvr_capi.h:430 */ + public static final int ETrackedDeviceProperty_Prop_VendorSpecific_Reserved_End = 10999; + /** native declaration : headers\openvr_capi.h:431 */ + public static final int ETrackedDeviceProperty_Prop_TrackedDeviceProperty_Max = 1000000; + }; /** - * Original signature : bool VR_IsRuntimeInstalled()
- * native declaration : headers\openvr_capi.h:1931 - */ - public static native byte VR_IsRuntimeInstalled(); + * native declaration : headers\openvr_capi.h:447
+ * enum values + */ + public static interface ETrackedPropertyError { + /** native declaration : headers\openvr_capi.h:434 */ + public static final int ETrackedPropertyError_TrackedProp_Success = 0; + /** native declaration : headers\openvr_capi.h:435 */ + public static final int ETrackedPropertyError_TrackedProp_WrongDataType = 1; + /** native declaration : headers\openvr_capi.h:436 */ + public static final int ETrackedPropertyError_TrackedProp_WrongDeviceClass = 2; + /** native declaration : headers\openvr_capi.h:437 */ + public static final int ETrackedPropertyError_TrackedProp_BufferTooSmall = 3; + /** native declaration : headers\openvr_capi.h:438 */ + public static final int ETrackedPropertyError_TrackedProp_UnknownProperty = 4; + /** native declaration : headers\openvr_capi.h:439 */ + public static final int ETrackedPropertyError_TrackedProp_InvalidDevice = 5; + /** native declaration : headers\openvr_capi.h:440 */ + public static final int ETrackedPropertyError_TrackedProp_CouldNotContactServer = 6; + /** native declaration : headers\openvr_capi.h:441 */ + public static final int ETrackedPropertyError_TrackedProp_ValueNotProvidedByDevice = 7; + /** native declaration : headers\openvr_capi.h:442 */ + public static final int ETrackedPropertyError_TrackedProp_StringExceedsMaximumLength = 8; + /** native declaration : headers\openvr_capi.h:443 */ + public static final int ETrackedPropertyError_TrackedProp_NotYetAvailable = 9; + /** native declaration : headers\openvr_capi.h:444 */ + public static final int ETrackedPropertyError_TrackedProp_PermissionDenied = 10; + /** native declaration : headers\openvr_capi.h:445 */ + public static final int ETrackedPropertyError_TrackedProp_InvalidOperation = 11; + /** native declaration : headers\openvr_capi.h:446 */ + public static final int ETrackedPropertyError_TrackedProp_CannotWriteToWildcards = 12; + }; /** - * Original signature : char* VR_GetVRInitErrorAsSymbol(EVRInitError)
- * native declaration : headers\openvr_capi.h:1933 - */ - public static native Pointer VR_GetVRInitErrorAsSymbol(int error); + * native declaration : headers\openvr_capi.h:455
+ * enum values + */ + public static interface EVRSubmitFlags { + /** native declaration : headers\openvr_capi.h:449 */ + public static final int EVRSubmitFlags_Submit_Default = 0; + /** native declaration : headers\openvr_capi.h:450 */ + public static final int EVRSubmitFlags_Submit_LensDistortionAlreadyApplied = 1; + /** native declaration : headers\openvr_capi.h:451 */ + public static final int EVRSubmitFlags_Submit_GlRenderBuffer = 2; + /** native declaration : headers\openvr_capi.h:452 */ + public static final int EVRSubmitFlags_Submit_Reserved = 4; + /** native declaration : headers\openvr_capi.h:453 */ + public static final int EVRSubmitFlags_Submit_TextureWithPose = 8; + /** native declaration : headers\openvr_capi.h:454 */ + public static final int EVRSubmitFlags_Submit_TextureWithDepth = 16; + }; /** - * Original signature : char* VR_GetVRInitErrorAsEnglishDescription(EVRInitError)
- * native declaration : headers\openvr_capi.h:1935 - */ - public static native Pointer VR_GetVRInitErrorAsEnglishDescription(int error); - public static class VkQueue_T extends PointerType { - public VkQueue_T(Pointer address) { - super(address); - } - public VkQueue_T() { - super(); - } - }; - public static class VkPhysicalDevice_T extends PointerType { - public VkPhysicalDevice_T(Pointer address) { - super(address); - } - public VkPhysicalDevice_T() { - super(); - } - }; - public static class VkInstance_T extends PointerType { - public VkInstance_T(Pointer address) { - super(address); - } - public VkInstance_T() { - super(); - } - }; - public static class ID3D12CommandQueue extends PointerType { - public ID3D12CommandQueue(Pointer address) { - super(address); - } - public ID3D12CommandQueue() { - super(); - } - }; - public static class ID3D12Resource extends PointerType { - public ID3D12Resource(Pointer address) { - super(address); - } - public ID3D12Resource() { - super(); - } - }; - public static class VkDevice_T extends PointerType { - public VkDevice_T(Pointer address) { - super(address); - } - public VkDevice_T() { - super(); - } - }; + * native declaration : headers\openvr_capi.h:466
+ * enum values + */ + public static interface EVRState { + /** native declaration : headers\openvr_capi.h:457 */ + public static final int EVRState_VRState_Undefined = -1; + /** native declaration : headers\openvr_capi.h:458 */ + public static final int EVRState_VRState_Off = 0; + /** native declaration : headers\openvr_capi.h:459 */ + public static final int EVRState_VRState_Searching = 1; + /** native declaration : headers\openvr_capi.h:460 */ + public static final int EVRState_VRState_Searching_Alert = 2; + /** native declaration : headers\openvr_capi.h:461 */ + public static final int EVRState_VRState_Ready = 3; + /** native declaration : headers\openvr_capi.h:462 */ + public static final int EVRState_VRState_Ready_Alert = 4; + /** native declaration : headers\openvr_capi.h:463 */ + public static final int EVRState_VRState_NotReady = 5; + /** native declaration : headers\openvr_capi.h:464 */ + public static final int EVRState_VRState_Standby = 6; + /** native declaration : headers\openvr_capi.h:465 */ + public static final int EVRState_VRState_Ready_Alert_Low = 7; + }; + /** + * native declaration : headers\openvr_capi.h:616
+ * enum values + */ + public static interface EVREventType { + /** native declaration : headers\openvr_capi.h:468 */ + public static final int EVREventType_VREvent_None = 0; + /** native declaration : headers\openvr_capi.h:469 */ + public static final int EVREventType_VREvent_TrackedDeviceActivated = 100; + /** native declaration : headers\openvr_capi.h:470 */ + public static final int EVREventType_VREvent_TrackedDeviceDeactivated = 101; + /** native declaration : headers\openvr_capi.h:471 */ + public static final int EVREventType_VREvent_TrackedDeviceUpdated = 102; + /** native declaration : headers\openvr_capi.h:472 */ + public static final int EVREventType_VREvent_TrackedDeviceUserInteractionStarted = 103; + /** native declaration : headers\openvr_capi.h:473 */ + public static final int EVREventType_VREvent_TrackedDeviceUserInteractionEnded = 104; + /** native declaration : headers\openvr_capi.h:474 */ + public static final int EVREventType_VREvent_IpdChanged = 105; + /** native declaration : headers\openvr_capi.h:475 */ + public static final int EVREventType_VREvent_EnterStandbyMode = 106; + /** native declaration : headers\openvr_capi.h:476 */ + public static final int EVREventType_VREvent_LeaveStandbyMode = 107; + /** native declaration : headers\openvr_capi.h:477 */ + public static final int EVREventType_VREvent_TrackedDeviceRoleChanged = 108; + /** native declaration : headers\openvr_capi.h:478 */ + public static final int EVREventType_VREvent_WatchdogWakeUpRequested = 109; + /** native declaration : headers\openvr_capi.h:479 */ + public static final int EVREventType_VREvent_LensDistortionChanged = 110; + /** native declaration : headers\openvr_capi.h:480 */ + public static final int EVREventType_VREvent_PropertyChanged = 111; + /** native declaration : headers\openvr_capi.h:481 */ + public static final int EVREventType_VREvent_WirelessDisconnect = 112; + /** native declaration : headers\openvr_capi.h:482 */ + public static final int EVREventType_VREvent_WirelessReconnect = 113; + /** native declaration : headers\openvr_capi.h:483 */ + public static final int EVREventType_VREvent_ButtonPress = 200; + /** native declaration : headers\openvr_capi.h:484 */ + public static final int EVREventType_VREvent_ButtonUnpress = 201; + /** native declaration : headers\openvr_capi.h:485 */ + public static final int EVREventType_VREvent_ButtonTouch = 202; + /** native declaration : headers\openvr_capi.h:486 */ + public static final int EVREventType_VREvent_ButtonUntouch = 203; + /** native declaration : headers\openvr_capi.h:487 */ + public static final int EVREventType_VREvent_DualAnalog_Press = 250; + /** native declaration : headers\openvr_capi.h:488 */ + public static final int EVREventType_VREvent_DualAnalog_Unpress = 251; + /** native declaration : headers\openvr_capi.h:489 */ + public static final int EVREventType_VREvent_DualAnalog_Touch = 252; + /** native declaration : headers\openvr_capi.h:490 */ + public static final int EVREventType_VREvent_DualAnalog_Untouch = 253; + /** native declaration : headers\openvr_capi.h:491 */ + public static final int EVREventType_VREvent_DualAnalog_Move = 254; + /** native declaration : headers\openvr_capi.h:492 */ + public static final int EVREventType_VREvent_DualAnalog_ModeSwitch1 = 255; + /** native declaration : headers\openvr_capi.h:493 */ + public static final int EVREventType_VREvent_DualAnalog_ModeSwitch2 = 256; + /** native declaration : headers\openvr_capi.h:494 */ + public static final int EVREventType_VREvent_DualAnalog_Cancel = 257; + /** native declaration : headers\openvr_capi.h:495 */ + public static final int EVREventType_VREvent_MouseMove = 300; + /** native declaration : headers\openvr_capi.h:496 */ + public static final int EVREventType_VREvent_MouseButtonDown = 301; + /** native declaration : headers\openvr_capi.h:497 */ + public static final int EVREventType_VREvent_MouseButtonUp = 302; + /** native declaration : headers\openvr_capi.h:498 */ + public static final int EVREventType_VREvent_FocusEnter = 303; + /** native declaration : headers\openvr_capi.h:499 */ + public static final int EVREventType_VREvent_FocusLeave = 304; + /** native declaration : headers\openvr_capi.h:500 */ + public static final int EVREventType_VREvent_Scroll = 305; + /** native declaration : headers\openvr_capi.h:501 */ + public static final int EVREventType_VREvent_TouchPadMove = 306; + /** native declaration : headers\openvr_capi.h:502 */ + public static final int EVREventType_VREvent_OverlayFocusChanged = 307; + /** native declaration : headers\openvr_capi.h:503 */ + public static final int EVREventType_VREvent_InputFocusCaptured = 400; + /** native declaration : headers\openvr_capi.h:504 */ + public static final int EVREventType_VREvent_InputFocusReleased = 401; + /** native declaration : headers\openvr_capi.h:505 */ + public static final int EVREventType_VREvent_SceneFocusLost = 402; + /** native declaration : headers\openvr_capi.h:506 */ + public static final int EVREventType_VREvent_SceneFocusGained = 403; + /** native declaration : headers\openvr_capi.h:507 */ + public static final int EVREventType_VREvent_SceneApplicationChanged = 404; + /** native declaration : headers\openvr_capi.h:508 */ + public static final int EVREventType_VREvent_SceneFocusChanged = 405; + /** native declaration : headers\openvr_capi.h:509 */ + public static final int EVREventType_VREvent_InputFocusChanged = 406; + /** native declaration : headers\openvr_capi.h:510 */ + public static final int EVREventType_VREvent_SceneApplicationSecondaryRenderingStarted = 407; + /** native declaration : headers\openvr_capi.h:511 */ + public static final int EVREventType_VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408; + /** native declaration : headers\openvr_capi.h:512 */ + public static final int EVREventType_VREvent_ActionBindingReloaded = 409; + /** native declaration : headers\openvr_capi.h:513 */ + public static final int EVREventType_VREvent_HideRenderModels = 410; + /** native declaration : headers\openvr_capi.h:514 */ + public static final int EVREventType_VREvent_ShowRenderModels = 411; + /** native declaration : headers\openvr_capi.h:515 */ + public static final int EVREventType_VREvent_ConsoleOpened = 420; + /** native declaration : headers\openvr_capi.h:516 */ + public static final int EVREventType_VREvent_ConsoleClosed = 421; + /** native declaration : headers\openvr_capi.h:517 */ + public static final int EVREventType_VREvent_OverlayShown = 500; + /** native declaration : headers\openvr_capi.h:518 */ + public static final int EVREventType_VREvent_OverlayHidden = 501; + /** native declaration : headers\openvr_capi.h:519 */ + public static final int EVREventType_VREvent_DashboardActivated = 502; + /** native declaration : headers\openvr_capi.h:520 */ + public static final int EVREventType_VREvent_DashboardDeactivated = 503; + /** native declaration : headers\openvr_capi.h:521 */ + public static final int EVREventType_VREvent_DashboardThumbSelected = 504; + /** native declaration : headers\openvr_capi.h:522 */ + public static final int EVREventType_VREvent_DashboardRequested = 505; + /** native declaration : headers\openvr_capi.h:523 */ + public static final int EVREventType_VREvent_ResetDashboard = 506; + /** native declaration : headers\openvr_capi.h:524 */ + public static final int EVREventType_VREvent_RenderToast = 507; + /** native declaration : headers\openvr_capi.h:525 */ + public static final int EVREventType_VREvent_ImageLoaded = 508; + /** native declaration : headers\openvr_capi.h:526 */ + public static final int EVREventType_VREvent_ShowKeyboard = 509; + /** native declaration : headers\openvr_capi.h:527 */ + public static final int EVREventType_VREvent_HideKeyboard = 510; + /** native declaration : headers\openvr_capi.h:528 */ + public static final int EVREventType_VREvent_OverlayGamepadFocusGained = 511; + /** native declaration : headers\openvr_capi.h:529 */ + public static final int EVREventType_VREvent_OverlayGamepadFocusLost = 512; + /** native declaration : headers\openvr_capi.h:530 */ + public static final int EVREventType_VREvent_OverlaySharedTextureChanged = 513; + /** native declaration : headers\openvr_capi.h:531 */ + public static final int EVREventType_VREvent_ScreenshotTriggered = 516; + /** native declaration : headers\openvr_capi.h:532 */ + public static final int EVREventType_VREvent_ImageFailed = 517; + /** native declaration : headers\openvr_capi.h:533 */ + public static final int EVREventType_VREvent_DashboardOverlayCreated = 518; + /** native declaration : headers\openvr_capi.h:534 */ + public static final int EVREventType_VREvent_SwitchGamepadFocus = 519; + /** native declaration : headers\openvr_capi.h:535 */ + public static final int EVREventType_VREvent_RequestScreenshot = 520; + /** native declaration : headers\openvr_capi.h:536 */ + public static final int EVREventType_VREvent_ScreenshotTaken = 521; + /** native declaration : headers\openvr_capi.h:537 */ + public static final int EVREventType_VREvent_ScreenshotFailed = 522; + /** native declaration : headers\openvr_capi.h:538 */ + public static final int EVREventType_VREvent_SubmitScreenshotToDashboard = 523; + /** native declaration : headers\openvr_capi.h:539 */ + public static final int EVREventType_VREvent_ScreenshotProgressToDashboard = 524; + /** native declaration : headers\openvr_capi.h:540 */ + public static final int EVREventType_VREvent_PrimaryDashboardDeviceChanged = 525; + /** native declaration : headers\openvr_capi.h:541 */ + public static final int EVREventType_VREvent_RoomViewShown = 526; + /** native declaration : headers\openvr_capi.h:542 */ + public static final int EVREventType_VREvent_RoomViewHidden = 527; + /** native declaration : headers\openvr_capi.h:543 */ + public static final int EVREventType_VREvent_Notification_Shown = 600; + /** native declaration : headers\openvr_capi.h:544 */ + public static final int EVREventType_VREvent_Notification_Hidden = 601; + /** native declaration : headers\openvr_capi.h:545 */ + public static final int EVREventType_VREvent_Notification_BeginInteraction = 602; + /** native declaration : headers\openvr_capi.h:546 */ + public static final int EVREventType_VREvent_Notification_Destroyed = 603; + /** native declaration : headers\openvr_capi.h:547 */ + public static final int EVREventType_VREvent_Quit = 700; + /** native declaration : headers\openvr_capi.h:548 */ + public static final int EVREventType_VREvent_ProcessQuit = 701; + /** native declaration : headers\openvr_capi.h:549 */ + public static final int EVREventType_VREvent_QuitAborted_UserPrompt = 702; + /** native declaration : headers\openvr_capi.h:550 */ + public static final int EVREventType_VREvent_QuitAcknowledged = 703; + /** native declaration : headers\openvr_capi.h:551 */ + public static final int EVREventType_VREvent_DriverRequestedQuit = 704; + /** native declaration : headers\openvr_capi.h:552 */ + public static final int EVREventType_VREvent_ChaperoneDataHasChanged = 800; + /** native declaration : headers\openvr_capi.h:553 */ + public static final int EVREventType_VREvent_ChaperoneUniverseHasChanged = 801; + /** native declaration : headers\openvr_capi.h:554 */ + public static final int EVREventType_VREvent_ChaperoneTempDataHasChanged = 802; + /** native declaration : headers\openvr_capi.h:555 */ + public static final int EVREventType_VREvent_ChaperoneSettingsHaveChanged = 803; + /** native declaration : headers\openvr_capi.h:556 */ + public static final int EVREventType_VREvent_SeatedZeroPoseReset = 804; + /** native declaration : headers\openvr_capi.h:557 */ + public static final int EVREventType_VREvent_AudioSettingsHaveChanged = 820; + /** native declaration : headers\openvr_capi.h:558 */ + public static final int EVREventType_VREvent_BackgroundSettingHasChanged = 850; + /** native declaration : headers\openvr_capi.h:559 */ + public static final int EVREventType_VREvent_CameraSettingsHaveChanged = 851; + /** native declaration : headers\openvr_capi.h:560 */ + public static final int EVREventType_VREvent_ReprojectionSettingHasChanged = 852; + /** native declaration : headers\openvr_capi.h:561 */ + public static final int EVREventType_VREvent_ModelSkinSettingsHaveChanged = 853; + /** native declaration : headers\openvr_capi.h:562 */ + public static final int EVREventType_VREvent_EnvironmentSettingsHaveChanged = 854; + /** native declaration : headers\openvr_capi.h:563 */ + public static final int EVREventType_VREvent_PowerSettingsHaveChanged = 855; + /** native declaration : headers\openvr_capi.h:564 */ + public static final int EVREventType_VREvent_EnableHomeAppSettingsHaveChanged = 856; + /** native declaration : headers\openvr_capi.h:565 */ + public static final int EVREventType_VREvent_SteamVRSectionSettingChanged = 857; + /** native declaration : headers\openvr_capi.h:566 */ + public static final int EVREventType_VREvent_LighthouseSectionSettingChanged = 858; + /** native declaration : headers\openvr_capi.h:567 */ + public static final int EVREventType_VREvent_NullSectionSettingChanged = 859; + /** native declaration : headers\openvr_capi.h:568 */ + public static final int EVREventType_VREvent_UserInterfaceSectionSettingChanged = 860; + /** native declaration : headers\openvr_capi.h:569 */ + public static final int EVREventType_VREvent_NotificationsSectionSettingChanged = 861; + /** native declaration : headers\openvr_capi.h:570 */ + public static final int EVREventType_VREvent_KeyboardSectionSettingChanged = 862; + /** native declaration : headers\openvr_capi.h:571 */ + public static final int EVREventType_VREvent_PerfSectionSettingChanged = 863; + /** native declaration : headers\openvr_capi.h:572 */ + public static final int EVREventType_VREvent_DashboardSectionSettingChanged = 864; + /** native declaration : headers\openvr_capi.h:573 */ + public static final int EVREventType_VREvent_WebInterfaceSectionSettingChanged = 865; + /** native declaration : headers\openvr_capi.h:574 */ + public static final int EVREventType_VREvent_TrackersSectionSettingChanged = 866; + /** native declaration : headers\openvr_capi.h:575 */ + public static final int EVREventType_VREvent_StatusUpdate = 900; + /** native declaration : headers\openvr_capi.h:576 */ + public static final int EVREventType_VREvent_WebInterface_InstallDriverCompleted = 950; + /** native declaration : headers\openvr_capi.h:577 */ + public static final int EVREventType_VREvent_MCImageUpdated = 1000; + /** native declaration : headers\openvr_capi.h:578 */ + public static final int EVREventType_VREvent_FirmwareUpdateStarted = 1100; + /** native declaration : headers\openvr_capi.h:579 */ + public static final int EVREventType_VREvent_FirmwareUpdateFinished = 1101; + /** native declaration : headers\openvr_capi.h:580 */ + public static final int EVREventType_VREvent_KeyboardClosed = 1200; + /** native declaration : headers\openvr_capi.h:581 */ + public static final int EVREventType_VREvent_KeyboardCharInput = 1201; + /** native declaration : headers\openvr_capi.h:582 */ + public static final int EVREventType_VREvent_KeyboardDone = 1202; + /** native declaration : headers\openvr_capi.h:583 */ + public static final int EVREventType_VREvent_ApplicationTransitionStarted = 1300; + /** native declaration : headers\openvr_capi.h:584 */ + public static final int EVREventType_VREvent_ApplicationTransitionAborted = 1301; + /** native declaration : headers\openvr_capi.h:585 */ + public static final int EVREventType_VREvent_ApplicationTransitionNewAppStarted = 1302; + /** native declaration : headers\openvr_capi.h:586 */ + public static final int EVREventType_VREvent_ApplicationListUpdated = 1303; + /** native declaration : headers\openvr_capi.h:587 */ + public static final int EVREventType_VREvent_ApplicationMimeTypeLoad = 1304; + /** native declaration : headers\openvr_capi.h:588 */ + public static final int EVREventType_VREvent_ApplicationTransitionNewAppLaunchComplete = 1305; + /** native declaration : headers\openvr_capi.h:589 */ + public static final int EVREventType_VREvent_ProcessConnected = 1306; + /** native declaration : headers\openvr_capi.h:590 */ + public static final int EVREventType_VREvent_ProcessDisconnected = 1307; + /** native declaration : headers\openvr_capi.h:591 */ + public static final int EVREventType_VREvent_Compositor_MirrorWindowShown = 1400; + /** native declaration : headers\openvr_capi.h:592 */ + public static final int EVREventType_VREvent_Compositor_MirrorWindowHidden = 1401; + /** native declaration : headers\openvr_capi.h:593 */ + public static final int EVREventType_VREvent_Compositor_ChaperoneBoundsShown = 1410; + /** native declaration : headers\openvr_capi.h:594 */ + public static final int EVREventType_VREvent_Compositor_ChaperoneBoundsHidden = 1411; + /** native declaration : headers\openvr_capi.h:595 */ + public static final int EVREventType_VREvent_TrackedCamera_StartVideoStream = 1500; + /** native declaration : headers\openvr_capi.h:596 */ + public static final int EVREventType_VREvent_TrackedCamera_StopVideoStream = 1501; + /** native declaration : headers\openvr_capi.h:597 */ + public static final int EVREventType_VREvent_TrackedCamera_PauseVideoStream = 1502; + /** native declaration : headers\openvr_capi.h:598 */ + public static final int EVREventType_VREvent_TrackedCamera_ResumeVideoStream = 1503; + /** native declaration : headers\openvr_capi.h:599 */ + public static final int EVREventType_VREvent_TrackedCamera_EditingSurface = 1550; + /** native declaration : headers\openvr_capi.h:600 */ + public static final int EVREventType_VREvent_PerformanceTest_EnableCapture = 1600; + /** native declaration : headers\openvr_capi.h:601 */ + public static final int EVREventType_VREvent_PerformanceTest_DisableCapture = 1601; + /** native declaration : headers\openvr_capi.h:602 */ + public static final int EVREventType_VREvent_PerformanceTest_FidelityLevel = 1602; + /** native declaration : headers\openvr_capi.h:603 */ + public static final int EVREventType_VREvent_MessageOverlay_Closed = 1650; + /** native declaration : headers\openvr_capi.h:604 */ + public static final int EVREventType_VREvent_MessageOverlayCloseRequested = 1651; + /** native declaration : headers\openvr_capi.h:605 */ + public static final int EVREventType_VREvent_Input_HapticVibration = 1700; + /** native declaration : headers\openvr_capi.h:606 */ + public static final int EVREventType_VREvent_Input_BindingLoadFailed = 1701; + /** native declaration : headers\openvr_capi.h:607 */ + public static final int EVREventType_VREvent_Input_BindingLoadSuccessful = 1702; + /** native declaration : headers\openvr_capi.h:608 */ + public static final int EVREventType_VREvent_Input_ActionManifestReloaded = 1703; + /** native declaration : headers\openvr_capi.h:609 */ + public static final int EVREventType_VREvent_Input_ActionManifestLoadFailed = 1704; + /** native declaration : headers\openvr_capi.h:610 */ + public static final int EVREventType_VREvent_SpatialAnchors_PoseUpdated = 1800; + /** native declaration : headers\openvr_capi.h:611 */ + public static final int EVREventType_VREvent_SpatialAnchors_DescriptorUpdated = 1801; + /** native declaration : headers\openvr_capi.h:612 */ + public static final int EVREventType_VREvent_SpatialAnchors_RequestPoseUpdate = 1802; + /** native declaration : headers\openvr_capi.h:613 */ + public static final int EVREventType_VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803; + /** native declaration : headers\openvr_capi.h:614 */ + public static final int EVREventType_VREvent_VendorSpecific_Reserved_Start = 10000; + /** native declaration : headers\openvr_capi.h:615 */ + public static final int EVREventType_VREvent_VendorSpecific_Reserved_End = 19999; + }; + /** + * native declaration : headers\openvr_capi.h:623
+ * enum values + */ + public static interface EDeviceActivityLevel { + /** native declaration : headers\openvr_capi.h:618 */ + public static final int EDeviceActivityLevel_k_EDeviceActivityLevel_Unknown = -1; + /** native declaration : headers\openvr_capi.h:619 */ + public static final int EDeviceActivityLevel_k_EDeviceActivityLevel_Idle = 0; + /** native declaration : headers\openvr_capi.h:620 */ + public static final int EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction = 1; + /** native declaration : headers\openvr_capi.h:621 */ + public static final int EDeviceActivityLevel_k_EDeviceActivityLevel_UserInteraction_Timeout = 2; + /** native declaration : headers\openvr_capi.h:622 */ + public static final int EDeviceActivityLevel_k_EDeviceActivityLevel_Standby = 3; + }; + /** + * native declaration : headers\openvr_capi.h:646
+ * enum values + */ + public static interface EVRButtonId { + /** native declaration : headers\openvr_capi.h:625 */ + public static final int EVRButtonId_k_EButton_System = 0; + /** native declaration : headers\openvr_capi.h:626 */ + public static final int EVRButtonId_k_EButton_ApplicationMenu = 1; + /** native declaration : headers\openvr_capi.h:627 */ + public static final int EVRButtonId_k_EButton_Grip = 2; + /** native declaration : headers\openvr_capi.h:628 */ + public static final int EVRButtonId_k_EButton_DPad_Left = 3; + /** native declaration : headers\openvr_capi.h:629 */ + public static final int EVRButtonId_k_EButton_DPad_Up = 4; + /** native declaration : headers\openvr_capi.h:630 */ + public static final int EVRButtonId_k_EButton_DPad_Right = 5; + /** native declaration : headers\openvr_capi.h:631 */ + public static final int EVRButtonId_k_EButton_DPad_Down = 6; + /** native declaration : headers\openvr_capi.h:632 */ + public static final int EVRButtonId_k_EButton_A = 7; + /** native declaration : headers\openvr_capi.h:633 */ + public static final int EVRButtonId_k_EButton_ProximitySensor = 31; + /** native declaration : headers\openvr_capi.h:634 */ + public static final int EVRButtonId_k_EButton_Axis0 = 32; + /** native declaration : headers\openvr_capi.h:635 */ + public static final int EVRButtonId_k_EButton_Axis1 = 33; + /** native declaration : headers\openvr_capi.h:636 */ + public static final int EVRButtonId_k_EButton_Axis2 = 34; + /** native declaration : headers\openvr_capi.h:637 */ + public static final int EVRButtonId_k_EButton_Axis3 = 35; + /** native declaration : headers\openvr_capi.h:638 */ + public static final int EVRButtonId_k_EButton_Axis4 = 36; + /** native declaration : headers\openvr_capi.h:639 */ + public static final int EVRButtonId_k_EButton_SteamVR_Touchpad = 32; + /** native declaration : headers\openvr_capi.h:640 */ + public static final int EVRButtonId_k_EButton_SteamVR_Trigger = 33; + /** native declaration : headers\openvr_capi.h:641 */ + public static final int EVRButtonId_k_EButton_Dashboard_Back = 2; + /** native declaration : headers\openvr_capi.h:642 */ + public static final int EVRButtonId_k_EButton_Knuckles_A = 2; + /** native declaration : headers\openvr_capi.h:643 */ + public static final int EVRButtonId_k_EButton_Knuckles_B = 1; + /** native declaration : headers\openvr_capi.h:644 */ + public static final int EVRButtonId_k_EButton_Knuckles_JoyStick = 35; + /** native declaration : headers\openvr_capi.h:645 */ + public static final int EVRButtonId_k_EButton_Max = 64; + }; + /** + * native declaration : headers\openvr_capi.h:651
+ * enum values + */ + public static interface EVRMouseButton { + /** native declaration : headers\openvr_capi.h:648 */ + public static final int EVRMouseButton_VRMouseButton_Left = 1; + /** native declaration : headers\openvr_capi.h:649 */ + public static final int EVRMouseButton_VRMouseButton_Right = 2; + /** native declaration : headers\openvr_capi.h:650 */ + public static final int EVRMouseButton_VRMouseButton_Middle = 4; + }; + /** + * native declaration : headers\openvr_capi.h:655
+ * enum values + */ + public static interface EDualAnalogWhich { + /** native declaration : headers\openvr_capi.h:653 */ + public static final int EDualAnalogWhich_k_EDualAnalog_Left = 0; + /** native declaration : headers\openvr_capi.h:654 */ + public static final int EDualAnalogWhich_k_EDualAnalog_Right = 1; + }; + /** + * native declaration : headers\openvr_capi.h:674
+ * enum values + */ + public static interface EVRInputError { + /** native declaration : headers\openvr_capi.h:657 */ + public static final int EVRInputError_VRInputError_None = 0; + /** native declaration : headers\openvr_capi.h:658 */ + public static final int EVRInputError_VRInputError_NameNotFound = 1; + /** native declaration : headers\openvr_capi.h:659 */ + public static final int EVRInputError_VRInputError_WrongType = 2; + /** native declaration : headers\openvr_capi.h:660 */ + public static final int EVRInputError_VRInputError_InvalidHandle = 3; + /** native declaration : headers\openvr_capi.h:661 */ + public static final int EVRInputError_VRInputError_InvalidParam = 4; + /** native declaration : headers\openvr_capi.h:662 */ + public static final int EVRInputError_VRInputError_NoSteam = 5; + /** native declaration : headers\openvr_capi.h:663 */ + public static final int EVRInputError_VRInputError_MaxCapacityReached = 6; + /** native declaration : headers\openvr_capi.h:664 */ + public static final int EVRInputError_VRInputError_IPCError = 7; + /** native declaration : headers\openvr_capi.h:665 */ + public static final int EVRInputError_VRInputError_NoActiveActionSet = 8; + /** native declaration : headers\openvr_capi.h:666 */ + public static final int EVRInputError_VRInputError_InvalidDevice = 9; + /** native declaration : headers\openvr_capi.h:667 */ + public static final int EVRInputError_VRInputError_InvalidSkeleton = 10; + /** native declaration : headers\openvr_capi.h:668 */ + public static final int EVRInputError_VRInputError_InvalidBoneCount = 11; + /** native declaration : headers\openvr_capi.h:669 */ + public static final int EVRInputError_VRInputError_InvalidCompressedData = 12; + /** native declaration : headers\openvr_capi.h:670 */ + public static final int EVRInputError_VRInputError_NoData = 13; + /** native declaration : headers\openvr_capi.h:671 */ + public static final int EVRInputError_VRInputError_BufferTooSmall = 14; + /** native declaration : headers\openvr_capi.h:672 */ + public static final int EVRInputError_VRInputError_MismatchedActionManifest = 15; + /** native declaration : headers\openvr_capi.h:673 */ + public static final int EVRInputError_VRInputError_MissingSkeletonData = 16; + }; + /** + * native declaration : headers\openvr_capi.h:690
+ * enum values + */ + public static interface EVRSpatialAnchorError { + /** native declaration : headers\openvr_capi.h:676 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_Success = 0; + /** native declaration : headers\openvr_capi.h:677 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_Internal = 1; + /** native declaration : headers\openvr_capi.h:678 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_UnknownHandle = 2; + /** native declaration : headers\openvr_capi.h:679 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_ArrayTooSmall = 3; + /** native declaration : headers\openvr_capi.h:680 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_InvalidDescriptorChar = 4; + /** native declaration : headers\openvr_capi.h:681 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_NotYetAvailable = 5; + /** native declaration : headers\openvr_capi.h:682 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_NotAvailableInThisUniverse = 6; + /** native declaration : headers\openvr_capi.h:683 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_PermanentlyUnavailable = 7; + /** native declaration : headers\openvr_capi.h:684 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_WrongDriver = 8; + /** native declaration : headers\openvr_capi.h:685 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_DescriptorTooLong = 9; + /** native declaration : headers\openvr_capi.h:686 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_Unknown = 10; + /** native declaration : headers\openvr_capi.h:687 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_NoRoomCalibration = 11; + /** native declaration : headers\openvr_capi.h:688 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_InvalidArgument = 12; + /** native declaration : headers\openvr_capi.h:689 */ + public static final int EVRSpatialAnchorError_VRSpatialAnchorError_UnknownDriver = 13; + }; + /** + * native declaration : headers\openvr_capi.h:696
+ * enum values + */ + public static interface EHiddenAreaMeshType { + /** native declaration : headers\openvr_capi.h:692 */ + public static final int EHiddenAreaMeshType_k_eHiddenAreaMesh_Standard = 0; + /** native declaration : headers\openvr_capi.h:693 */ + public static final int EHiddenAreaMeshType_k_eHiddenAreaMesh_Inverse = 1; + /** native declaration : headers\openvr_capi.h:694 */ + public static final int EHiddenAreaMeshType_k_eHiddenAreaMesh_LineLoop = 2; + /** native declaration : headers\openvr_capi.h:695 */ + public static final int EHiddenAreaMeshType_k_eHiddenAreaMesh_Max = 3; + }; + /** + * native declaration : headers\openvr_capi.h:702
+ * enum values + */ + public static interface EVRControllerAxisType { + /** native declaration : headers\openvr_capi.h:698 */ + public static final int EVRControllerAxisType_k_eControllerAxis_None = 0; + /** native declaration : headers\openvr_capi.h:699 */ + public static final int EVRControllerAxisType_k_eControllerAxis_TrackPad = 1; + /** native declaration : headers\openvr_capi.h:700 */ + public static final int EVRControllerAxisType_k_eControllerAxis_Joystick = 2; + /** native declaration : headers\openvr_capi.h:701 */ + public static final int EVRControllerAxisType_k_eControllerAxis_Trigger = 3; + }; + /** + * native declaration : headers\openvr_capi.h:706
+ * enum values + */ + public static interface EVRControllerEventOutputType { + /** native declaration : headers\openvr_capi.h:704 */ + public static final int EVRControllerEventOutputType_ControllerEventOutput_OSEvents = 0; + /** native declaration : headers\openvr_capi.h:705 */ + public static final int EVRControllerEventOutputType_ControllerEventOutput_VREvents = 1; + }; + /** + * native declaration : headers\openvr_capi.h:714
+ * enum values + */ + public static interface ECollisionBoundsStyle { + /** native declaration : headers\openvr_capi.h:708 */ + public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_BEGINNER = 0; + /** native declaration : headers\openvr_capi.h:709 */ + public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_INTERMEDIATE = 1; + /** native declaration : headers\openvr_capi.h:710 */ + public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_SQUARES = 2; + /** native declaration : headers\openvr_capi.h:711 */ + public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_ADVANCED = 3; + /** native declaration : headers\openvr_capi.h:712 */ + public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_NONE = 4; + /** native declaration : headers\openvr_capi.h:713 */ + public static final int ECollisionBoundsStyle_COLLISION_BOUNDS_STYLE_COUNT = 5; + }; + /** + * native declaration : headers\openvr_capi.h:740
+ * enum values + */ + public static interface EVROverlayError { + /** native declaration : headers\openvr_capi.h:716 */ + public static final int EVROverlayError_VROverlayError_None = 0; + /** native declaration : headers\openvr_capi.h:717 */ + public static final int EVROverlayError_VROverlayError_UnknownOverlay = 10; + /** native declaration : headers\openvr_capi.h:718 */ + public static final int EVROverlayError_VROverlayError_InvalidHandle = 11; + /** native declaration : headers\openvr_capi.h:719 */ + public static final int EVROverlayError_VROverlayError_PermissionDenied = 12; + /** native declaration : headers\openvr_capi.h:720 */ + public static final int EVROverlayError_VROverlayError_OverlayLimitExceeded = 13; + /** native declaration : headers\openvr_capi.h:721 */ + public static final int EVROverlayError_VROverlayError_WrongVisibilityType = 14; + /** native declaration : headers\openvr_capi.h:722 */ + public static final int EVROverlayError_VROverlayError_KeyTooLong = 15; + /** native declaration : headers\openvr_capi.h:723 */ + public static final int EVROverlayError_VROverlayError_NameTooLong = 16; + /** native declaration : headers\openvr_capi.h:724 */ + public static final int EVROverlayError_VROverlayError_KeyInUse = 17; + /** native declaration : headers\openvr_capi.h:725 */ + public static final int EVROverlayError_VROverlayError_WrongTransformType = 18; + /** native declaration : headers\openvr_capi.h:726 */ + public static final int EVROverlayError_VROverlayError_InvalidTrackedDevice = 19; + /** native declaration : headers\openvr_capi.h:727 */ + public static final int EVROverlayError_VROverlayError_InvalidParameter = 20; + /** native declaration : headers\openvr_capi.h:728 */ + public static final int EVROverlayError_VROverlayError_ThumbnailCantBeDestroyed = 21; + /** native declaration : headers\openvr_capi.h:729 */ + public static final int EVROverlayError_VROverlayError_ArrayTooSmall = 22; + /** native declaration : headers\openvr_capi.h:730 */ + public static final int EVROverlayError_VROverlayError_RequestFailed = 23; + /** native declaration : headers\openvr_capi.h:731 */ + public static final int EVROverlayError_VROverlayError_InvalidTexture = 24; + /** native declaration : headers\openvr_capi.h:732 */ + public static final int EVROverlayError_VROverlayError_UnableToLoadFile = 25; + /** native declaration : headers\openvr_capi.h:733 */ + public static final int EVROverlayError_VROverlayError_KeyboardAlreadyInUse = 26; + /** native declaration : headers\openvr_capi.h:734 */ + public static final int EVROverlayError_VROverlayError_NoNeighbor = 27; + /** native declaration : headers\openvr_capi.h:735 */ + public static final int EVROverlayError_VROverlayError_TooManyMaskPrimitives = 29; + /** native declaration : headers\openvr_capi.h:736 */ + public static final int EVROverlayError_VROverlayError_BadMaskPrimitive = 30; + /** native declaration : headers\openvr_capi.h:737 */ + public static final int EVROverlayError_VROverlayError_TextureAlreadyLocked = 31; + /** native declaration : headers\openvr_capi.h:738 */ + public static final int EVROverlayError_VROverlayError_TextureLockCapacityReached = 32; + /** native declaration : headers\openvr_capi.h:739 */ + public static final int EVROverlayError_VROverlayError_TextureNotLocked = 33; + }; + /** + * native declaration : headers\openvr_capi.h:751
+ * enum values + */ + public static interface EVRApplicationType { + /** native declaration : headers\openvr_capi.h:742 */ + public static final int EVRApplicationType_VRApplication_Other = 0; + /** native declaration : headers\openvr_capi.h:743 */ + public static final int EVRApplicationType_VRApplication_Scene = 1; + /** native declaration : headers\openvr_capi.h:744 */ + public static final int EVRApplicationType_VRApplication_Overlay = 2; + /** native declaration : headers\openvr_capi.h:745 */ + public static final int EVRApplicationType_VRApplication_Background = 3; + /** native declaration : headers\openvr_capi.h:746 */ + public static final int EVRApplicationType_VRApplication_Utility = 4; + /** native declaration : headers\openvr_capi.h:747 */ + public static final int EVRApplicationType_VRApplication_VRMonitor = 5; + /** native declaration : headers\openvr_capi.h:748 */ + public static final int EVRApplicationType_VRApplication_SteamWatchdog = 6; + /** native declaration : headers\openvr_capi.h:749 */ + public static final int EVRApplicationType_VRApplication_Bootstrapper = 7; + /** native declaration : headers\openvr_capi.h:750 */ + public static final int EVRApplicationType_VRApplication_Max = 8; + }; + /** + * native declaration : headers\openvr_capi.h:756
+ * enum values + */ + public static interface EVRFirmwareError { + /** native declaration : headers\openvr_capi.h:753 */ + public static final int EVRFirmwareError_VRFirmwareError_None = 0; + /** native declaration : headers\openvr_capi.h:754 */ + public static final int EVRFirmwareError_VRFirmwareError_Success = 1; + /** native declaration : headers\openvr_capi.h:755 */ + public static final int EVRFirmwareError_VRFirmwareError_Fail = 2; + }; + /** + * native declaration : headers\openvr_capi.h:763
+ * enum values + */ + public static interface EVRNotificationError { + /** native declaration : headers\openvr_capi.h:758 */ + public static final int EVRNotificationError_VRNotificationError_OK = 0; + /** native declaration : headers\openvr_capi.h:759 */ + public static final int EVRNotificationError_VRNotificationError_InvalidNotificationId = 100; + /** native declaration : headers\openvr_capi.h:760 */ + public static final int EVRNotificationError_VRNotificationError_NotificationQueueFull = 101; + /** native declaration : headers\openvr_capi.h:761 */ + public static final int EVRNotificationError_VRNotificationError_InvalidOverlayHandle = 102; + /** native declaration : headers\openvr_capi.h:762 */ + public static final int EVRNotificationError_VRNotificationError_SystemWithUserValueAlreadyExists = 103; + }; + /** + * native declaration : headers\openvr_capi.h:767
+ * enum values + */ + public static interface EVRSkeletalMotionRange { + /** native declaration : headers\openvr_capi.h:765 */ + public static final int EVRSkeletalMotionRange_VRSkeletalMotionRange_WithController = 0; + /** native declaration : headers\openvr_capi.h:766 */ + public static final int EVRSkeletalMotionRange_VRSkeletalMotionRange_WithoutController = 1; + }; + /** + * native declaration : headers\openvr_capi.h:857
+ * enum values + */ + public static interface EVRInitError { + /** native declaration : headers\openvr_capi.h:769 */ + public static final int EVRInitError_VRInitError_None = 0; + /** native declaration : headers\openvr_capi.h:770 */ + public static final int EVRInitError_VRInitError_Unknown = 1; + /** native declaration : headers\openvr_capi.h:771 */ + public static final int EVRInitError_VRInitError_Init_InstallationNotFound = 100; + /** native declaration : headers\openvr_capi.h:772 */ + public static final int EVRInitError_VRInitError_Init_InstallationCorrupt = 101; + /** native declaration : headers\openvr_capi.h:773 */ + public static final int EVRInitError_VRInitError_Init_VRClientDLLNotFound = 102; + /** native declaration : headers\openvr_capi.h:774 */ + public static final int EVRInitError_VRInitError_Init_FileNotFound = 103; + /** native declaration : headers\openvr_capi.h:775 */ + public static final int EVRInitError_VRInitError_Init_FactoryNotFound = 104; + /** native declaration : headers\openvr_capi.h:776 */ + public static final int EVRInitError_VRInitError_Init_InterfaceNotFound = 105; + /** native declaration : headers\openvr_capi.h:777 */ + public static final int EVRInitError_VRInitError_Init_InvalidInterface = 106; + /** native declaration : headers\openvr_capi.h:778 */ + public static final int EVRInitError_VRInitError_Init_UserConfigDirectoryInvalid = 107; + /** native declaration : headers\openvr_capi.h:779 */ + public static final int EVRInitError_VRInitError_Init_HmdNotFound = 108; + /** native declaration : headers\openvr_capi.h:780 */ + public static final int EVRInitError_VRInitError_Init_NotInitialized = 109; + /** native declaration : headers\openvr_capi.h:781 */ + public static final int EVRInitError_VRInitError_Init_PathRegistryNotFound = 110; + /** native declaration : headers\openvr_capi.h:782 */ + public static final int EVRInitError_VRInitError_Init_NoConfigPath = 111; + /** native declaration : headers\openvr_capi.h:783 */ + public static final int EVRInitError_VRInitError_Init_NoLogPath = 112; + /** native declaration : headers\openvr_capi.h:784 */ + public static final int EVRInitError_VRInitError_Init_PathRegistryNotWritable = 113; + /** native declaration : headers\openvr_capi.h:785 */ + public static final int EVRInitError_VRInitError_Init_AppInfoInitFailed = 114; + /** native declaration : headers\openvr_capi.h:786 */ + public static final int EVRInitError_VRInitError_Init_Retry = 115; + /** native declaration : headers\openvr_capi.h:787 */ + public static final int EVRInitError_VRInitError_Init_InitCanceledByUser = 116; + /** native declaration : headers\openvr_capi.h:788 */ + public static final int EVRInitError_VRInitError_Init_AnotherAppLaunching = 117; + /** native declaration : headers\openvr_capi.h:789 */ + public static final int EVRInitError_VRInitError_Init_SettingsInitFailed = 118; + /** native declaration : headers\openvr_capi.h:790 */ + public static final int EVRInitError_VRInitError_Init_ShuttingDown = 119; + /** native declaration : headers\openvr_capi.h:791 */ + public static final int EVRInitError_VRInitError_Init_TooManyObjects = 120; + /** native declaration : headers\openvr_capi.h:792 */ + public static final int EVRInitError_VRInitError_Init_NoServerForBackgroundApp = 121; + /** native declaration : headers\openvr_capi.h:793 */ + public static final int EVRInitError_VRInitError_Init_NotSupportedWithCompositor = 122; + /** native declaration : headers\openvr_capi.h:794 */ + public static final int EVRInitError_VRInitError_Init_NotAvailableToUtilityApps = 123; + /** native declaration : headers\openvr_capi.h:795 */ + public static final int EVRInitError_VRInitError_Init_Internal = 124; + /** native declaration : headers\openvr_capi.h:796 */ + public static final int EVRInitError_VRInitError_Init_HmdDriverIdIsNone = 125; + /** native declaration : headers\openvr_capi.h:797 */ + public static final int EVRInitError_VRInitError_Init_HmdNotFoundPresenceFailed = 126; + /** native declaration : headers\openvr_capi.h:798 */ + public static final int EVRInitError_VRInitError_Init_VRMonitorNotFound = 127; + /** native declaration : headers\openvr_capi.h:799 */ + public static final int EVRInitError_VRInitError_Init_VRMonitorStartupFailed = 128; + /** native declaration : headers\openvr_capi.h:800 */ + public static final int EVRInitError_VRInitError_Init_LowPowerWatchdogNotSupported = 129; + /** native declaration : headers\openvr_capi.h:801 */ + public static final int EVRInitError_VRInitError_Init_InvalidApplicationType = 130; + /** native declaration : headers\openvr_capi.h:802 */ + public static final int EVRInitError_VRInitError_Init_NotAvailableToWatchdogApps = 131; + /** native declaration : headers\openvr_capi.h:803 */ + public static final int EVRInitError_VRInitError_Init_WatchdogDisabledInSettings = 132; + /** native declaration : headers\openvr_capi.h:804 */ + public static final int EVRInitError_VRInitError_Init_VRDashboardNotFound = 133; + /** native declaration : headers\openvr_capi.h:805 */ + public static final int EVRInitError_VRInitError_Init_VRDashboardStartupFailed = 134; + /** native declaration : headers\openvr_capi.h:806 */ + public static final int EVRInitError_VRInitError_Init_VRHomeNotFound = 135; + /** native declaration : headers\openvr_capi.h:807 */ + public static final int EVRInitError_VRInitError_Init_VRHomeStartupFailed = 136; + /** native declaration : headers\openvr_capi.h:808 */ + public static final int EVRInitError_VRInitError_Init_RebootingBusy = 137; + /** native declaration : headers\openvr_capi.h:809 */ + public static final int EVRInitError_VRInitError_Init_FirmwareUpdateBusy = 138; + /** native declaration : headers\openvr_capi.h:810 */ + public static final int EVRInitError_VRInitError_Init_FirmwareRecoveryBusy = 139; + /** native declaration : headers\openvr_capi.h:811 */ + public static final int EVRInitError_VRInitError_Init_USBServiceBusy = 140; + /** native declaration : headers\openvr_capi.h:812 */ + public static final int EVRInitError_VRInitError_Init_VRWebHelperStartupFailed = 141; + /** native declaration : headers\openvr_capi.h:813 */ + public static final int EVRInitError_VRInitError_Init_TrackerManagerInitFailed = 142; + /** native declaration : headers\openvr_capi.h:814 */ + public static final int EVRInitError_VRInitError_Driver_Failed = 200; + /** native declaration : headers\openvr_capi.h:815 */ + public static final int EVRInitError_VRInitError_Driver_Unknown = 201; + /** native declaration : headers\openvr_capi.h:816 */ + public static final int EVRInitError_VRInitError_Driver_HmdUnknown = 202; + /** native declaration : headers\openvr_capi.h:817 */ + public static final int EVRInitError_VRInitError_Driver_NotLoaded = 203; + /** native declaration : headers\openvr_capi.h:818 */ + public static final int EVRInitError_VRInitError_Driver_RuntimeOutOfDate = 204; + /** native declaration : headers\openvr_capi.h:819 */ + public static final int EVRInitError_VRInitError_Driver_HmdInUse = 205; + /** native declaration : headers\openvr_capi.h:820 */ + public static final int EVRInitError_VRInitError_Driver_NotCalibrated = 206; + /** native declaration : headers\openvr_capi.h:821 */ + public static final int EVRInitError_VRInitError_Driver_CalibrationInvalid = 207; + /** native declaration : headers\openvr_capi.h:822 */ + public static final int EVRInitError_VRInitError_Driver_HmdDisplayNotFound = 208; + /** native declaration : headers\openvr_capi.h:823 */ + public static final int EVRInitError_VRInitError_Driver_TrackedDeviceInterfaceUnknown = 209; + /** native declaration : headers\openvr_capi.h:824 */ + public static final int EVRInitError_VRInitError_Driver_HmdDriverIdOutOfBounds = 211; + /** native declaration : headers\openvr_capi.h:825 */ + public static final int EVRInitError_VRInitError_Driver_HmdDisplayMirrored = 212; + /** native declaration : headers\openvr_capi.h:826 */ + public static final int EVRInitError_VRInitError_IPC_ServerInitFailed = 300; + /** native declaration : headers\openvr_capi.h:827 */ + public static final int EVRInitError_VRInitError_IPC_ConnectFailed = 301; + /** native declaration : headers\openvr_capi.h:828 */ + public static final int EVRInitError_VRInitError_IPC_SharedStateInitFailed = 302; + /** native declaration : headers\openvr_capi.h:829 */ + public static final int EVRInitError_VRInitError_IPC_CompositorInitFailed = 303; + /** native declaration : headers\openvr_capi.h:830 */ + public static final int EVRInitError_VRInitError_IPC_MutexInitFailed = 304; + /** native declaration : headers\openvr_capi.h:831 */ + public static final int EVRInitError_VRInitError_IPC_Failed = 305; + /** native declaration : headers\openvr_capi.h:832 */ + public static final int EVRInitError_VRInitError_IPC_CompositorConnectFailed = 306; + /** native declaration : headers\openvr_capi.h:833 */ + public static final int EVRInitError_VRInitError_IPC_CompositorInvalidConnectResponse = 307; + /** native declaration : headers\openvr_capi.h:834 */ + public static final int EVRInitError_VRInitError_IPC_ConnectFailedAfterMultipleAttempts = 308; + /** native declaration : headers\openvr_capi.h:835 */ + public static final int EVRInitError_VRInitError_Compositor_Failed = 400; + /** native declaration : headers\openvr_capi.h:836 */ + public static final int EVRInitError_VRInitError_Compositor_D3D11HardwareRequired = 401; + /** native declaration : headers\openvr_capi.h:837 */ + public static final int EVRInitError_VRInitError_Compositor_FirmwareRequiresUpdate = 402; + /** native declaration : headers\openvr_capi.h:838 */ + public static final int EVRInitError_VRInitError_Compositor_OverlayInitFailed = 403; + /** native declaration : headers\openvr_capi.h:839 */ + public static final int EVRInitError_VRInitError_Compositor_ScreenshotsInitFailed = 404; + /** native declaration : headers\openvr_capi.h:840 */ + public static final int EVRInitError_VRInitError_Compositor_UnableToCreateDevice = 405; + /** native declaration : headers\openvr_capi.h:841 */ + public static final int EVRInitError_VRInitError_VendorSpecific_UnableToConnectToOculusRuntime = 1000; + /** native declaration : headers\openvr_capi.h:842 */ + public static final int EVRInitError_VRInitError_VendorSpecific_WindowsNotInDevMode = 1001; + /** native declaration : headers\openvr_capi.h:843 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_CantOpenDevice = 1101; + /** native declaration : headers\openvr_capi.h:844 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102; + /** native declaration : headers\openvr_capi.h:845 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_NoStoredConfig = 1103; + /** native declaration : headers\openvr_capi.h:846 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooBig = 1104; + /** native declaration : headers\openvr_capi.h:847 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigTooSmall = 1105; + /** native declaration : headers\openvr_capi.h:848 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToInitZLib = 1106; + /** native declaration : headers\openvr_capi.h:849 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107; + /** native declaration : headers\openvr_capi.h:850 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108; + /** native declaration : headers\openvr_capi.h:851 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109; + /** native declaration : headers\openvr_capi.h:852 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110; + /** native declaration : headers\openvr_capi.h:853 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataAddressRange = 1111; + /** native declaration : headers\openvr_capi.h:854 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_UserDataError = 1112; + /** native declaration : headers\openvr_capi.h:855 */ + public static final int EVRInitError_VRInitError_VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113; + /** native declaration : headers\openvr_capi.h:856 */ + public static final int EVRInitError_VRInitError_Steam_SteamInstallationNotFound = 2000; + }; + /** + * native declaration : headers\openvr_capi.h:865
+ * enum values + */ + public static interface EVRScreenshotType { + /** native declaration : headers\openvr_capi.h:859 */ + public static final int EVRScreenshotType_VRScreenshotType_None = 0; + /** native declaration : headers\openvr_capi.h:860 */ + public static final int EVRScreenshotType_VRScreenshotType_Mono = 1; + /** native declaration : headers\openvr_capi.h:861 */ + public static final int EVRScreenshotType_VRScreenshotType_Stereo = 2; + /** native declaration : headers\openvr_capi.h:862 */ + public static final int EVRScreenshotType_VRScreenshotType_Cubemap = 3; + /** native declaration : headers\openvr_capi.h:863 */ + public static final int EVRScreenshotType_VRScreenshotType_MonoPanorama = 4; + /** native declaration : headers\openvr_capi.h:864 */ + public static final int EVRScreenshotType_VRScreenshotType_StereoPanorama = 5; + }; + /** + * native declaration : headers\openvr_capi.h:869
+ * enum values + */ + public static interface EVRScreenshotPropertyFilenames { + /** native declaration : headers\openvr_capi.h:867 */ + public static final int EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_Preview = 0; + /** native declaration : headers\openvr_capi.h:868 */ + public static final int EVRScreenshotPropertyFilenames_VRScreenshotPropertyFilenames_VR = 1; + }; + /** + * native declaration : headers\openvr_capi.h:888
+ * enum values + */ + public static interface EVRTrackedCameraError { + /** native declaration : headers\openvr_capi.h:871 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_None = 0; + /** native declaration : headers\openvr_capi.h:872 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_OperationFailed = 100; + /** native declaration : headers\openvr_capi.h:873 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidHandle = 101; + /** native declaration : headers\openvr_capi.h:874 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidFrameHeaderVersion = 102; + /** native declaration : headers\openvr_capi.h:875 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_OutOfHandles = 103; + /** native declaration : headers\openvr_capi.h:876 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_IPCFailure = 104; + /** native declaration : headers\openvr_capi.h:877 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_NotSupportedForThisDevice = 105; + /** native declaration : headers\openvr_capi.h:878 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_SharedMemoryFailure = 106; + /** native declaration : headers\openvr_capi.h:879 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_FrameBufferingFailure = 107; + /** native declaration : headers\openvr_capi.h:880 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_StreamSetupFailure = 108; + /** native declaration : headers\openvr_capi.h:881 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidGLTextureId = 109; + /** native declaration : headers\openvr_capi.h:882 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidSharedTextureHandle = 110; + /** native declaration : headers\openvr_capi.h:883 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_FailedToGetGLTextureId = 111; + /** native declaration : headers\openvr_capi.h:884 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_SharedTextureFailure = 112; + /** native declaration : headers\openvr_capi.h:885 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_NoFrameAvailable = 113; + /** native declaration : headers\openvr_capi.h:886 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidArgument = 114; + /** native declaration : headers\openvr_capi.h:887 */ + public static final int EVRTrackedCameraError_VRTrackedCameraError_InvalidFrameBufferSize = 115; + }; + /** + * native declaration : headers\openvr_capi.h:894
+ * enum values + */ + public static interface EVRTrackedCameraFrameLayout { + /** native declaration : headers\openvr_capi.h:890 */ + public static final int EVRTrackedCameraFrameLayout_Mono = 1; + /** native declaration : headers\openvr_capi.h:891 */ + public static final int EVRTrackedCameraFrameLayout_Stereo = 2; + /** native declaration : headers\openvr_capi.h:892 */ + public static final int EVRTrackedCameraFrameLayout_VerticalLayout = 16; + /** native declaration : headers\openvr_capi.h:893 */ + public static final int EVRTrackedCameraFrameLayout_HorizontalLayout = 32; + }; + /** + * native declaration : headers\openvr_capi.h:900
+ * enum values + */ + public static interface EVRTrackedCameraFrameType { + /** native declaration : headers\openvr_capi.h:896 */ + public static final int EVRTrackedCameraFrameType_VRTrackedCameraFrameType_Distorted = 0; + /** native declaration : headers\openvr_capi.h:897 */ + public static final int EVRTrackedCameraFrameType_VRTrackedCameraFrameType_Undistorted = 1; + /** native declaration : headers\openvr_capi.h:898 */ + public static final int EVRTrackedCameraFrameType_VRTrackedCameraFrameType_MaximumUndistorted = 2; + /** native declaration : headers\openvr_capi.h:899 */ + public static final int EVRTrackedCameraFrameType_MAX_CAMERA_FRAME_TYPES = 3; + }; + /** + * native declaration : headers\openvr_capi.h:905
+ * enum values + */ + public static interface EVSync { + /** native declaration : headers\openvr_capi.h:902 */ + public static final int EVSync_VSync_None = 0; + /** native declaration : headers\openvr_capi.h:903 */ + public static final int EVSync_VSync_WaitRender = 1; + /** native declaration : headers\openvr_capi.h:904 */ + public static final int EVSync_VSync_NoWaitRender = 2; + }; + /** + * native declaration : headers\openvr_capi.h:909
+ * enum values + */ + public static interface EVRMuraCorrectionMode { + /** native declaration : headers\openvr_capi.h:907 */ + public static final int EVRMuraCorrectionMode_Default = 0; + /** native declaration : headers\openvr_capi.h:908 */ + public static final int EVRMuraCorrectionMode_NoCorrection = 1; + }; + /** + * native declaration : headers\openvr_capi.h:917
+ * enum values + */ + public static interface Imu_OffScaleFlags { + /** native declaration : headers\openvr_capi.h:911 */ + public static final int Imu_OffScaleFlags_OffScale_AccelX = 1; + /** native declaration : headers\openvr_capi.h:912 */ + public static final int Imu_OffScaleFlags_OffScale_AccelY = 2; + /** native declaration : headers\openvr_capi.h:913 */ + public static final int Imu_OffScaleFlags_OffScale_AccelZ = 4; + /** native declaration : headers\openvr_capi.h:914 */ + public static final int Imu_OffScaleFlags_OffScale_GyroX = 8; + /** native declaration : headers\openvr_capi.h:915 */ + public static final int Imu_OffScaleFlags_OffScale_GyroY = 16; + /** native declaration : headers\openvr_capi.h:916 */ + public static final int Imu_OffScaleFlags_OffScale_GyroZ = 32; + }; + /** + * native declaration : headers\openvr_capi.h:940
+ * enum values + */ + public static interface EVRApplicationError { + /** native declaration : headers\openvr_capi.h:919 */ + public static final int EVRApplicationError_VRApplicationError_None = 0; + /** native declaration : headers\openvr_capi.h:920 */ + public static final int EVRApplicationError_VRApplicationError_AppKeyAlreadyExists = 100; + /** native declaration : headers\openvr_capi.h:921 */ + public static final int EVRApplicationError_VRApplicationError_NoManifest = 101; + /** native declaration : headers\openvr_capi.h:922 */ + public static final int EVRApplicationError_VRApplicationError_NoApplication = 102; + /** native declaration : headers\openvr_capi.h:923 */ + public static final int EVRApplicationError_VRApplicationError_InvalidIndex = 103; + /** native declaration : headers\openvr_capi.h:924 */ + public static final int EVRApplicationError_VRApplicationError_UnknownApplication = 104; + /** native declaration : headers\openvr_capi.h:925 */ + public static final int EVRApplicationError_VRApplicationError_IPCFailed = 105; + /** native declaration : headers\openvr_capi.h:926 */ + public static final int EVRApplicationError_VRApplicationError_ApplicationAlreadyRunning = 106; + /** native declaration : headers\openvr_capi.h:927 */ + public static final int EVRApplicationError_VRApplicationError_InvalidManifest = 107; + /** native declaration : headers\openvr_capi.h:928 */ + public static final int EVRApplicationError_VRApplicationError_InvalidApplication = 108; + /** native declaration : headers\openvr_capi.h:929 */ + public static final int EVRApplicationError_VRApplicationError_LaunchFailed = 109; + /** native declaration : headers\openvr_capi.h:930 */ + public static final int EVRApplicationError_VRApplicationError_ApplicationAlreadyStarting = 110; + /** native declaration : headers\openvr_capi.h:931 */ + public static final int EVRApplicationError_VRApplicationError_LaunchInProgress = 111; + /** native declaration : headers\openvr_capi.h:932 */ + public static final int EVRApplicationError_VRApplicationError_OldApplicationQuitting = 112; + /** native declaration : headers\openvr_capi.h:933 */ + public static final int EVRApplicationError_VRApplicationError_TransitionAborted = 113; + /** native declaration : headers\openvr_capi.h:934 */ + public static final int EVRApplicationError_VRApplicationError_IsTemplate = 114; + /** native declaration : headers\openvr_capi.h:935 */ + public static final int EVRApplicationError_VRApplicationError_SteamVRIsExiting = 115; + /** native declaration : headers\openvr_capi.h:936 */ + public static final int EVRApplicationError_VRApplicationError_BufferTooSmall = 200; + /** native declaration : headers\openvr_capi.h:937 */ + public static final int EVRApplicationError_VRApplicationError_PropertyNotSet = 201; + /** native declaration : headers\openvr_capi.h:938 */ + public static final int EVRApplicationError_VRApplicationError_UnknownProperty = 202; + /** native declaration : headers\openvr_capi.h:939 */ + public static final int EVRApplicationError_VRApplicationError_InvalidParameter = 203; + }; + /** + * native declaration : headers\openvr_capi.h:959
+ * enum values + */ + public static interface EVRApplicationProperty { + /** native declaration : headers\openvr_capi.h:942 */ + public static final int EVRApplicationProperty_VRApplicationProperty_Name_String = 0; + /** native declaration : headers\openvr_capi.h:943 */ + public static final int EVRApplicationProperty_VRApplicationProperty_LaunchType_String = 11; + /** native declaration : headers\openvr_capi.h:944 */ + public static final int EVRApplicationProperty_VRApplicationProperty_WorkingDirectory_String = 12; + /** native declaration : headers\openvr_capi.h:945 */ + public static final int EVRApplicationProperty_VRApplicationProperty_BinaryPath_String = 13; + /** native declaration : headers\openvr_capi.h:946 */ + public static final int EVRApplicationProperty_VRApplicationProperty_Arguments_String = 14; + /** native declaration : headers\openvr_capi.h:947 */ + public static final int EVRApplicationProperty_VRApplicationProperty_URL_String = 15; + /** native declaration : headers\openvr_capi.h:948 */ + public static final int EVRApplicationProperty_VRApplicationProperty_Description_String = 50; + /** native declaration : headers\openvr_capi.h:949 */ + public static final int EVRApplicationProperty_VRApplicationProperty_NewsURL_String = 51; + /** native declaration : headers\openvr_capi.h:950 */ + public static final int EVRApplicationProperty_VRApplicationProperty_ImagePath_String = 52; + /** native declaration : headers\openvr_capi.h:951 */ + public static final int EVRApplicationProperty_VRApplicationProperty_Source_String = 53; + /** native declaration : headers\openvr_capi.h:952 */ + public static final int EVRApplicationProperty_VRApplicationProperty_ActionManifestURL_String = 54; + /** native declaration : headers\openvr_capi.h:953 */ + public static final int EVRApplicationProperty_VRApplicationProperty_IsDashboardOverlay_Bool = 60; + /** native declaration : headers\openvr_capi.h:954 */ + public static final int EVRApplicationProperty_VRApplicationProperty_IsTemplate_Bool = 61; + /** native declaration : headers\openvr_capi.h:955 */ + public static final int EVRApplicationProperty_VRApplicationProperty_IsInstanced_Bool = 62; + /** native declaration : headers\openvr_capi.h:956 */ + public static final int EVRApplicationProperty_VRApplicationProperty_IsInternal_Bool = 63; + /** native declaration : headers\openvr_capi.h:957 */ + public static final int EVRApplicationProperty_VRApplicationProperty_WantsCompositorPauseInStandby_Bool = 64; + /** native declaration : headers\openvr_capi.h:958 */ + public static final int EVRApplicationProperty_VRApplicationProperty_LastLaunchTime_Uint64 = 70; + }; + /** + * native declaration : headers\openvr_capi.h:965
+ * enum values + */ + public static interface EVRApplicationTransitionState { + /** native declaration : headers\openvr_capi.h:961 */ + public static final int EVRApplicationTransitionState_VRApplicationTransition_None = 0; + /** native declaration : headers\openvr_capi.h:962 */ + public static final int EVRApplicationTransitionState_VRApplicationTransition_OldAppQuitSent = 10; + /** native declaration : headers\openvr_capi.h:963 */ + public static final int EVRApplicationTransitionState_VRApplicationTransition_WaitingForExternalLaunch = 11; + /** native declaration : headers\openvr_capi.h:964 */ + public static final int EVRApplicationTransitionState_VRApplicationTransition_NewAppLaunched = 20; + }; + /** + * native declaration : headers\openvr_capi.h:977
+ * enum values + */ + public static interface ChaperoneCalibrationState { + /** native declaration : headers\openvr_capi.h:967 */ + public static final int ChaperoneCalibrationState_OK = 1; + /** native declaration : headers\openvr_capi.h:968 */ + public static final int ChaperoneCalibrationState_Warning = 100; + /** native declaration : headers\openvr_capi.h:969 */ + public static final int ChaperoneCalibrationState_Warning_BaseStationMayHaveMoved = 101; + /** native declaration : headers\openvr_capi.h:970 */ + public static final int ChaperoneCalibrationState_Warning_BaseStationRemoved = 102; + /** native declaration : headers\openvr_capi.h:971 */ + public static final int ChaperoneCalibrationState_Warning_SeatedBoundsInvalid = 103; + /** native declaration : headers\openvr_capi.h:972 */ + public static final int ChaperoneCalibrationState_Error = 200; + /** native declaration : headers\openvr_capi.h:973 */ + public static final int ChaperoneCalibrationState_Error_BaseStationUninitialized = 201; + /** native declaration : headers\openvr_capi.h:974 */ + public static final int ChaperoneCalibrationState_Error_BaseStationConflict = 202; + /** native declaration : headers\openvr_capi.h:975 */ + public static final int ChaperoneCalibrationState_Error_PlayAreaInvalid = 203; + /** native declaration : headers\openvr_capi.h:976 */ + public static final int ChaperoneCalibrationState_Error_CollisionBoundsInvalid = 204; + }; + /** + * native declaration : headers\openvr_capi.h:981
+ * enum values + */ + public static interface EChaperoneConfigFile { + /** native declaration : headers\openvr_capi.h:979 */ + public static final int EChaperoneConfigFile_Live = 1; + /** native declaration : headers\openvr_capi.h:980 */ + public static final int EChaperoneConfigFile_Temp = 2; + }; + /** + * native declaration : headers\openvr_capi.h:984
+ * enum values + */ + public static interface EChaperoneImportFlags { + /** native declaration : headers\openvr_capi.h:983 */ + public static final int EChaperoneImportFlags_EChaperoneImport_BoundsOnly = 1; + }; + /** + * native declaration : headers\openvr_capi.h:998
+ * enum values + */ + public static interface EVRCompositorError { + /** native declaration : headers\openvr_capi.h:986 */ + public static final int EVRCompositorError_VRCompositorError_None = 0; + /** native declaration : headers\openvr_capi.h:987 */ + public static final int EVRCompositorError_VRCompositorError_RequestFailed = 1; + /** native declaration : headers\openvr_capi.h:988 */ + public static final int EVRCompositorError_VRCompositorError_IncompatibleVersion = 100; + /** native declaration : headers\openvr_capi.h:989 */ + public static final int EVRCompositorError_VRCompositorError_DoNotHaveFocus = 101; + /** native declaration : headers\openvr_capi.h:990 */ + public static final int EVRCompositorError_VRCompositorError_InvalidTexture = 102; + /** native declaration : headers\openvr_capi.h:991 */ + public static final int EVRCompositorError_VRCompositorError_IsNotSceneApplication = 103; + /** native declaration : headers\openvr_capi.h:992 */ + public static final int EVRCompositorError_VRCompositorError_TextureIsOnWrongDevice = 104; + /** native declaration : headers\openvr_capi.h:993 */ + public static final int EVRCompositorError_VRCompositorError_TextureUsesUnsupportedFormat = 105; + /** native declaration : headers\openvr_capi.h:994 */ + public static final int EVRCompositorError_VRCompositorError_SharedTexturesNotSupported = 106; + /** native declaration : headers\openvr_capi.h:995 */ + public static final int EVRCompositorError_VRCompositorError_IndexOutOfRange = 107; + /** native declaration : headers\openvr_capi.h:996 */ + public static final int EVRCompositorError_VRCompositorError_AlreadySubmitted = 108; + /** native declaration : headers\openvr_capi.h:997 */ + public static final int EVRCompositorError_VRCompositorError_InvalidBounds = 109; + }; + /** + * native declaration : headers\openvr_capi.h:1003
+ * enum values + */ + public static interface EVRCompositorTimingMode { + /** native declaration : headers\openvr_capi.h:1000 */ + public static final int EVRCompositorTimingMode_VRCompositorTimingMode_Implicit = 0; + /** native declaration : headers\openvr_capi.h:1001 */ + public static final int EVRCompositorTimingMode_VRCompositorTimingMode_Explicit_RuntimePerformsPostPresentHandoff = 1; + /** native declaration : headers\openvr_capi.h:1002 */ + public static final int EVRCompositorTimingMode_VRCompositorTimingMode_Explicit_ApplicationPerformsPostPresentHandoff = 2; + }; + /** + * native declaration : headers\openvr_capi.h:1008
+ * enum values + */ + public static interface VROverlayInputMethod { + /** native declaration : headers\openvr_capi.h:1005 */ + public static final int VROverlayInputMethod_None = 0; + /** native declaration : headers\openvr_capi.h:1006 */ + public static final int VROverlayInputMethod_Mouse = 1; + /** native declaration : headers\openvr_capi.h:1007 */ + public static final int VROverlayInputMethod_DualAnalog = 2; + }; + /** + * native declaration : headers\openvr_capi.h:1014
+ * enum values + */ + public static interface VROverlayTransformType { + /** native declaration : headers\openvr_capi.h:1010 */ + public static final int VROverlayTransformType_VROverlayTransform_Absolute = 0; + /** native declaration : headers\openvr_capi.h:1011 */ + public static final int VROverlayTransformType_VROverlayTransform_TrackedDeviceRelative = 1; + /** native declaration : headers\openvr_capi.h:1012 */ + public static final int VROverlayTransformType_VROverlayTransform_SystemOverlay = 2; + /** native declaration : headers\openvr_capi.h:1013 */ + public static final int VROverlayTransformType_VROverlayTransform_TrackedComponent = 3; + }; + /** + * native declaration : headers\openvr_capi.h:1032
+ * enum values + */ + public static interface VROverlayFlags { + /** native declaration : headers\openvr_capi.h:1016 */ + public static final int VROverlayFlags_None = 0; + /** native declaration : headers\openvr_capi.h:1017 */ + public static final int VROverlayFlags_Curved = 1; + /** native declaration : headers\openvr_capi.h:1018 */ + public static final int VROverlayFlags_RGSS4X = 2; + /** native declaration : headers\openvr_capi.h:1019 */ + public static final int VROverlayFlags_NoDashboardTab = 3; + /** native declaration : headers\openvr_capi.h:1020 */ + public static final int VROverlayFlags_AcceptsGamepadEvents = 4; + /** native declaration : headers\openvr_capi.h:1021 */ + public static final int VROverlayFlags_ShowGamepadFocus = 5; + /** native declaration : headers\openvr_capi.h:1022 */ + public static final int VROverlayFlags_SendVRScrollEvents = 6; + /** native declaration : headers\openvr_capi.h:1023 */ + public static final int VROverlayFlags_SendVRTouchpadEvents = 7; + /** native declaration : headers\openvr_capi.h:1024 */ + public static final int VROverlayFlags_ShowTouchPadScrollWheel = 8; + /** native declaration : headers\openvr_capi.h:1025 */ + public static final int VROverlayFlags_TransferOwnershipToInternalProcess = 9; + /** native declaration : headers\openvr_capi.h:1026 */ + public static final int VROverlayFlags_SideBySide_Parallel = 10; + /** native declaration : headers\openvr_capi.h:1027 */ + public static final int VROverlayFlags_SideBySide_Crossed = 11; + /** native declaration : headers\openvr_capi.h:1028 */ + public static final int VROverlayFlags_Panorama = 12; + /** native declaration : headers\openvr_capi.h:1029 */ + public static final int VROverlayFlags_StereoPanorama = 13; + /** native declaration : headers\openvr_capi.h:1030 */ + public static final int VROverlayFlags_SortWithNonSceneOverlays = 14; + /** native declaration : headers\openvr_capi.h:1031 */ + public static final int VROverlayFlags_VisibleInDashboard = 15; + }; + /** + * native declaration : headers\openvr_capi.h:1041
+ * enum values + */ + public static interface VRMessageOverlayResponse { + /** native declaration : headers\openvr_capi.h:1034 */ + public static final int VRMessageOverlayResponse_ButtonPress_0 = 0; + /** native declaration : headers\openvr_capi.h:1035 */ + public static final int VRMessageOverlayResponse_ButtonPress_1 = 1; + /** native declaration : headers\openvr_capi.h:1036 */ + public static final int VRMessageOverlayResponse_ButtonPress_2 = 2; + /** native declaration : headers\openvr_capi.h:1037 */ + public static final int VRMessageOverlayResponse_ButtonPress_3 = 3; + /** native declaration : headers\openvr_capi.h:1038 */ + public static final int VRMessageOverlayResponse_CouldntFindSystemOverlay = 4; + /** native declaration : headers\openvr_capi.h:1039 */ + public static final int VRMessageOverlayResponse_CouldntFindOrCreateClientOverlay = 5; + /** native declaration : headers\openvr_capi.h:1040 */ + public static final int VRMessageOverlayResponse_ApplicationQuit = 6; + }; + /** + * native declaration : headers\openvr_capi.h:1046
+ * enum values + */ + public static interface EGamepadTextInputMode { + /** native declaration : headers\openvr_capi.h:1043 */ + public static final int EGamepadTextInputMode_k_EGamepadTextInputModeNormal = 0; + /** native declaration : headers\openvr_capi.h:1044 */ + public static final int EGamepadTextInputMode_k_EGamepadTextInputModePassword = 1; + /** native declaration : headers\openvr_capi.h:1045 */ + public static final int EGamepadTextInputMode_k_EGamepadTextInputModeSubmit = 2; + }; + /** + * native declaration : headers\openvr_capi.h:1050
+ * enum values + */ + public static interface EGamepadTextInputLineMode { + /** native declaration : headers\openvr_capi.h:1048 */ + public static final int EGamepadTextInputLineMode_k_EGamepadTextInputLineModeSingleLine = 0; + /** native declaration : headers\openvr_capi.h:1049 */ + public static final int EGamepadTextInputLineMode_k_EGamepadTextInputLineModeMultipleLines = 1; + }; + /** + * native declaration : headers\openvr_capi.h:1057
+ * enum values + */ + public static interface EOverlayDirection { + /** native declaration : headers\openvr_capi.h:1052 */ + public static final int EOverlayDirection_OverlayDirection_Up = 0; + /** native declaration : headers\openvr_capi.h:1053 */ + public static final int EOverlayDirection_OverlayDirection_Down = 1; + /** native declaration : headers\openvr_capi.h:1054 */ + public static final int EOverlayDirection_OverlayDirection_Left = 2; + /** native declaration : headers\openvr_capi.h:1055 */ + public static final int EOverlayDirection_OverlayDirection_Right = 3; + /** native declaration : headers\openvr_capi.h:1056 */ + public static final int EOverlayDirection_OverlayDirection_Count = 4; + }; + /** + * native declaration : headers\openvr_capi.h:1061
+ * enum values + */ + public static interface EVROverlayIntersectionMaskPrimitiveType { + /** native declaration : headers\openvr_capi.h:1059 */ + public static final int EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Rectangle = 0; + /** native declaration : headers\openvr_capi.h:1060 */ + public static final int EVROverlayIntersectionMaskPrimitiveType_OverlayIntersectionPrimitiveType_Circle = 1; + }; + /** + * native declaration : headers\openvr_capi.h:1076
+ * enum values + */ + public static interface EVRRenderModelError { + /** native declaration : headers\openvr_capi.h:1063 */ + public static final int EVRRenderModelError_VRRenderModelError_None = 0; + /** native declaration : headers\openvr_capi.h:1064 */ + public static final int EVRRenderModelError_VRRenderModelError_Loading = 100; + /** native declaration : headers\openvr_capi.h:1065 */ + public static final int EVRRenderModelError_VRRenderModelError_NotSupported = 200; + /** native declaration : headers\openvr_capi.h:1066 */ + public static final int EVRRenderModelError_VRRenderModelError_InvalidArg = 300; + /** native declaration : headers\openvr_capi.h:1067 */ + public static final int EVRRenderModelError_VRRenderModelError_InvalidModel = 301; + /** native declaration : headers\openvr_capi.h:1068 */ + public static final int EVRRenderModelError_VRRenderModelError_NoShapes = 302; + /** native declaration : headers\openvr_capi.h:1069 */ + public static final int EVRRenderModelError_VRRenderModelError_MultipleShapes = 303; + /** native declaration : headers\openvr_capi.h:1070 */ + public static final int EVRRenderModelError_VRRenderModelError_TooManyVertices = 304; + /** native declaration : headers\openvr_capi.h:1071 */ + public static final int EVRRenderModelError_VRRenderModelError_MultipleTextures = 305; + /** native declaration : headers\openvr_capi.h:1072 */ + public static final int EVRRenderModelError_VRRenderModelError_BufferTooSmall = 306; + /** native declaration : headers\openvr_capi.h:1073 */ + public static final int EVRRenderModelError_VRRenderModelError_NotEnoughNormals = 307; + /** native declaration : headers\openvr_capi.h:1074 */ + public static final int EVRRenderModelError_VRRenderModelError_NotEnoughTexCoords = 308; + /** native declaration : headers\openvr_capi.h:1075 */ + public static final int EVRRenderModelError_VRRenderModelError_InvalidTexture = 400; + }; + /** + * native declaration : headers\openvr_capi.h:1083
+ * enum values + */ + public static interface EVRComponentProperty { + /** native declaration : headers\openvr_capi.h:1078 */ + public static final int EVRComponentProperty_VRComponentProperty_IsStatic = 1; + /** native declaration : headers\openvr_capi.h:1079 */ + public static final int EVRComponentProperty_VRComponentProperty_IsVisible = 2; + /** native declaration : headers\openvr_capi.h:1080 */ + public static final int EVRComponentProperty_VRComponentProperty_IsTouched = 4; + /** native declaration : headers\openvr_capi.h:1081 */ + public static final int EVRComponentProperty_VRComponentProperty_IsPressed = 8; + /** native declaration : headers\openvr_capi.h:1082 */ + public static final int EVRComponentProperty_VRComponentProperty_IsScrolled = 16; + }; + /** + * native declaration : headers\openvr_capi.h:1088
+ * enum values + */ + public static interface EVRNotificationType { + /** native declaration : headers\openvr_capi.h:1085 */ + public static final int EVRNotificationType_Transient = 0; + /** native declaration : headers\openvr_capi.h:1086 */ + public static final int EVRNotificationType_Persistent = 1; + /** native declaration : headers\openvr_capi.h:1087 */ + public static final int EVRNotificationType_Transient_SystemWithUserValue = 2; + }; + /** + * native declaration : headers\openvr_capi.h:1095
+ * enum values + */ + public static interface EVRNotificationStyle { + /** native declaration : headers\openvr_capi.h:1090 */ + public static final int EVRNotificationStyle_None = 0; + /** native declaration : headers\openvr_capi.h:1091 */ + public static final int EVRNotificationStyle_Application = 100; + /** native declaration : headers\openvr_capi.h:1092 */ + public static final int EVRNotificationStyle_Contact_Disabled = 200; + /** native declaration : headers\openvr_capi.h:1093 */ + public static final int EVRNotificationStyle_Contact_Enabled = 201; + /** native declaration : headers\openvr_capi.h:1094 */ + public static final int EVRNotificationStyle_Contact_Active = 202; + }; + /** + * native declaration : headers\openvr_capi.h:1103
+ * enum values + */ + public static interface EVRSettingsError { + /** native declaration : headers\openvr_capi.h:1097 */ + public static final int EVRSettingsError_VRSettingsError_None = 0; + /** native declaration : headers\openvr_capi.h:1098 */ + public static final int EVRSettingsError_VRSettingsError_IPCFailed = 1; + /** native declaration : headers\openvr_capi.h:1099 */ + public static final int EVRSettingsError_VRSettingsError_WriteFailed = 2; + /** native declaration : headers\openvr_capi.h:1100 */ + public static final int EVRSettingsError_VRSettingsError_ReadFailed = 3; + /** native declaration : headers\openvr_capi.h:1101 */ + public static final int EVRSettingsError_VRSettingsError_JsonParseFailed = 4; + /** native declaration : headers\openvr_capi.h:1102 */ + public static final int EVRSettingsError_VRSettingsError_UnsetSettingHasNoDefault = 5; + }; + /** + * native declaration : headers\openvr_capi.h:1111
+ * enum values + */ + public static interface EVRScreenshotError { + /** native declaration : headers\openvr_capi.h:1105 */ + public static final int EVRScreenshotError_VRScreenshotError_None = 0; + /** native declaration : headers\openvr_capi.h:1106 */ + public static final int EVRScreenshotError_VRScreenshotError_RequestFailed = 1; + /** native declaration : headers\openvr_capi.h:1107 */ + public static final int EVRScreenshotError_VRScreenshotError_IncompatibleVersion = 100; + /** native declaration : headers\openvr_capi.h:1108 */ + public static final int EVRScreenshotError_VRScreenshotError_NotFound = 101; + /** native declaration : headers\openvr_capi.h:1109 */ + public static final int EVRScreenshotError_VRScreenshotError_BufferTooSmall = 102; + /** native declaration : headers\openvr_capi.h:1110 */ + public static final int EVRScreenshotError_VRScreenshotError_ScreenshotAlreadyInProgress = 108; + }; + /** + * native declaration : headers\openvr_capi.h:1116
+ * enum values + */ + public static interface EVRSkeletalTransformSpace { + /** native declaration : headers\openvr_capi.h:1113 */ + public static final int EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Model = 0; + /** native declaration : headers\openvr_capi.h:1114 */ + public static final int EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Parent = 1; + /** native declaration : headers\openvr_capi.h:1115 */ + public static final int EVRSkeletalTransformSpace_VRSkeletalTransformSpace_Additive = 2; + }; + /** + * native declaration : headers\openvr_capi.h:1120
+ * enum values + */ + public static interface EVRInputFilterCancelType { + /** native declaration : headers\openvr_capi.h:1118 */ + public static final int EVRInputFilterCancelType_VRInputFilterCancel_Timers = 0; + /** native declaration : headers\openvr_capi.h:1119 */ + public static final int EVRInputFilterCancelType_VRInputFilterCancel_Momentum = 1; + }; + /** + * native declaration : headers\openvr_capi.h:1129
+ * enum values + */ + public static interface EIOBufferError { + /** native declaration : headers\openvr_capi.h:1122 */ + public static final int EIOBufferError_IOBuffer_Success = 0; + /** native declaration : headers\openvr_capi.h:1123 */ + public static final int EIOBufferError_IOBuffer_OperationFailed = 100; + /** native declaration : headers\openvr_capi.h:1124 */ + public static final int EIOBufferError_IOBuffer_InvalidHandle = 101; + /** native declaration : headers\openvr_capi.h:1125 */ + public static final int EIOBufferError_IOBuffer_InvalidArgument = 102; + /** native declaration : headers\openvr_capi.h:1126 */ + public static final int EIOBufferError_IOBuffer_PathExists = 103; + /** native declaration : headers\openvr_capi.h:1127 */ + public static final int EIOBufferError_IOBuffer_PathDoesNotExist = 104; + /** native declaration : headers\openvr_capi.h:1128 */ + public static final int EIOBufferError_IOBuffer_Permission = 105; + }; + /** + * native declaration : headers\openvr_capi.h:1134
+ * enum values + */ + public static interface EIOBufferMode { + /** native declaration : headers\openvr_capi.h:1131 */ + public static final int EIOBufferMode_IOBufferMode_Read = 1; + /** native declaration : headers\openvr_capi.h:1132 */ + public static final int EIOBufferMode_IOBufferMode_Write = 2; + /** native declaration : headers\openvr_capi.h:1133 */ + public static final int EIOBufferMode_IOBufferMode_Create = 512; + }; + /** OpenVR Constants */ + public static final long k_nDriverNone = 4294967295L; + public static final int k_unMaxDriverDebugResponseSize = 32768; + public static final int k_unTrackedDeviceIndex_Hmd = 0; + public static final int k_unMaxTrackedDeviceCount = 64; + public static final int k_unTrackedDeviceIndexOther = -2; + public static final long k_unTrackedDeviceIndexInvalid = 4294967295L; + public static final long k_ulInvalidPropertyContainer = 0; + public static final int k_unInvalidPropertyTag = 0; + public static final long k_ulInvalidDriverHandle = 0; + public static final int k_unFloatPropertyTag = 1; + public static final int k_unInt32PropertyTag = 2; + public static final int k_unUint64PropertyTag = 3; + public static final int k_unBoolPropertyTag = 4; + public static final int k_unStringPropertyTag = 5; + public static final int k_unHmdMatrix34PropertyTag = 20; + public static final int k_unHmdMatrix44PropertyTag = 21; + public static final int k_unHmdVector3PropertyTag = 22; + public static final int k_unHmdVector4PropertyTag = 23; + public static final int k_unHiddenAreaPropertyTag = 30; + public static final int k_unPathHandleInfoTag = 31; + public static final int k_unActionPropertyTag = 32; + public static final int k_unInputValuePropertyTag = 33; + public static final int k_unWildcardPropertyTag = 34; + public static final int k_unHapticVibrationPropertyTag = 35; + public static final int k_unSkeletonPropertyTag = 36; + public static final int k_unSpatialAnchorPosePropertyTag = 40; + public static final int k_unOpenVRInternalReserved_Start = 1000; + public static final int k_unOpenVRInternalReserved_End = 10000; + public static final int k_unMaxPropertyStringSize = 32768; + public static final long k_ulInvalidActionHandle = 0; + public static final long k_ulInvalidActionSetHandle = 0; + public static final long k_ulInvalidInputValueHandle = 0; + public static final int k_unControllerStateAxisCount = 5; + public static final long k_ulOverlayHandleInvalid = 0; + public static final int k_unScreenshotHandleInvalid = 0; + public static final int k_unMaxApplicationKeyLength = 128; + public static final int k_unVROverlayMaxKeyLength = 128; + public static final int k_unVROverlayMaxNameLength = 128; + public static final int k_unMaxOverlayCount = 64; + public static final int k_unMaxOverlayIntersectionMaskPrimitivesCount = 32; + public static final int k_unNotificationTextMaxSize = 256; + public static final int k_unMaxSettingsKeyLength = 128; + public static final int k_unMaxActionNameLength = 64; + public static final int k_unMaxActionSetNameLength = 64; + public static final int k_unMaxActionOriginCount = 16; + public static final long k_ulInvalidIOBufferHandle = 0; + public static final int k_ulInvalidSpatialAnchorHandle = 0; + + + public static final String IVRSystem_Version = "IVRSystem_019"; + public static final String IVRExtendedDisplay_Version = "IVRExtendedDisplay_001"; + public static final String IVRTrackedCamera_Version = "IVRTrackedCamera_003"; + public static final String k_pch_MimeType_HomeApp = "vr/home"; + public static final String k_pch_MimeType_GameTheater = "vr/game_theater"; + public static final String IVRApplications_Version = "IVRApplications_006"; + public static final String IVRChaperone_Version = "IVRChaperone_003"; + public static final String IVRChaperoneSetup_Version = "IVRChaperoneSetup_005"; + public static final String IVRCompositor_Version = "IVRCompositor_022"; + public static final String IVROverlay_Version = "IVROverlay_018"; + public static final String k_pch_Controller_Component_GDC2015 = "gdc2015"; + public static final String k_pch_Controller_Component_Base = "base"; + public static final String k_pch_Controller_Component_Tip = "tip"; + public static final String k_pch_Controller_Component_HandGrip = "handgrip"; + public static final String k_pch_Controller_Component_Status = "status"; + public static final String IVRRenderModels_Version = "IVRRenderModels_006"; + public static final String IVRNotifications_Version = "IVRNotifications_002"; + public static final String IVRSettings_Version = "IVRSettings_002"; + public static final String k_pch_SteamVR_Section = "steamvr"; + public static final String k_pch_SteamVR_RequireHmd_String = "requireHmd"; + public static final String k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver"; + public static final String k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd"; + public static final String k_pch_SteamVR_DisplayDebug_Bool = "displayDebug"; + public static final String k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe"; + public static final String k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX"; + public static final String k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY"; + public static final String k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps"; + public static final String k_pch_SteamVR_LogLevel_Int32 = "loglevel"; + public static final String k_pch_SteamVR_IPD_Float = "ipd"; + public static final String k_pch_SteamVR_Background_String = "background"; + public static final String k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection"; + public static final String k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight"; + public static final String k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius"; + public static final String k_pch_SteamVR_GridColor_String = "gridColor"; + public static final String k_pch_SteamVR_PlayAreaColor_String = "playAreaColor"; + public static final String k_pch_SteamVR_ShowStage_Bool = "showStage"; + public static final String k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers"; + public static final String k_pch_SteamVR_DirectMode_Bool = "directMode"; + public static final String k_pch_SteamVR_DirectModeEdidVid_Int32 = "directModeEdidVid"; + public static final String k_pch_SteamVR_DirectModeEdidPid_Int32 = "directModeEdidPid"; + public static final String k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers"; + public static final String k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees"; + public static final String k_pch_SteamVR_BaseStationPowerManagement_Bool = "basestationPowerManagement"; + public static final String k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses"; + public static final String k_pch_SteamVR_SupersampleScale_Float = "supersampleScale"; + public static final String k_pch_SteamVR_AllowAsyncReprojection_Bool = "allowAsyncReprojection"; + public static final String k_pch_SteamVR_AllowReprojection_Bool = "allowInterleavedReprojection"; + public static final String k_pch_SteamVR_ForceReprojection_Bool = "forceReprojection"; + public static final String k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking"; + public static final String k_pch_SteamVR_DefaultMirrorView_Int32 = "defaultMirrorView"; + public static final String k_pch_SteamVR_ShowMirrorView_Bool = "showMirrorView"; + public static final String k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry"; + public static final String k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch"; + public static final String k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch"; + public static final String k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch"; + public static final String k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard"; + public static final String k_pch_SteamVR_EnableHomeApp = "enableHomeApp"; + public static final String k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec"; + public static final String k_pch_SteamVR_RetailDemo_Bool = "retailDemo"; + public static final String k_pch_SteamVR_IpdOffset_Float = "ipdOffset"; + public static final String k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering"; + public static final String k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride"; + public static final String k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync"; + public static final String k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode"; + public static final String k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver"; + public static final String k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor"; + public static final String k_pch_SteamVR_DebugInput = "debugInput"; + public static final String k_pch_SteamVR_LegacyInputRebinding = "legacyInputRebinding"; + public static final String k_pch_SteamVR_DebugInputBinding = "debugInputBinding"; + public static final String k_pch_SteamVR_InputBindingUIBlock = "inputBindingUI"; + public static final String k_pch_SteamVR_RenderCameraMode = "renderCameraMode"; + public static final String k_pch_Lighthouse_Section = "driver_lighthouse"; + public static final String k_pch_Lighthouse_DisableIMU_Bool = "disableimu"; + public static final String k_pch_Lighthouse_DisableIMUExceptHMD_Bool = "disableimuexcepthmd"; + public static final String k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation"; + public static final String k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug"; + public static final String k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation"; + public static final String k_pch_Lighthouse_DBHistory_Bool = "dbhistory"; + public static final String k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth"; + public static final String k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations"; + public static final String k_pch_Null_Section = "driver_null"; + public static final String k_pch_Null_SerialNumber_String = "serialNumber"; + public static final String k_pch_Null_ModelNumber_String = "modelNumber"; + public static final String k_pch_Null_WindowX_Int32 = "windowX"; + public static final String k_pch_Null_WindowY_Int32 = "windowY"; + public static final String k_pch_Null_WindowWidth_Int32 = "windowWidth"; + public static final String k_pch_Null_WindowHeight_Int32 = "windowHeight"; + public static final String k_pch_Null_RenderWidth_Int32 = "renderWidth"; + public static final String k_pch_Null_RenderHeight_Int32 = "renderHeight"; + public static final String k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons"; + public static final String k_pch_Null_DisplayFrequency_Float = "displayFrequency"; + public static final String k_pch_UserInterface_Section = "userinterface"; + public static final String k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop"; + public static final String k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray"; + public static final String k_pch_UserInterface_Screenshots_Bool = "screenshots"; + public static final String k_pch_UserInterface_ScreenshotType_Int = "screenshotType"; + public static final String k_pch_Notifications_Section = "notifications"; + public static final String k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb"; + public static final String k_pch_Keyboard_Section = "keyboard"; + public static final String k_pch_Keyboard_TutorialCompletions = "TutorialCompletions"; + public static final String k_pch_Keyboard_ScaleX = "ScaleX"; + public static final String k_pch_Keyboard_ScaleY = "ScaleY"; + public static final String k_pch_Keyboard_OffsetLeftX = "OffsetLeftX"; + public static final String k_pch_Keyboard_OffsetRightX = "OffsetRightX"; + public static final String k_pch_Keyboard_OffsetY = "OffsetY"; + public static final String k_pch_Keyboard_Smoothing = "Smoothing"; + public static final String k_pch_Perf_Section = "perfcheck"; + public static final String k_pch_Perf_HeuristicActive_Bool = "heuristicActive"; + public static final String k_pch_Perf_NotifyInHMD_Bool = "warnInHMD"; + public static final String k_pch_Perf_NotifyOnlyOnce_Bool = "warnOnlyOnce"; + public static final String k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore"; + public static final String k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit"; + public static final String k_pch_Perf_TestData_Float = "perfTestData"; + public static final String k_pch_Perf_LinuxGPUProfiling_Bool = "linuxGPUProfiling"; + public static final String k_pch_CollisionBounds_Section = "collisionBounds"; + public static final String k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle"; + public static final String k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn"; + public static final String k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn"; + public static final String k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn"; + public static final String k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance"; + public static final String k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR"; + public static final String k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG"; + public static final String k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB"; + public static final String k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA"; + public static final String k_pch_Camera_Section = "camera"; + public static final String k_pch_Camera_EnableCamera_Bool = "enableCamera"; + public static final String k_pch_Camera_EnableCameraInDashboard_Bool = "enableCameraInDashboard"; + public static final String k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds"; + public static final String k_pch_Camera_EnableCameraForRoomView_Bool = "enableCameraForRoomView"; + public static final String k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR"; + public static final String k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG"; + public static final String k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB"; + public static final String k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA"; + public static final String k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength"; + public static final String k_pch_Camera_RoomViewMode_Int32 = "cameraRoomViewMode"; + public static final String k_pch_audio_Section = "audio"; + public static final String k_pch_audio_OnPlaybackDevice_String = "onPlaybackDevice"; + public static final String k_pch_audio_OnRecordDevice_String = "onRecordDevice"; + public static final String k_pch_audio_OnPlaybackMirrorDevice_String = "onPlaybackMirrorDevice"; + public static final String k_pch_audio_OffPlaybackDevice_String = "offPlaybackDevice"; + public static final String k_pch_audio_OffRecordDevice_String = "offRecordDevice"; + public static final String k_pch_audio_VIVEHDMIGain = "viveHDMIGain"; + public static final String k_pch_Power_Section = "power"; + public static final String k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit"; + public static final String k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout"; + public static final String k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout"; + public static final String k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout"; + public static final String k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress"; + public static final String k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby"; + public static final String k_pch_Dashboard_Section = "dashboard"; + public static final String k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard"; + public static final String k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode"; + public static final String k_pch_Dashboard_EnableWebUI = "webUI"; + public static final String k_pch_Dashboard_EnableWebUIDevTools = "webUIDevTools"; + public static final String k_pch_Dashboard_EnableWebUIDashboardReplacement = "webUIDashboard"; + public static final String k_pch_modelskin_Section = "modelskins"; + public static final String k_pch_Driver_Enable_Bool = "enable"; + public static final String k_pch_WebInterface_Section = "WebInterface"; + public static final String k_pch_WebInterface_WebEnable_Bool = "WebEnable"; + public static final String k_pch_WebInterface_WebPort_String = "WebPort"; + public static final String k_pch_TrackingOverride_Section = "TrackingOverrides"; + public static final String k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL"; + public static final String k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL"; + public static final String k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave"; + public static final String k_pch_App_ActionManifestURL_String = "ActionManifestURL"; + public static final String k_pch_Trackers_Section = "trackers"; + public static final String IVRScreenshots_Version = "IVRScreenshots_001"; + public static final String IVRResources_Version = "IVRResources_001"; + public static final String IVRDriverManager_Version = "IVRDriverManager_001"; + public static final String IVRInput_Version = "IVRInput_004"; + public static final String IVRIOBuffer_Version = "IVRIOBuffer_001"; + public static final String IVRSpatialAnchors_Version = "IVRSpatialAnchors_001"; + + + /** + * Global entry points
+ * Original signature : intptr_t VR_InitInternal(EVRInitError*, EVRApplicationType)
+ * native declaration : headers\openvr_capi.h:2378
+ * @deprecated use the safer methods {@link #VR_InitInternal(java.nio.IntBuffer, int)} and {@link #VR_InitInternal(com.sun.jna.ptr.IntByReference, int)} instead + */ + @Deprecated + public static native IntByReference VR_InitInternal(IntByReference peError, int eType); + /** + * Global entry points
+ * Original signature : intptr_t VR_InitInternal(EVRInitError*, EVRApplicationType)
+ * native declaration : headers\openvr_capi.h:2378 + */ + public static native IntByReference VR_InitInternal(IntBuffer peError, int eType); + /** + * Original signature : void VR_ShutdownInternal()
+ * native declaration : headers\openvr_capi.h:2380 + */ + public static native void VR_ShutdownInternal(); + /** + * Original signature : bool VR_IsHmdPresent()
+ * native declaration : headers\openvr_capi.h:2382 + */ + public static native byte VR_IsHmdPresent(); + /** + * Original signature : intptr_t VR_GetGenericInterface(const char*, EVRInitError*)
+ * native declaration : headers\openvr_capi.h:2384
+ * @deprecated use the safer methods {@link #VR_GetGenericInterface(java.lang.String, java.nio.IntBuffer)} and {@link #VR_GetGenericInterface(com.sun.jna.Pointer, com.sun.jna.ptr.IntByReference)} instead + */ + @Deprecated + public static native IntByReference VR_GetGenericInterface(Pointer pchInterfaceVersion, IntByReference peError); + /** + * Original signature : intptr_t VR_GetGenericInterface(const char*, EVRInitError*)
+ * native declaration : headers\openvr_capi.h:2384 + */ + public static native IntByReference VR_GetGenericInterface(String pchInterfaceVersion, IntByReference peError); + /** + * Original signature : bool VR_IsRuntimeInstalled()
+ * native declaration : headers\openvr_capi.h:2386 + */ + public static native byte VR_IsRuntimeInstalled(); + /** + * Original signature : char* VR_GetVRInitErrorAsSymbol(EVRInitError)
+ * native declaration : headers\openvr_capi.h:2388 + */ + public static native Pointer VR_GetVRInitErrorAsSymbol(int error); + /** + * Original signature : char* VR_GetVRInitErrorAsEnglishDescription(EVRInitError)
+ * native declaration : headers\openvr_capi.h:2390 + */ + public static native Pointer VR_GetVRInitErrorAsEnglishDescription(int error); + public static class VkQueue_T extends PointerType { + public VkQueue_T(Pointer address) { + super(address); + } + public VkQueue_T() { + super(); + } + }; + public static class VkPhysicalDevice_T extends PointerType { + public VkPhysicalDevice_T(Pointer address) { + super(address); + } + public VkPhysicalDevice_T() { + super(); + } + }; + public static class VkInstance_T extends PointerType { + public VkInstance_T(Pointer address) { + super(address); + } + public VkInstance_T() { + super(); + } + }; + public static class ID3D12CommandQueue extends PointerType { + public ID3D12CommandQueue(Pointer address) { + super(address); + } + public ID3D12CommandQueue() { + super(); + } + }; + public static class ID3D12Resource extends PointerType { + public ID3D12Resource(Pointer address) { + super(address); + } + public ID3D12Resource() { + super(); + } + }; + public static class VkDevice_T extends PointerType { + public VkDevice_T(Pointer address) { + super(address); + } + public VkDevice_T() { + super(); + } + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/NotificationBitmap_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/NotificationBitmap_t.java index 1a932f1ec0..217eedb2c5 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/NotificationBitmap_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/NotificationBitmap_t.java @@ -4,44 +4,44 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1263
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class NotificationBitmap_t extends Structure { + * native declaration : headers\openvr_capi.h:1588
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class NotificationBitmap_t extends Structure { /** - * void *
- * C type : void* - */ - public Pointer m_pImageData; - public int m_nWidth; - public int m_nHeight; - public int m_nBytesPerPixel; - public NotificationBitmap_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m_pImageData", "m_nWidth", "m_nHeight", "m_nBytesPerPixel"); - } + * void *
+ * C type : void* + */ + public Pointer m_pImageData; + public int m_nWidth; + public int m_nHeight; + public int m_nBytesPerPixel; + public NotificationBitmap_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_pImageData", "m_nWidth", "m_nHeight", "m_nBytesPerPixel"); + } /** - * @param m_pImageData void *
- * C type : void* - */ - public NotificationBitmap_t(Pointer m_pImageData, int m_nWidth, int m_nHeight, int m_nBytesPerPixel) { - super(); - this.m_pImageData = m_pImageData; - this.m_nWidth = m_nWidth; - this.m_nHeight = m_nHeight; - this.m_nBytesPerPixel = m_nBytesPerPixel; - } - public NotificationBitmap_t(Pointer peer) { - super(peer); - } - public static class ByReference extends NotificationBitmap_t implements Structure.ByReference { - - }; - public static class ByValue extends NotificationBitmap_t implements Structure.ByValue { - - }; + * @param m_pImageData void *
+ * C type : void* + */ + public NotificationBitmap_t(Pointer m_pImageData, int m_nWidth, int m_nHeight, int m_nBytesPerPixel) { + super(); + this.m_pImageData = m_pImageData; + this.m_nWidth = m_nWidth; + this.m_nHeight = m_nHeight; + this.m_nBytesPerPixel = m_nBytesPerPixel; + } + public NotificationBitmap_t(Pointer peer) { + super(peer); + } + public static class ByReference extends NotificationBitmap_t implements Structure.ByReference { + + }; + public static class ByValue extends NotificationBitmap_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_ComponentState_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_ComponentState_t.java index 4bd2b75bc8..a55f51b933 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_ComponentState_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_ComponentState_t.java @@ -4,42 +4,42 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1232
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class RenderModel_ComponentState_t extends Structure { - /** C type : HmdMatrix34_t */ - public HmdMatrix34_t mTrackingToComponentRenderModel; - /** C type : HmdMatrix34_t */ - public HmdMatrix34_t mTrackingToComponentLocal; - /** C type : VRComponentProperties */ - public int uProperties; - public RenderModel_ComponentState_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("mTrackingToComponentRenderModel", "mTrackingToComponentLocal", "uProperties"); - } + * native declaration : headers\openvr_capi.h:1557
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class RenderModel_ComponentState_t extends Structure { + /** C type : HmdMatrix34_t */ + public HmdMatrix34_t mTrackingToComponentRenderModel; + /** C type : HmdMatrix34_t */ + public HmdMatrix34_t mTrackingToComponentLocal; + /** C type : VRComponentProperties */ + public int uProperties; + public RenderModel_ComponentState_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("mTrackingToComponentRenderModel", "mTrackingToComponentLocal", "uProperties"); + } /** - * @param mTrackingToComponentRenderModel C type : HmdMatrix34_t
- * @param mTrackingToComponentLocal C type : HmdMatrix34_t
- * @param uProperties C type : VRComponentProperties - */ - public RenderModel_ComponentState_t(HmdMatrix34_t mTrackingToComponentRenderModel, HmdMatrix34_t mTrackingToComponentLocal, int uProperties) { - super(); - this.mTrackingToComponentRenderModel = mTrackingToComponentRenderModel; - this.mTrackingToComponentLocal = mTrackingToComponentLocal; - this.uProperties = uProperties; - } - public RenderModel_ComponentState_t(Pointer peer) { - super(peer); - } - public static class ByReference extends RenderModel_ComponentState_t implements Structure.ByReference { - - }; - public static class ByValue extends RenderModel_ComponentState_t implements Structure.ByValue { - - }; + * @param mTrackingToComponentRenderModel C type : HmdMatrix34_t
+ * @param mTrackingToComponentLocal C type : HmdMatrix34_t
+ * @param uProperties C type : VRComponentProperties + */ + public RenderModel_ComponentState_t(HmdMatrix34_t mTrackingToComponentRenderModel, HmdMatrix34_t mTrackingToComponentLocal, int uProperties) { + super(); + this.mTrackingToComponentRenderModel = mTrackingToComponentRenderModel; + this.mTrackingToComponentLocal = mTrackingToComponentLocal; + this.uProperties = uProperties; + } + public RenderModel_ComponentState_t(Pointer peer) { + super(peer); + } + public static class ByReference extends RenderModel_ComponentState_t implements Structure.ByReference { + + }; + public static class ByValue extends RenderModel_ComponentState_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_ControllerMode_State_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_ControllerMode_State_t.java index 84a2c0b555..5d5e45d57d 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_ControllerMode_State_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_ControllerMode_State_t.java @@ -4,30 +4,30 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1256
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class RenderModel_ControllerMode_State_t extends Structure { - public byte bScrollWheelVisible; - public RenderModel_ControllerMode_State_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("bScrollWheelVisible"); - } - public RenderModel_ControllerMode_State_t(byte bScrollWheelVisible) { - super(); - this.bScrollWheelVisible = bScrollWheelVisible; - } - public RenderModel_ControllerMode_State_t(Pointer peer) { - super(peer); - } - public static class ByReference extends RenderModel_ControllerMode_State_t implements Structure.ByReference { - - }; - public static class ByValue extends RenderModel_ControllerMode_State_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1581
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class RenderModel_ControllerMode_State_t extends Structure { + public byte bScrollWheelVisible; + public RenderModel_ControllerMode_State_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("bScrollWheelVisible"); + } + public RenderModel_ControllerMode_State_t(byte bScrollWheelVisible) { + super(); + this.bScrollWheelVisible = bScrollWheelVisible; + } + public RenderModel_ControllerMode_State_t(Pointer peer) { + super(peer); + } + public static class ByReference extends RenderModel_ControllerMode_State_t implements Structure.ByReference { + + }; + public static class ByValue extends RenderModel_ControllerMode_State_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_TextureMap_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_TextureMap_t.java index 06a5d714b0..c6baff6fef 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_TextureMap_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_TextureMap_t.java @@ -4,42 +4,42 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1244
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class RenderModel_TextureMap_t extends Structure { - public short unWidth; - public short unHeight; + * native declaration : headers\openvr_capi.h:1569
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class RenderModel_TextureMap_t extends Structure { + public short unWidth; + public short unHeight; /** - * const uint8_t *
- * C type : uint8_t* - */ - public Pointer rubTextureMapData; - public RenderModel_TextureMap_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("unWidth", "unHeight", "rubTextureMapData"); - } + * const uint8_t *
+ * C type : uint8_t* + */ + public Pointer rubTextureMapData; + public RenderModel_TextureMap_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("unWidth", "unHeight", "rubTextureMapData"); + } /** - * @param rubTextureMapData const uint8_t *
- * C type : uint8_t* - */ - public RenderModel_TextureMap_t(short unWidth, short unHeight, Pointer rubTextureMapData) { - super(); - this.unWidth = unWidth; - this.unHeight = unHeight; - this.rubTextureMapData = rubTextureMapData; - } - public RenderModel_TextureMap_t(Pointer peer) { - super(peer); - } - public static class ByReference extends RenderModel_TextureMap_t implements Structure.ByReference { - - }; - public static class ByValue extends RenderModel_TextureMap_t implements Structure.ByValue { - - }; + * @param rubTextureMapData const uint8_t *
+ * C type : uint8_t* + */ + public RenderModel_TextureMap_t(short unWidth, short unHeight, Pointer rubTextureMapData) { + super(); + this.unWidth = unWidth; + this.unHeight = unHeight; + this.rubTextureMapData = rubTextureMapData; + } + public RenderModel_TextureMap_t(Pointer peer) { + super(peer); + } + public static class ByReference extends RenderModel_TextureMap_t implements Structure.ByReference { + + }; + public static class ByValue extends RenderModel_TextureMap_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_Vertex_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_Vertex_t.java index 5cd761b24f..12e9217d82 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_Vertex_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_Vertex_t.java @@ -4,48 +4,48 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1238
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class RenderModel_Vertex_t extends Structure { - /** C type : HmdVector3_t */ - public HmdVector3_t vPosition; - /** C type : HmdVector3_t */ - public HmdVector3_t vNormal; + * native declaration : headers\openvr_capi.h:1563
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class RenderModel_Vertex_t extends Structure { + /** C type : HmdVector3_t */ + public HmdVector3_t vPosition; + /** C type : HmdVector3_t */ + public HmdVector3_t vNormal; /** - * float[2]
- * C type : float[2] - */ - public float[] rfTextureCoord = new float[2]; - public RenderModel_Vertex_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("vPosition", "vNormal", "rfTextureCoord"); - } + * float[2]
+ * C type : float[2] + */ + public float[] rfTextureCoord = new float[2]; + public RenderModel_Vertex_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("vPosition", "vNormal", "rfTextureCoord"); + } /** - * @param vPosition C type : HmdVector3_t
- * @param vNormal C type : HmdVector3_t
- * @param rfTextureCoord float[2]
- * C type : float[2] - */ - public RenderModel_Vertex_t(HmdVector3_t vPosition, HmdVector3_t vNormal, float rfTextureCoord[]) { - super(); - this.vPosition = vPosition; - this.vNormal = vNormal; - if ((rfTextureCoord.length != this.rfTextureCoord.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.rfTextureCoord = rfTextureCoord; - } - public RenderModel_Vertex_t(Pointer peer) { - super(peer); - } - public static class ByReference extends RenderModel_Vertex_t implements Structure.ByReference { - - }; - public static class ByValue extends RenderModel_Vertex_t implements Structure.ByValue { - - }; + * @param vPosition C type : HmdVector3_t
+ * @param vNormal C type : HmdVector3_t
+ * @param rfTextureCoord float[2]
+ * C type : float[2] + */ + public RenderModel_Vertex_t(HmdVector3_t vPosition, HmdVector3_t vNormal, float rfTextureCoord[]) { + super(); + this.vPosition = vPosition; + this.vNormal = vNormal; + if ((rfTextureCoord.length != this.rfTextureCoord.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.rfTextureCoord = rfTextureCoord; + } + public RenderModel_Vertex_t(Pointer peer) { + super(peer); + } + public static class ByReference extends RenderModel_Vertex_t implements Structure.ByReference { + + }; + public static class ByValue extends RenderModel_Vertex_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_t.java index 9c1f5db2d6..697c79cdf9 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_t.java @@ -5,54 +5,54 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1253
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class RenderModel_t extends Structure { + * native declaration : headers\openvr_capi.h:1578
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class RenderModel_t extends Structure { /** - * const struct vr::RenderModel_Vertex_t *
- * C type : RenderModel_Vertex_t* - */ - public com.jme3.system.jopenvr.RenderModel_Vertex_t.ByReference rVertexData; - public int unVertexCount; + * const struct vr::RenderModel_Vertex_t *
+ * C type : RenderModel_Vertex_t* + */ + public com.jme3.system.jopenvr.RenderModel_Vertex_t.ByReference rVertexData; + public int unVertexCount; /** - * const uint16_t *
- * C type : uint16_t* - */ - public ShortByReference rIndexData; - public int unTriangleCount; - /** C type : TextureID_t */ - public int diffuseTextureId; - public RenderModel_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("rVertexData", "unVertexCount", "rIndexData", "unTriangleCount", "diffuseTextureId"); - } + * const uint16_t *
+ * C type : uint16_t* + */ + public ShortByReference rIndexData; + public int unTriangleCount; + /** C type : TextureID_t */ + public int diffuseTextureId; + public RenderModel_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("rVertexData", "unVertexCount", "rIndexData", "unTriangleCount", "diffuseTextureId"); + } /** - * @param rVertexData const struct vr::RenderModel_Vertex_t *
- * C type : RenderModel_Vertex_t*
- * @param rIndexData const uint16_t *
- * C type : uint16_t*
- * @param diffuseTextureId C type : TextureID_t - */ - public RenderModel_t(com.jme3.system.jopenvr.RenderModel_Vertex_t.ByReference rVertexData, int unVertexCount, ShortByReference rIndexData, int unTriangleCount, int diffuseTextureId) { - super(); - this.rVertexData = rVertexData; - this.unVertexCount = unVertexCount; - this.rIndexData = rIndexData; - this.unTriangleCount = unTriangleCount; - this.diffuseTextureId = diffuseTextureId; - } - public RenderModel_t(Pointer peer) { - super(peer); - } - public static class ByReference extends RenderModel_t implements Structure.ByReference { - - }; - public static class ByValue extends RenderModel_t implements Structure.ByValue { - - }; + * @param rVertexData const struct vr::RenderModel_Vertex_t *
+ * C type : RenderModel_Vertex_t*
+ * @param rIndexData const uint16_t *
+ * C type : uint16_t*
+ * @param diffuseTextureId C type : TextureID_t + */ + public RenderModel_t(com.jme3.system.jopenvr.RenderModel_Vertex_t.ByReference rVertexData, int unVertexCount, ShortByReference rIndexData, int unTriangleCount, int diffuseTextureId) { + super(); + this.rVertexData = rVertexData; + this.unVertexCount = unVertexCount; + this.rIndexData = rIndexData; + this.unTriangleCount = unTriangleCount; + this.diffuseTextureId = diffuseTextureId; + } + public RenderModel_t(Pointer peer) { + super(peer); + } + public static class ByReference extends RenderModel_t implements Structure.ByReference { + + }; + public static class ByValue extends RenderModel_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/SpatialAnchorPose_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/SpatialAnchorPose_t.java new file mode 100644 index 0000000000..3bc24a3ad5 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/SpatialAnchorPose_t.java @@ -0,0 +1,35 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1636
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class SpatialAnchorPose_t extends Structure { + /** C type : HmdMatrix34_t */ + public HmdMatrix34_t mAnchorToAbsoluteTracking; + public SpatialAnchorPose_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("mAnchorToAbsoluteTracking"); + } + /** @param mAnchorToAbsoluteTracking C type : HmdMatrix34_t */ + public SpatialAnchorPose_t(HmdMatrix34_t mAnchorToAbsoluteTracking) { + super(); + this.mAnchorToAbsoluteTracking = mAnchorToAbsoluteTracking; + } + public SpatialAnchorPose_t(Pointer peer) { + super(peer); + } + public static class ByReference extends SpatialAnchorPose_t implements Structure.ByReference { + + }; + public static class ByValue extends SpatialAnchorPose_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/Texture_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/Texture_t.java index a9f326f09d..a81f3a6fc0 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/Texture_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/Texture_t.java @@ -4,54 +4,54 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:991
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class Texture_t extends Structure { + * native declaration : headers\openvr_capi.h:1247
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class Texture_t extends Structure { /** - * void *
- * C type : void* - */ - public int handle; + * void *
+ * C type : void* + */ + public int handle; /** - * @see ETextureType
- * C type : ETextureType - */ - public int eType; + * @see ETextureType
+ * C type : ETextureType + */ + public int eType; /** - * @see EColorSpace
- * C type : EColorSpace - */ - public int eColorSpace; - public Texture_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("handle", "eType", "eColorSpace"); - } + * @see EColorSpace
+ * C type : EColorSpace + */ + public int eColorSpace; + public Texture_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("handle", "eType", "eColorSpace"); + } /** - * @param handle void *
- * C type : void*
- * @param eType @see ETextureType
- * C type : ETextureType
- * @param eColorSpace @see EColorSpace
- * C type : EColorSpace - */ - public Texture_t(int handle, int eType, int eColorSpace) { - super(); - this.handle = handle; - this.eType = eType; - this.eColorSpace = eColorSpace; - } - public Texture_t(Pointer peer) { - super(peer); - } - public static class ByReference extends Texture_t implements Structure.ByReference { - - }; - public static class ByValue extends Texture_t implements Structure.ByValue { - - }; + * @param handle void *
+ * C type : void*
+ * @param eType @see ETextureType
+ * C type : ETextureType
+ * @param eColorSpace @see EColorSpace
+ * C type : EColorSpace + */ + public Texture_t(int handle, int eType, int eColorSpace) { + super(); + this.handle = handle; + this.eType = eType; + this.eColorSpace = eColorSpace; + } + public Texture_t(Pointer peer) { + super(peer); + } + public static class ByReference extends Texture_t implements Structure.ByReference { + + }; + public static class ByValue extends Texture_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/TrackedDevicePose_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/TrackedDevicePose_t.java index 9ccdab58ad..97bbe24313 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/TrackedDevicePose_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/TrackedDevicePose_t.java @@ -4,54 +4,54 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1001
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class TrackedDevicePose_t extends Structure { - /** C type : HmdMatrix34_t */ - public HmdMatrix34_t mDeviceToAbsoluteTracking; - /** C type : HmdVector3_t */ - public HmdVector3_t vVelocity; - /** C type : HmdVector3_t */ - public HmdVector3_t vAngularVelocity; + * native declaration : headers\openvr_capi.h:1257
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class TrackedDevicePose_t extends Structure { + /** C type : HmdMatrix34_t */ + public HmdMatrix34_t mDeviceToAbsoluteTracking; + /** C type : HmdVector3_t */ + public HmdVector3_t vVelocity; + /** C type : HmdVector3_t */ + public HmdVector3_t vAngularVelocity; /** - * @see ETrackingResult
- * C type : ETrackingResult - */ - public int eTrackingResult; - public byte bPoseIsValid; - public byte bDeviceIsConnected; - public TrackedDevicePose_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("mDeviceToAbsoluteTracking", "vVelocity", "vAngularVelocity", "eTrackingResult", "bPoseIsValid", "bDeviceIsConnected"); - } + * @see ETrackingResult
+ * C type : ETrackingResult + */ + public int eTrackingResult; + public byte bPoseIsValid; + public byte bDeviceIsConnected; + public TrackedDevicePose_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("mDeviceToAbsoluteTracking", "vVelocity", "vAngularVelocity", "eTrackingResult", "bPoseIsValid", "bDeviceIsConnected"); + } /** - * @param mDeviceToAbsoluteTracking C type : HmdMatrix34_t
- * @param vVelocity C type : HmdVector3_t
- * @param vAngularVelocity C type : HmdVector3_t
- * @param eTrackingResult @see ETrackingResult
- * C type : ETrackingResult - */ - public TrackedDevicePose_t(HmdMatrix34_t mDeviceToAbsoluteTracking, HmdVector3_t vVelocity, HmdVector3_t vAngularVelocity, int eTrackingResult, byte bPoseIsValid, byte bDeviceIsConnected) { - super(); - this.mDeviceToAbsoluteTracking = mDeviceToAbsoluteTracking; - this.vVelocity = vVelocity; - this.vAngularVelocity = vAngularVelocity; - this.eTrackingResult = eTrackingResult; - this.bPoseIsValid = bPoseIsValid; - this.bDeviceIsConnected = bDeviceIsConnected; - } - public TrackedDevicePose_t(Pointer peer) { - super(peer); - } - public static class ByReference extends TrackedDevicePose_t implements Structure.ByReference { - - }; - public static class ByValue extends TrackedDevicePose_t implements Structure.ByValue { - - }; + * @param mDeviceToAbsoluteTracking C type : HmdMatrix34_t
+ * @param vVelocity C type : HmdVector3_t
+ * @param vAngularVelocity C type : HmdVector3_t
+ * @param eTrackingResult @see ETrackingResult
+ * C type : ETrackingResult + */ + public TrackedDevicePose_t(HmdMatrix34_t mDeviceToAbsoluteTracking, HmdVector3_t vVelocity, HmdVector3_t vAngularVelocity, int eTrackingResult, byte bPoseIsValid, byte bDeviceIsConnected) { + super(); + this.mDeviceToAbsoluteTracking = mDeviceToAbsoluteTracking; + this.vVelocity = vVelocity; + this.vAngularVelocity = vAngularVelocity; + this.eTrackingResult = eTrackingResult; + this.bPoseIsValid = bPoseIsValid; + this.bDeviceIsConnected = bDeviceIsConnected; + } + public TrackedDevicePose_t(Pointer peer) { + super(peer); + } + public static class ByReference extends TrackedDevicePose_t implements Structure.ByReference { + + }; + public static class ByValue extends TrackedDevicePose_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRActiveActionSet_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRActiveActionSet_t.java new file mode 100644 index 0000000000..3a643b893f --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRActiveActionSet_t.java @@ -0,0 +1,49 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1633
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VRActiveActionSet_t extends Structure { + /** C type : VRActionSetHandle_t */ + public long ulActionSet; + /** C type : VRInputValueHandle_t */ + public long ulRestrictedToDevice; + /** C type : VRActionSetHandle_t */ + public long ulSecondaryActionSet; + public int unPadding; + public int nPriority; + public VRActiveActionSet_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("ulActionSet", "ulRestrictedToDevice", "ulSecondaryActionSet", "unPadding", "nPriority"); + } + /** + * @param ulActionSet C type : VRActionSetHandle_t
+ * @param ulRestrictedToDevice C type : VRInputValueHandle_t
+ * @param ulSecondaryActionSet C type : VRActionSetHandle_t + */ + public VRActiveActionSet_t(long ulActionSet, long ulRestrictedToDevice, long ulSecondaryActionSet, int unPadding, int nPriority) { + super(); + this.ulActionSet = ulActionSet; + this.ulRestrictedToDevice = ulRestrictedToDevice; + this.ulSecondaryActionSet = ulSecondaryActionSet; + this.unPadding = unPadding; + this.nPriority = nPriority; + } + public VRActiveActionSet_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VRActiveActionSet_t implements Structure.ByReference { + + }; + public static class ByValue extends VRActiveActionSet_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRBoneTransform_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRBoneTransform_t.java new file mode 100644 index 0000000000..671e95d9bf --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRBoneTransform_t.java @@ -0,0 +1,41 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1456
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VRBoneTransform_t extends Structure { + /** C type : HmdVector4_t */ + public HmdVector4_t position; + /** C type : HmdQuaternionf_t */ + public HmdQuaternionf_t orientation; + public VRBoneTransform_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("position", "orientation"); + } + /** + * @param position C type : HmdVector4_t
+ * @param orientation C type : HmdQuaternionf_t + */ + public VRBoneTransform_t(HmdVector4_t position, HmdQuaternionf_t orientation) { + super(); + this.position = position; + this.orientation = orientation; + } + public VRBoneTransform_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VRBoneTransform_t implements Structure.ByReference { + + }; + public static class ByValue extends VRBoneTransform_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRControllerAxis_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRControllerAxis_t.java index b6fea53aed..8114fdf94b 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRControllerAxis_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRControllerAxis_t.java @@ -4,32 +4,32 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1121
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VRControllerAxis_t extends Structure { - public float x; - public float y; - public VRControllerAxis_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("x", "y"); - } - public VRControllerAxis_t(float x, float y) { - super(); - this.x = x; - this.y = y; - } - public VRControllerAxis_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VRControllerAxis_t implements Structure.ByReference { - - }; - public static class ByValue extends VRControllerAxis_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1429
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VRControllerAxis_t extends Structure { + public float x; + public float y; + public VRControllerAxis_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("x", "y"); + } + public VRControllerAxis_t(float x, float y) { + super(); + this.x = x; + this.y = y; + } + public VRControllerAxis_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VRControllerAxis_t implements Structure.ByReference { + + }; + public static class ByValue extends VRControllerAxis_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRControllerState_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRControllerState_t.java index b1415c56bd..f1becb6fd7 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRControllerState_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRControllerState_t.java @@ -4,46 +4,46 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1128
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VRControllerState_t extends Structure { - public int unPacketNum; - public long ulButtonPressed; - public long ulButtonTouched; + * native declaration : headers\openvr_capi.h:1436
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VRControllerState_t extends Structure { + public int unPacketNum; + public long ulButtonPressed; + public long ulButtonTouched; /** - * struct vr::VRControllerAxis_t[5]
- * C type : VRControllerAxis_t[5] - */ - public VRControllerAxis_t[] rAxis = new VRControllerAxis_t[5]; - public VRControllerState_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("unPacketNum", "ulButtonPressed", "ulButtonTouched", "rAxis"); - } + * struct vr::VRControllerAxis_t[5]
+ * C type : VRControllerAxis_t[5] + */ + public VRControllerAxis_t[] rAxis = new VRControllerAxis_t[5]; + public VRControllerState_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("unPacketNum", "ulButtonPressed", "ulButtonTouched", "rAxis"); + } /** - * @param rAxis struct vr::VRControllerAxis_t[5]
- * C type : VRControllerAxis_t[5] - */ - public VRControllerState_t(int unPacketNum, long ulButtonPressed, long ulButtonTouched, VRControllerAxis_t rAxis[]) { - super(); - this.unPacketNum = unPacketNum; - this.ulButtonPressed = ulButtonPressed; - this.ulButtonTouched = ulButtonTouched; - if ((rAxis.length != this.rAxis.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.rAxis = rAxis; - } - public VRControllerState_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VRControllerState_t implements Structure.ByReference { - - }; - public static class ByValue extends VRControllerState_t implements Structure.ByValue { - - }; + * @param rAxis struct vr::VRControllerAxis_t[5]
+ * C type : VRControllerAxis_t[5] + */ + public VRControllerState_t(int unPacketNum, long ulButtonPressed, long ulButtonTouched, VRControllerAxis_t rAxis[]) { + super(); + this.unPacketNum = unPacketNum; + this.ulButtonPressed = ulButtonPressed; + this.ulButtonTouched = ulButtonTouched; + if ((rAxis.length != this.rAxis.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.rAxis = rAxis; + } + public VRControllerState_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VRControllerState_t implements Structure.ByReference { + + }; + public static class ByValue extends VRControllerState_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_ApplicationLaunch_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_ApplicationLaunch_t.java index 1a60765616..675e0ac07f 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_ApplicationLaunch_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_ApplicationLaunch_t.java @@ -4,32 +4,32 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1099
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_ApplicationLaunch_t extends Structure { - public int pid; - public int unArgsHandle; - public VREvent_ApplicationLaunch_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("pid", "unArgsHandle"); - } - public VREvent_ApplicationLaunch_t(int pid, int unArgsHandle) { - super(); - this.pid = pid; - this.unArgsHandle = unArgsHandle; - } - public VREvent_ApplicationLaunch_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_ApplicationLaunch_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_ApplicationLaunch_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1373
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_ApplicationLaunch_t extends Structure { + public int pid; + public int unArgsHandle; + public VREvent_ApplicationLaunch_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("pid", "unArgsHandle"); + } + public VREvent_ApplicationLaunch_t(int pid, int unArgsHandle) { + super(); + this.pid = pid; + this.unArgsHandle = unArgsHandle; + } + public VREvent_ApplicationLaunch_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_ApplicationLaunch_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_ApplicationLaunch_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Chaperone_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Chaperone_t.java index a9f49cfded..65287c0d73 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Chaperone_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Chaperone_t.java @@ -4,32 +4,32 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1078
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Chaperone_t extends Structure { - public long m_nPreviousUniverse; - public long m_nCurrentUniverse; - public VREvent_Chaperone_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m_nPreviousUniverse", "m_nCurrentUniverse"); - } - public VREvent_Chaperone_t(long m_nPreviousUniverse, long m_nCurrentUniverse) { - super(); - this.m_nPreviousUniverse = m_nPreviousUniverse; - this.m_nCurrentUniverse = m_nCurrentUniverse; - } - public VREvent_Chaperone_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Chaperone_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Chaperone_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1350
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Chaperone_t extends Structure { + public long m_nPreviousUniverse; + public long m_nCurrentUniverse; + public VREvent_Chaperone_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_nPreviousUniverse", "m_nCurrentUniverse"); + } + public VREvent_Chaperone_t(long m_nPreviousUniverse, long m_nCurrentUniverse) { + super(); + this.m_nPreviousUniverse = m_nPreviousUniverse; + this.m_nCurrentUniverse = m_nCurrentUniverse; + } + public VREvent_Chaperone_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Chaperone_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Chaperone_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Controller_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Controller_t.java index 289bc79cc3..c2a632c695 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Controller_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Controller_t.java @@ -4,30 +4,30 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1033
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Controller_t extends Structure { - public int button; - public VREvent_Controller_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("button"); - } - public VREvent_Controller_t(int button) { - super(); - this.button = button; - } - public VREvent_Controller_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Controller_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Controller_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1304
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Controller_t extends Structure { + public int button; + public VREvent_Controller_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("button"); + } + public VREvent_Controller_t(int button) { + super(); + this.button = button; + } + public VREvent_Controller_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Controller_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Controller_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Data_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Data_t.java index be4f2229a6..983a7da823 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Data_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Data_t.java @@ -2,134 +2,134 @@ import com.sun.jna.Pointer; import com.sun.jna.Union; /** - * native declaration : headers\openvr_capi.h:1307
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Data_t extends Union { - /** C type : VREvent_Reserved_t */ - public VREvent_Reserved_t reserved; - /** C type : VREvent_Controller_t */ - public VREvent_Controller_t controller; - /** C type : VREvent_Mouse_t */ - public VREvent_Mouse_t mouse; - /** C type : VREvent_Scroll_t */ - public VREvent_Scroll_t scroll; - /** C type : VREvent_Process_t */ - public VREvent_Process_t process; - /** C type : VREvent_Notification_t */ - public VREvent_Notification_t notification; - /** C type : VREvent_Overlay_t */ - public VREvent_Overlay_t overlay; - /** C type : VREvent_Status_t */ - public VREvent_Status_t status; - /** C type : VREvent_Keyboard_t */ - public VREvent_Keyboard_t keyboard; - /** C type : VREvent_Ipd_t */ - public VREvent_Ipd_t ipd; - /** C type : VREvent_Chaperone_t */ - public VREvent_Chaperone_t chaperone; - /** C type : VREvent_PerformanceTest_t */ - public VREvent_PerformanceTest_t performanceTest; - /** C type : VREvent_TouchPadMove_t */ - public VREvent_TouchPadMove_t touchPadMove; - /** C type : VREvent_SeatedZeroPoseReset_t */ - public VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; - public VREvent_Data_t() { - super(); - } - /** @param reserved C type : VREvent_Reserved_t */ - public VREvent_Data_t(VREvent_Reserved_t reserved) { - super(); - this.reserved = reserved; - setType(VREvent_Reserved_t.class); - } - /** @param controller C type : VREvent_Controller_t */ - public VREvent_Data_t(VREvent_Controller_t controller) { - super(); - this.controller = controller; - setType(VREvent_Controller_t.class); - } - /** @param mouse C type : VREvent_Mouse_t */ - public VREvent_Data_t(VREvent_Mouse_t mouse) { - super(); - this.mouse = mouse; - setType(VREvent_Mouse_t.class); - } - /** @param scroll C type : VREvent_Scroll_t */ - public VREvent_Data_t(VREvent_Scroll_t scroll) { - super(); - this.scroll = scroll; - setType(VREvent_Scroll_t.class); - } - /** @param process C type : VREvent_Process_t */ - public VREvent_Data_t(VREvent_Process_t process) { - super(); - this.process = process; - setType(VREvent_Process_t.class); - } - /** @param notification C type : VREvent_Notification_t */ - public VREvent_Data_t(VREvent_Notification_t notification) { - super(); - this.notification = notification; - setType(VREvent_Notification_t.class); - } - /** @param overlay C type : VREvent_Overlay_t */ - public VREvent_Data_t(VREvent_Overlay_t overlay) { - super(); - this.overlay = overlay; - setType(VREvent_Overlay_t.class); - } - /** @param status C type : VREvent_Status_t */ - public VREvent_Data_t(VREvent_Status_t status) { - super(); - this.status = status; - setType(VREvent_Status_t.class); - } - /** @param keyboard C type : VREvent_Keyboard_t */ - public VREvent_Data_t(VREvent_Keyboard_t keyboard) { - super(); - this.keyboard = keyboard; - setType(VREvent_Keyboard_t.class); - } - /** @param ipd C type : VREvent_Ipd_t */ - public VREvent_Data_t(VREvent_Ipd_t ipd) { - super(); - this.ipd = ipd; - setType(VREvent_Ipd_t.class); - } - /** @param chaperone C type : VREvent_Chaperone_t */ - public VREvent_Data_t(VREvent_Chaperone_t chaperone) { - super(); - this.chaperone = chaperone; - setType(VREvent_Chaperone_t.class); - } - /** @param performanceTest C type : VREvent_PerformanceTest_t */ - public VREvent_Data_t(VREvent_PerformanceTest_t performanceTest) { - super(); - this.performanceTest = performanceTest; - setType(VREvent_PerformanceTest_t.class); - } - /** @param touchPadMove C type : VREvent_TouchPadMove_t */ - public VREvent_Data_t(VREvent_TouchPadMove_t touchPadMove) { - super(); - this.touchPadMove = touchPadMove; - setType(VREvent_TouchPadMove_t.class); - } - /** @param seatedZeroPoseReset C type : VREvent_SeatedZeroPoseReset_t */ - public VREvent_Data_t(VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset) { - super(); - this.seatedZeroPoseReset = seatedZeroPoseReset; - setType(VREvent_SeatedZeroPoseReset_t.class); - } - public VREvent_Data_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Data_t implements com.sun.jna.Structure.ByReference { - - }; - public static class ByValue extends VREvent_Data_t implements com.sun.jna.Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1686
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Data_t extends Union { + /** C type : VREvent_Reserved_t */ + public VREvent_Reserved_t reserved; + /** C type : VREvent_Controller_t */ + public VREvent_Controller_t controller; + /** C type : VREvent_Mouse_t */ + public VREvent_Mouse_t mouse; + /** C type : VREvent_Scroll_t */ + public VREvent_Scroll_t scroll; + /** C type : VREvent_Process_t */ + public VREvent_Process_t process; + /** C type : VREvent_Notification_t */ + public VREvent_Notification_t notification; + /** C type : VREvent_Overlay_t */ + public VREvent_Overlay_t overlay; + /** C type : VREvent_Status_t */ + public VREvent_Status_t status; + /** C type : VREvent_Keyboard_t */ + public VREvent_Keyboard_t keyboard; + /** C type : VREvent_Ipd_t */ + public VREvent_Ipd_t ipd; + /** C type : VREvent_Chaperone_t */ + public VREvent_Chaperone_t chaperone; + /** C type : VREvent_PerformanceTest_t */ + public VREvent_PerformanceTest_t performanceTest; + /** C type : VREvent_TouchPadMove_t */ + public VREvent_TouchPadMove_t touchPadMove; + /** C type : VREvent_SeatedZeroPoseReset_t */ + public VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset; + public VREvent_Data_t() { + super(); + } + /** @param reserved C type : VREvent_Reserved_t */ + public VREvent_Data_t(VREvent_Reserved_t reserved) { + super(); + this.reserved = reserved; + setType(VREvent_Reserved_t.class); + } + /** @param controller C type : VREvent_Controller_t */ + public VREvent_Data_t(VREvent_Controller_t controller) { + super(); + this.controller = controller; + setType(VREvent_Controller_t.class); + } + /** @param mouse C type : VREvent_Mouse_t */ + public VREvent_Data_t(VREvent_Mouse_t mouse) { + super(); + this.mouse = mouse; + setType(VREvent_Mouse_t.class); + } + /** @param scroll C type : VREvent_Scroll_t */ + public VREvent_Data_t(VREvent_Scroll_t scroll) { + super(); + this.scroll = scroll; + setType(VREvent_Scroll_t.class); + } + /** @param process C type : VREvent_Process_t */ + public VREvent_Data_t(VREvent_Process_t process) { + super(); + this.process = process; + setType(VREvent_Process_t.class); + } + /** @param notification C type : VREvent_Notification_t */ + public VREvent_Data_t(VREvent_Notification_t notification) { + super(); + this.notification = notification; + setType(VREvent_Notification_t.class); + } + /** @param overlay C type : VREvent_Overlay_t */ + public VREvent_Data_t(VREvent_Overlay_t overlay) { + super(); + this.overlay = overlay; + setType(VREvent_Overlay_t.class); + } + /** @param status C type : VREvent_Status_t */ + public VREvent_Data_t(VREvent_Status_t status) { + super(); + this.status = status; + setType(VREvent_Status_t.class); + } + /** @param keyboard C type : VREvent_Keyboard_t */ + public VREvent_Data_t(VREvent_Keyboard_t keyboard) { + super(); + this.keyboard = keyboard; + setType(VREvent_Keyboard_t.class); + } + /** @param ipd C type : VREvent_Ipd_t */ + public VREvent_Data_t(VREvent_Ipd_t ipd) { + super(); + this.ipd = ipd; + setType(VREvent_Ipd_t.class); + } + /** @param chaperone C type : VREvent_Chaperone_t */ + public VREvent_Data_t(VREvent_Chaperone_t chaperone) { + super(); + this.chaperone = chaperone; + setType(VREvent_Chaperone_t.class); + } + /** @param performanceTest C type : VREvent_PerformanceTest_t */ + public VREvent_Data_t(VREvent_PerformanceTest_t performanceTest) { + super(); + this.performanceTest = performanceTest; + setType(VREvent_PerformanceTest_t.class); + } + /** @param touchPadMove C type : VREvent_TouchPadMove_t */ + public VREvent_Data_t(VREvent_TouchPadMove_t touchPadMove) { + super(); + this.touchPadMove = touchPadMove; + setType(VREvent_TouchPadMove_t.class); + } + /** @param seatedZeroPoseReset C type : VREvent_SeatedZeroPoseReset_t */ + public VREvent_Data_t(VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset) { + super(); + this.seatedZeroPoseReset = seatedZeroPoseReset; + setType(VREvent_SeatedZeroPoseReset_t.class); + } + public VREvent_Data_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Data_t implements com.sun.jna.Structure.ByReference { + + }; + public static class ByValue extends VREvent_Data_t implements com.sun.jna.Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_DualAnalog_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_DualAnalog_t.java new file mode 100644 index 0000000000..b6a528d3be --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_DualAnalog_t.java @@ -0,0 +1,49 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1395
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_DualAnalog_t extends Structure { + public float x; + public float y; + public float transformedX; + public float transformedY; + /** + * @see EDualAnalogWhich
+ * C type : EDualAnalogWhich + */ + public int which; + public VREvent_DualAnalog_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("x", "y", "transformedX", "transformedY", "which"); + } + /** + * @param which @see EDualAnalogWhich
+ * C type : EDualAnalogWhich + */ + public VREvent_DualAnalog_t(float x, float y, float transformedX, float transformedY, int which) { + super(); + this.x = x; + this.y = y; + this.transformedX = transformedX; + this.transformedY = transformedY; + this.which = which; + } + public VREvent_DualAnalog_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_DualAnalog_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_DualAnalog_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_EditingCameraSurface_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_EditingCameraSurface_t.java index 562fb69ee5..6a8f5c8c35 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_EditingCameraSurface_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_EditingCameraSurface_t.java @@ -4,32 +4,32 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1103
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_EditingCameraSurface_t extends Structure { - public long overlayHandle; - public int nVisualMode; - public VREvent_EditingCameraSurface_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("overlayHandle", "nVisualMode"); - } - public VREvent_EditingCameraSurface_t(long overlayHandle, int nVisualMode) { - super(); - this.overlayHandle = overlayHandle; - this.nVisualMode = nVisualMode; - } - public VREvent_EditingCameraSurface_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_EditingCameraSurface_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_EditingCameraSurface_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1377
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_EditingCameraSurface_t extends Structure { + public long overlayHandle; + public int nVisualMode; + public VREvent_EditingCameraSurface_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("overlayHandle", "nVisualMode"); + } + public VREvent_EditingCameraSurface_t(long overlayHandle, int nVisualMode) { + super(); + this.overlayHandle = overlayHandle; + this.nVisualMode = nVisualMode; + } + public VREvent_EditingCameraSurface_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_EditingCameraSurface_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_EditingCameraSurface_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_HapticVibration_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_HapticVibration_t.java new file mode 100644 index 0000000000..1501bcbf43 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_HapticVibration_t.java @@ -0,0 +1,41 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1402
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_HapticVibration_t extends Structure { + public long containerHandle; + public long componentHandle; + public float fDurationSeconds; + public float fFrequency; + public float fAmplitude; + public VREvent_HapticVibration_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("containerHandle", "componentHandle", "fDurationSeconds", "fFrequency", "fAmplitude"); + } + public VREvent_HapticVibration_t(long containerHandle, long componentHandle, float fDurationSeconds, float fFrequency, float fAmplitude) { + super(); + this.containerHandle = containerHandle; + this.componentHandle = componentHandle; + this.fDurationSeconds = fDurationSeconds; + this.fFrequency = fFrequency; + this.fAmplitude = fAmplitude; + } + public VREvent_HapticVibration_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_HapticVibration_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_HapticVibration_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_InputActionManifestLoad_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_InputActionManifestLoad_t.java new file mode 100644 index 0000000000..955ad7abdd --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_InputActionManifestLoad_t.java @@ -0,0 +1,39 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1417
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_InputActionManifestLoad_t extends Structure { + public long pathAppKey; + public long pathMessage; + public long pathMessageParam; + public long pathManifestPath; + public VREvent_InputActionManifestLoad_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("pathAppKey", "pathMessage", "pathMessageParam", "pathManifestPath"); + } + public VREvent_InputActionManifestLoad_t(long pathAppKey, long pathMessage, long pathMessageParam, long pathManifestPath) { + super(); + this.pathAppKey = pathAppKey; + this.pathMessage = pathMessage; + this.pathMessageParam = pathMessageParam; + this.pathManifestPath = pathManifestPath; + } + public VREvent_InputActionManifestLoad_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_InputActionManifestLoad_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_InputActionManifestLoad_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_InputBindingLoad_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_InputBindingLoad_t.java new file mode 100644 index 0000000000..f7a02b4bf5 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_InputBindingLoad_t.java @@ -0,0 +1,41 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1411
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_InputBindingLoad_t extends Structure { + /** C type : PropertyContainerHandle_t */ + public long ulAppContainer; + public long pathMessage; + public long pathUrl; + public long pathControllerType; + public VREvent_InputBindingLoad_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("ulAppContainer", "pathMessage", "pathUrl", "pathControllerType"); + } + /** @param ulAppContainer C type : PropertyContainerHandle_t */ + public VREvent_InputBindingLoad_t(long ulAppContainer, long pathMessage, long pathUrl, long pathControllerType) { + super(); + this.ulAppContainer = ulAppContainer; + this.pathMessage = pathMessage; + this.pathUrl = pathUrl; + this.pathControllerType = pathControllerType; + } + public VREvent_InputBindingLoad_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_InputBindingLoad_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_InputBindingLoad_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Ipd_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Ipd_t.java index f1c56ba3f7..02b100e350 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Ipd_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Ipd_t.java @@ -4,30 +4,30 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1074
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Ipd_t extends Structure { - public float ipdMeters; - public VREvent_Ipd_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("ipdMeters"); - } - public VREvent_Ipd_t(float ipdMeters) { - super(); - this.ipdMeters = ipdMeters; - } - public VREvent_Ipd_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Ipd_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Ipd_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1346
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Ipd_t extends Structure { + public float ipdMeters; + public VREvent_Ipd_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("ipdMeters"); + } + public VREvent_Ipd_t(float ipdMeters) { + super(); + this.ipdMeters = ipdMeters; + } + public VREvent_Ipd_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Ipd_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Ipd_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Keyboard_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Keyboard_t.java index 3847d634c3..a6fb1e6e9b 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Keyboard_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Keyboard_t.java @@ -4,42 +4,42 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1071
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Keyboard_t extends Structure { + * native declaration : headers\openvr_capi.h:1343
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Keyboard_t extends Structure { /** - * char[8]
- * C type : char*[8] - */ - public Pointer[] cNewInput = new Pointer[8]; - public long uUserValue; - public VREvent_Keyboard_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("cNewInput", "uUserValue"); - } + * char[8]
+ * C type : char*[8] + */ + public Pointer[] cNewInput = new Pointer[8]; + public long uUserValue; + public VREvent_Keyboard_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("cNewInput", "uUserValue"); + } /** - * @param cNewInput char[8]
- * C type : char*[8] - */ - public VREvent_Keyboard_t(Pointer cNewInput[], long uUserValue) { - super(); - if ((cNewInput.length != this.cNewInput.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.cNewInput = cNewInput; - this.uUserValue = uUserValue; - } - public VREvent_Keyboard_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Keyboard_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Keyboard_t implements Structure.ByValue { - - }; + * @param cNewInput char[8]
+ * C type : char*[8] + */ + public VREvent_Keyboard_t(Pointer cNewInput[], long uUserValue) { + super(); + if ((cNewInput.length != this.cNewInput.length)) + throw new IllegalArgumentException("Wrong array size !"); + this.cNewInput = cNewInput; + this.uUserValue = uUserValue; + } + public VREvent_Keyboard_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Keyboard_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Keyboard_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_MessageOverlay_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_MessageOverlay_t.java index d10f3cb989..fc9e82c9bf 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_MessageOverlay_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_MessageOverlay_t.java @@ -4,30 +4,30 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1106
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_MessageOverlay_t extends Structure { - public int unVRMessageOverlayResponse; - public VREvent_MessageOverlay_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("unVRMessageOverlayResponse"); - } - public VREvent_MessageOverlay_t(int unVRMessageOverlayResponse) { - super(); - this.unVRMessageOverlayResponse = unVRMessageOverlayResponse; - } - public VREvent_MessageOverlay_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_MessageOverlay_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_MessageOverlay_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1380
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_MessageOverlay_t extends Structure { + public int unVRMessageOverlayResponse; + public VREvent_MessageOverlay_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("unVRMessageOverlayResponse"); + } + public VREvent_MessageOverlay_t(int unVRMessageOverlayResponse) { + super(); + this.unVRMessageOverlayResponse = unVRMessageOverlayResponse; + } + public VREvent_MessageOverlay_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_MessageOverlay_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_MessageOverlay_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Mouse_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Mouse_t.java index bd2886747d..b55c523c7c 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Mouse_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Mouse_t.java @@ -4,34 +4,34 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1038
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Mouse_t extends Structure { - public float x; - public float y; - public int button; - public VREvent_Mouse_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("x", "y", "button"); - } - public VREvent_Mouse_t(float x, float y, int button) { - super(); - this.x = x; - this.y = y; - this.button = button; - } - public VREvent_Mouse_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Mouse_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Mouse_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1309
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Mouse_t extends Structure { + public float x; + public float y; + public int button; + public VREvent_Mouse_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("x", "y", "button"); + } + public VREvent_Mouse_t(float x, float y, int button) { + super(); + this.x = x; + this.y = y; + this.button = button; + } + public VREvent_Mouse_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Mouse_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Mouse_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Notification_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Notification_t.java index 9f4942e268..0f65ecfc38 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Notification_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Notification_t.java @@ -4,32 +4,32 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1055
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Notification_t extends Structure { - public long ulUserValue; - public int notificationId; - public VREvent_Notification_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("ulUserValue", "notificationId"); - } - public VREvent_Notification_t(long ulUserValue, int notificationId) { - super(); - this.ulUserValue = ulUserValue; - this.notificationId = notificationId; - } - public VREvent_Notification_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Notification_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Notification_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1326
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Notification_t extends Structure { + public long ulUserValue; + public int notificationId; + public VREvent_Notification_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("ulUserValue", "notificationId"); + } + public VREvent_Notification_t(long ulUserValue, int notificationId) { + super(); + this.ulUserValue = ulUserValue; + this.notificationId = notificationId; + } + public VREvent_Notification_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Notification_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Notification_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Overlay_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Overlay_t.java index 5ee0360822..d112d92e2e 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Overlay_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Overlay_t.java @@ -4,30 +4,32 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1063
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Overlay_t extends Structure { - public long overlayHandle; - public VREvent_Overlay_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("overlayHandle"); - } - public VREvent_Overlay_t(long overlayHandle) { - super(); - this.overlayHandle = overlayHandle; - } - public VREvent_Overlay_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Overlay_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Overlay_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1335
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Overlay_t extends Structure { + public long overlayHandle; + public long devicePath; + public VREvent_Overlay_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("overlayHandle", "devicePath"); + } + public VREvent_Overlay_t(long overlayHandle, long devicePath) { + super(); + this.overlayHandle = overlayHandle; + this.devicePath = devicePath; + } + public VREvent_Overlay_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Overlay_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Overlay_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_PerformanceTest_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_PerformanceTest_t.java index dcb49de815..37e357bef1 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_PerformanceTest_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_PerformanceTest_t.java @@ -4,30 +4,30 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1085
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_PerformanceTest_t extends Structure { - public int m_nFidelityLevel; - public VREvent_PerformanceTest_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m_nFidelityLevel"); - } - public VREvent_PerformanceTest_t(int m_nFidelityLevel) { - super(); - this.m_nFidelityLevel = m_nFidelityLevel; - } - public VREvent_PerformanceTest_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_PerformanceTest_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_PerformanceTest_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1359
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_PerformanceTest_t extends Structure { + public int m_nFidelityLevel; + public VREvent_PerformanceTest_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_nFidelityLevel"); + } + public VREvent_PerformanceTest_t(int m_nFidelityLevel) { + super(); + this.m_nFidelityLevel = m_nFidelityLevel; + } + public VREvent_PerformanceTest_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_PerformanceTest_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_PerformanceTest_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Process_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Process_t.java index e0f957426a..ad89d03c95 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Process_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Process_t.java @@ -4,34 +4,34 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1060
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Process_t extends Structure { - public int pid; - public int oldPid; - public byte bForced; - public VREvent_Process_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("pid", "oldPid", "bForced"); - } - public VREvent_Process_t(int pid, int oldPid, byte bForced) { - super(); - this.pid = pid; - this.oldPid = oldPid; - this.bForced = bForced; - } - public VREvent_Process_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Process_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Process_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1331
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Process_t extends Structure { + public int pid; + public int oldPid; + public byte bForced; + public VREvent_Process_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("pid", "oldPid", "bForced"); + } + public VREvent_Process_t(int pid, int oldPid, byte bForced) { + super(); + this.pid = pid; + this.oldPid = oldPid; + this.bForced = bForced; + } + public VREvent_Process_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Process_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Process_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Property_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Property_t.java index 0b96647781..fe51252f7a 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Property_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Property_t.java @@ -4,42 +4,42 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1112
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Property_t extends Structure { - /** C type : PropertyContainerHandle_t */ - public long container; + * native declaration : headers\openvr_capi.h:1386
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Property_t extends Structure { + /** C type : PropertyContainerHandle_t */ + public long container; /** - * @see ETrackedDeviceProperty
- * C type : ETrackedDeviceProperty - */ - public int prop; - public VREvent_Property_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("container", "prop"); - } + * @see ETrackedDeviceProperty
+ * C type : ETrackedDeviceProperty + */ + public int prop; + public VREvent_Property_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("container", "prop"); + } /** - * @param container C type : PropertyContainerHandle_t
- * @param prop @see ETrackedDeviceProperty
- * C type : ETrackedDeviceProperty - */ - public VREvent_Property_t(long container, int prop) { - super(); - this.container = container; - this.prop = prop; - } - public VREvent_Property_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Property_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Property_t implements Structure.ByValue { - - }; + * @param container C type : PropertyContainerHandle_t
+ * @param prop @see ETrackedDeviceProperty
+ * C type : ETrackedDeviceProperty + */ + public VREvent_Property_t(long container, int prop) { + super(); + this.container = container; + this.prop = prop; + } + public VREvent_Property_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Property_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Property_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Reserved_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Reserved_t.java index 18e63c3ee2..11dd3f849e 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Reserved_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Reserved_t.java @@ -4,32 +4,36 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1082
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Reserved_t extends Structure { - public long reserved0; - public long reserved1; - public VREvent_Reserved_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("reserved0", "reserved1"); - } - public VREvent_Reserved_t(long reserved0, long reserved1) { - super(); - this.reserved0 = reserved0; - this.reserved1 = reserved1; - } - public VREvent_Reserved_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Reserved_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Reserved_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1356
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Reserved_t extends Structure { + public long reserved0; + public long reserved1; + public long reserved2; + public long reserved3; + public VREvent_Reserved_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("reserved0", "reserved1", "reserved2", "reserved3"); + } + public VREvent_Reserved_t(long reserved0, long reserved1, long reserved2, long reserved3) { + super(); + this.reserved0 = reserved0; + this.reserved1 = reserved1; + this.reserved2 = reserved2; + this.reserved3 = reserved3; + } + public VREvent_Reserved_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Reserved_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Reserved_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_ScreenshotProgress_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_ScreenshotProgress_t.java index 3f822c2832..7d616dec60 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_ScreenshotProgress_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_ScreenshotProgress_t.java @@ -4,30 +4,30 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1095
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_ScreenshotProgress_t extends Structure { - public float progress; - public VREvent_ScreenshotProgress_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("progress"); - } - public VREvent_ScreenshotProgress_t(float progress) { - super(); - this.progress = progress; - } - public VREvent_ScreenshotProgress_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_ScreenshotProgress_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_ScreenshotProgress_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1369
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_ScreenshotProgress_t extends Structure { + public float progress; + public VREvent_ScreenshotProgress_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("progress"); + } + public VREvent_ScreenshotProgress_t(float progress) { + super(); + this.progress = progress; + } + public VREvent_ScreenshotProgress_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_ScreenshotProgress_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_ScreenshotProgress_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Screenshot_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Screenshot_t.java index 5a5f5ea916..d34f6e0898 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Screenshot_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Screenshot_t.java @@ -4,32 +4,32 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1092
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Screenshot_t extends Structure { - public int handle; - public int type; - public VREvent_Screenshot_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("handle", "type"); - } - public VREvent_Screenshot_t(int handle, int type) { - super(); - this.handle = handle; - this.type = type; - } - public VREvent_Screenshot_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Screenshot_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Screenshot_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1366
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Screenshot_t extends Structure { + public int handle; + public int type; + public VREvent_Screenshot_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("handle", "type"); + } + public VREvent_Screenshot_t(int handle, int type) { + super(); + this.handle = handle; + this.type = type; + } + public VREvent_Screenshot_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Screenshot_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Screenshot_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Scroll_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Scroll_t.java index 7c4090b1fb..8a428e8bb5 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Scroll_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Scroll_t.java @@ -4,34 +4,34 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1043
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Scroll_t extends Structure { - public float xdelta; - public float ydelta; - public int repeatCount; - public VREvent_Scroll_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("xdelta", "ydelta", "repeatCount"); - } - public VREvent_Scroll_t(float xdelta, float ydelta, int repeatCount) { - super(); - this.xdelta = xdelta; - this.ydelta = ydelta; - this.repeatCount = repeatCount; - } - public VREvent_Scroll_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Scroll_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Scroll_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1314
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Scroll_t extends Structure { + public float xdelta; + public float ydelta; + public int repeatCount; + public VREvent_Scroll_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("xdelta", "ydelta", "repeatCount"); + } + public VREvent_Scroll_t(float xdelta, float ydelta, int repeatCount) { + super(); + this.xdelta = xdelta; + this.ydelta = ydelta; + this.repeatCount = repeatCount; + } + public VREvent_Scroll_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Scroll_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Scroll_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_SeatedZeroPoseReset_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_SeatedZeroPoseReset_t.java index d051ec5e4c..fb8edda62a 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_SeatedZeroPoseReset_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_SeatedZeroPoseReset_t.java @@ -4,30 +4,30 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1088
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_SeatedZeroPoseReset_t extends Structure { - public byte bResetBySystemMenu; - public VREvent_SeatedZeroPoseReset_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("bResetBySystemMenu"); - } - public VREvent_SeatedZeroPoseReset_t(byte bResetBySystemMenu) { - super(); - this.bResetBySystemMenu = bResetBySystemMenu; - } - public VREvent_SeatedZeroPoseReset_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_SeatedZeroPoseReset_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_SeatedZeroPoseReset_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1362
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_SeatedZeroPoseReset_t extends Structure { + public byte bResetBySystemMenu; + public VREvent_SeatedZeroPoseReset_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("bResetBySystemMenu"); + } + public VREvent_SeatedZeroPoseReset_t(byte bResetBySystemMenu) { + super(); + this.bResetBySystemMenu = bResetBySystemMenu; + } + public VREvent_SeatedZeroPoseReset_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_SeatedZeroPoseReset_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_SeatedZeroPoseReset_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_SpatialAnchor_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_SpatialAnchor_t.java new file mode 100644 index 0000000000..5e26d5b4cf --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_SpatialAnchor_t.java @@ -0,0 +1,35 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1420
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_SpatialAnchor_t extends Structure { + /** C type : SpatialAnchorHandle_t */ + public int unHandle; + public VREvent_SpatialAnchor_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("unHandle"); + } + /** @param unHandle C type : SpatialAnchorHandle_t */ + public VREvent_SpatialAnchor_t(int unHandle) { + super(); + this.unHandle = unHandle; + } + public VREvent_SpatialAnchor_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_SpatialAnchor_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_SpatialAnchor_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Status_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Status_t.java index f69fcd9bf8..054b72f682 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Status_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Status_t.java @@ -4,30 +4,30 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1066
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_Status_t extends Structure { - public int statusState; - public VREvent_Status_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("statusState"); - } - public VREvent_Status_t(int statusState) { - super(); - this.statusState = statusState; - } - public VREvent_Status_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_Status_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_Status_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1338
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_Status_t extends Structure { + public int statusState; + public VREvent_Status_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("statusState"); + } + public VREvent_Status_t(int statusState) { + super(); + this.statusState = statusState; + } + public VREvent_Status_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_Status_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_Status_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_TouchPadMove_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_TouchPadMove_t.java index dd963ae705..58f4af1122 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_TouchPadMove_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_TouchPadMove_t.java @@ -4,40 +4,40 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1051
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_TouchPadMove_t extends Structure { - public byte bFingerDown; - public float flSecondsFingerDown; - public float fValueXFirst; - public float fValueYFirst; - public float fValueXRaw; - public float fValueYRaw; - public VREvent_TouchPadMove_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("bFingerDown", "flSecondsFingerDown", "fValueXFirst", "fValueYFirst", "fValueXRaw", "fValueYRaw"); - } - public VREvent_TouchPadMove_t(byte bFingerDown, float flSecondsFingerDown, float fValueXFirst, float fValueYFirst, float fValueXRaw, float fValueYRaw) { - super(); - this.bFingerDown = bFingerDown; - this.flSecondsFingerDown = flSecondsFingerDown; - this.fValueXFirst = fValueXFirst; - this.fValueYFirst = fValueYFirst; - this.fValueXRaw = fValueXRaw; - this.fValueYRaw = fValueYRaw; - } - public VREvent_TouchPadMove_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_TouchPadMove_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_TouchPadMove_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1322
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_TouchPadMove_t extends Structure { + public byte bFingerDown; + public float flSecondsFingerDown; + public float fValueXFirst; + public float fValueYFirst; + public float fValueXRaw; + public float fValueYRaw; + public VREvent_TouchPadMove_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("bFingerDown", "flSecondsFingerDown", "fValueXFirst", "fValueYFirst", "fValueXRaw", "fValueYRaw"); + } + public VREvent_TouchPadMove_t(byte bFingerDown, float flSecondsFingerDown, float fValueXFirst, float fValueYFirst, float fValueXRaw, float fValueYRaw) { + super(); + this.bFingerDown = bFingerDown; + this.flSecondsFingerDown = flSecondsFingerDown; + this.fValueXFirst = fValueXFirst; + this.fValueYFirst = fValueYFirst; + this.fValueXRaw = fValueXRaw; + this.fValueYRaw = fValueYRaw; + } + public VREvent_TouchPadMove_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_TouchPadMove_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_TouchPadMove_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_WebConsole_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_WebConsole_t.java new file mode 100644 index 0000000000..bcde8c67c3 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_WebConsole_t.java @@ -0,0 +1,35 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1405
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_WebConsole_t extends Structure { + /** C type : WebConsoleHandle_t */ + public long webConsoleHandle; + public VREvent_WebConsole_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("webConsoleHandle"); + } + /** @param webConsoleHandle C type : WebConsoleHandle_t */ + public VREvent_WebConsole_t(long webConsoleHandle) { + super(); + this.webConsoleHandle = webConsoleHandle; + } + public VREvent_WebConsole_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_WebConsole_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_WebConsole_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_t.java index 24be43e22e..e22ad5687e 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_t.java @@ -4,45 +4,45 @@ import java.util.Arrays; import java.util.List; /** - * An event posted by the server to all running applications
- * native declaration : headers\openvr_capi.h:1315
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VREvent_t extends Structure { - /** EVREventType enum */ - public int eventType; - /** C type : TrackedDeviceIndex_t */ - public int trackedDeviceIndex; - public float eventAgeSeconds; - /** C type : VREvent_Data_t */ - public VREvent_Data_t data; - public VREvent_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("eventType", "trackedDeviceIndex", "eventAgeSeconds", "data"); - } + * An event posted by the server to all running applications
+ * native declaration : headers\openvr_capi.h:1694
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VREvent_t extends Structure { + /** EVREventType enum */ + public int eventType; + /** C type : TrackedDeviceIndex_t */ + public int trackedDeviceIndex; + public float eventAgeSeconds; + /** C type : VREvent_Data_t */ + public VREvent_Data_t data; + public VREvent_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("eventType", "trackedDeviceIndex", "eventAgeSeconds", "data"); + } /** - * @param eventType EVREventType enum
- * @param trackedDeviceIndex C type : TrackedDeviceIndex_t
- * @param data C type : VREvent_Data_t - */ - public VREvent_t(int eventType, int trackedDeviceIndex, float eventAgeSeconds, VREvent_Data_t data) { - super(); - this.eventType = eventType; - this.trackedDeviceIndex = trackedDeviceIndex; - this.eventAgeSeconds = eventAgeSeconds; - this.data = data; - } - public VREvent_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VREvent_t implements Structure.ByReference { - - }; - public static class ByValue extends VREvent_t implements Structure.ByValue { - - }; + * @param eventType EVREventType enum
+ * @param trackedDeviceIndex C type : TrackedDeviceIndex_t
+ * @param data C type : VREvent_Data_t + */ + public VREvent_t(int eventType, int trackedDeviceIndex, float eventAgeSeconds, VREvent_Data_t data) { + super(); + this.eventType = eventType; + this.trackedDeviceIndex = trackedDeviceIndex; + this.eventAgeSeconds = eventAgeSeconds; + this.data = data; + } + public VREvent_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VREvent_t implements Structure.ByReference { + + }; + public static class ByValue extends VREvent_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionMaskPrimitive_Data_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionMaskPrimitive_Data_t.java index 4ac797b97a..9020bf2852 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionMaskPrimitive_Data_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionMaskPrimitive_Data_t.java @@ -2,38 +2,38 @@ import com.sun.jna.Pointer; import com.sun.jna.Union; /** - * native declaration : headers\openvr_capi.h:1319
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VROverlayIntersectionMaskPrimitive_Data_t extends Union { - /** C type : IntersectionMaskRectangle_t */ - public IntersectionMaskRectangle_t m_Rectangle; - /** C type : IntersectionMaskCircle_t */ - public IntersectionMaskCircle_t m_Circle; - public VROverlayIntersectionMaskPrimitive_Data_t() { - super(); - } - /** @param m_Rectangle C type : IntersectionMaskRectangle_t */ - public VROverlayIntersectionMaskPrimitive_Data_t(IntersectionMaskRectangle_t m_Rectangle) { - super(); - this.m_Rectangle = m_Rectangle; - setType(IntersectionMaskRectangle_t.class); - } - /** @param m_Circle C type : IntersectionMaskCircle_t */ - public VROverlayIntersectionMaskPrimitive_Data_t(IntersectionMaskCircle_t m_Circle) { - super(); - this.m_Circle = m_Circle; - setType(IntersectionMaskCircle_t.class); - } - public VROverlayIntersectionMaskPrimitive_Data_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VROverlayIntersectionMaskPrimitive_Data_t implements com.sun.jna.Structure.ByReference { - - }; - public static class ByValue extends VROverlayIntersectionMaskPrimitive_Data_t implements com.sun.jna.Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1698
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VROverlayIntersectionMaskPrimitive_Data_t extends Union { + /** C type : IntersectionMaskRectangle_t */ + public IntersectionMaskRectangle_t m_Rectangle; + /** C type : IntersectionMaskCircle_t */ + public IntersectionMaskCircle_t m_Circle; + public VROverlayIntersectionMaskPrimitive_Data_t() { + super(); + } + /** @param m_Rectangle C type : IntersectionMaskRectangle_t */ + public VROverlayIntersectionMaskPrimitive_Data_t(IntersectionMaskRectangle_t m_Rectangle) { + super(); + this.m_Rectangle = m_Rectangle; + setType(IntersectionMaskRectangle_t.class); + } + /** @param m_Circle C type : IntersectionMaskCircle_t */ + public VROverlayIntersectionMaskPrimitive_Data_t(IntersectionMaskCircle_t m_Circle) { + super(); + this.m_Circle = m_Circle; + setType(IntersectionMaskCircle_t.class); + } + public VROverlayIntersectionMaskPrimitive_Data_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VROverlayIntersectionMaskPrimitive_Data_t implements com.sun.jna.Structure.ByReference { + + }; + public static class ByValue extends VROverlayIntersectionMaskPrimitive_Data_t implements com.sun.jna.Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionMaskPrimitive_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionMaskPrimitive_t.java index 962fbe3404..e9c7e5934a 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionMaskPrimitive_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionMaskPrimitive_t.java @@ -4,42 +4,42 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1323
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VROverlayIntersectionMaskPrimitive_t extends Structure { + * native declaration : headers\openvr_capi.h:1702
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VROverlayIntersectionMaskPrimitive_t extends Structure { /** - * @see EVROverlayIntersectionMaskPrimitiveType
- * C type : EVROverlayIntersectionMaskPrimitiveType - */ - public int m_nPrimitiveType; - /** C type : VROverlayIntersectionMaskPrimitive_Data_t */ - public VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; - public VROverlayIntersectionMaskPrimitive_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m_nPrimitiveType", "m_Primitive"); - } + * @see EVROverlayIntersectionMaskPrimitiveType
+ * C type : EVROverlayIntersectionMaskPrimitiveType + */ + public int m_nPrimitiveType; + /** C type : VROverlayIntersectionMaskPrimitive_Data_t */ + public VROverlayIntersectionMaskPrimitive_Data_t m_Primitive; + public VROverlayIntersectionMaskPrimitive_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_nPrimitiveType", "m_Primitive"); + } /** - * @param m_nPrimitiveType @see EVROverlayIntersectionMaskPrimitiveType
- * C type : EVROverlayIntersectionMaskPrimitiveType
- * @param m_Primitive C type : VROverlayIntersectionMaskPrimitive_Data_t - */ - public VROverlayIntersectionMaskPrimitive_t(int m_nPrimitiveType, VROverlayIntersectionMaskPrimitive_Data_t m_Primitive) { - super(); - this.m_nPrimitiveType = m_nPrimitiveType; - this.m_Primitive = m_Primitive; - } - public VROverlayIntersectionMaskPrimitive_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VROverlayIntersectionMaskPrimitive_t implements Structure.ByReference { - - }; - public static class ByValue extends VROverlayIntersectionMaskPrimitive_t implements Structure.ByValue { - - }; + * @param m_nPrimitiveType @see EVROverlayIntersectionMaskPrimitiveType
+ * C type : EVROverlayIntersectionMaskPrimitiveType
+ * @param m_Primitive C type : VROverlayIntersectionMaskPrimitive_Data_t + */ + public VROverlayIntersectionMaskPrimitive_t(int m_nPrimitiveType, VROverlayIntersectionMaskPrimitive_Data_t m_Primitive) { + super(); + this.m_nPrimitiveType = m_nPrimitiveType; + this.m_Primitive = m_Primitive; + } + public VROverlayIntersectionMaskPrimitive_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VROverlayIntersectionMaskPrimitive_t implements Structure.ByReference { + + }; + public static class ByValue extends VROverlayIntersectionMaskPrimitive_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionParams_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionParams_t.java index ce72360f70..e430f22351 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionParams_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionParams_t.java @@ -4,46 +4,46 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1210
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VROverlayIntersectionParams_t extends Structure { - /** C type : HmdVector3_t */ - public HmdVector3_t vSource; - /** C type : HmdVector3_t */ - public HmdVector3_t vDirection; + * native declaration : headers\openvr_capi.h:1535
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VROverlayIntersectionParams_t extends Structure { + /** C type : HmdVector3_t */ + public HmdVector3_t vSource; + /** C type : HmdVector3_t */ + public HmdVector3_t vDirection; /** - * @see ETrackingUniverseOrigin
- * C type : ETrackingUniverseOrigin - */ - public int eOrigin; - public VROverlayIntersectionParams_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("vSource", "vDirection", "eOrigin"); - } + * @see ETrackingUniverseOrigin
+ * C type : ETrackingUniverseOrigin + */ + public int eOrigin; + public VROverlayIntersectionParams_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("vSource", "vDirection", "eOrigin"); + } /** - * @param vSource C type : HmdVector3_t
- * @param vDirection C type : HmdVector3_t
- * @param eOrigin @see ETrackingUniverseOrigin
- * C type : ETrackingUniverseOrigin - */ - public VROverlayIntersectionParams_t(HmdVector3_t vSource, HmdVector3_t vDirection, int eOrigin) { - super(); - this.vSource = vSource; - this.vDirection = vDirection; - this.eOrigin = eOrigin; - } - public VROverlayIntersectionParams_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VROverlayIntersectionParams_t implements Structure.ByReference { - - }; - public static class ByValue extends VROverlayIntersectionParams_t implements Structure.ByValue { - - }; + * @param vSource C type : HmdVector3_t
+ * @param vDirection C type : HmdVector3_t
+ * @param eOrigin @see ETrackingUniverseOrigin
+ * C type : ETrackingUniverseOrigin + */ + public VROverlayIntersectionParams_t(HmdVector3_t vSource, HmdVector3_t vDirection, int eOrigin) { + super(); + this.vSource = vSource; + this.vDirection = vDirection; + this.eOrigin = eOrigin; + } + public VROverlayIntersectionParams_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VROverlayIntersectionParams_t implements Structure.ByReference { + + }; + public static class ByValue extends VROverlayIntersectionParams_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionResults_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionResults_t.java index be0df71651..22374baccc 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionResults_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionResults_t.java @@ -4,44 +4,44 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1216
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VROverlayIntersectionResults_t extends Structure { - /** C type : HmdVector3_t */ - public HmdVector3_t vPoint; - /** C type : HmdVector3_t */ - public HmdVector3_t vNormal; - /** C type : HmdVector2_t */ - public HmdVector2_t vUVs; - public float fDistance; - public VROverlayIntersectionResults_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("vPoint", "vNormal", "vUVs", "fDistance"); - } + * native declaration : headers\openvr_capi.h:1541
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VROverlayIntersectionResults_t extends Structure { + /** C type : HmdVector3_t */ + public HmdVector3_t vPoint; + /** C type : HmdVector3_t */ + public HmdVector3_t vNormal; + /** C type : HmdVector2_t */ + public HmdVector2_t vUVs; + public float fDistance; + public VROverlayIntersectionResults_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("vPoint", "vNormal", "vUVs", "fDistance"); + } /** - * @param vPoint C type : HmdVector3_t
- * @param vNormal C type : HmdVector3_t
- * @param vUVs C type : HmdVector2_t - */ - public VROverlayIntersectionResults_t(HmdVector3_t vPoint, HmdVector3_t vNormal, HmdVector2_t vUVs, float fDistance) { - super(); - this.vPoint = vPoint; - this.vNormal = vNormal; - this.vUVs = vUVs; - this.fDistance = fDistance; - } - public VROverlayIntersectionResults_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VROverlayIntersectionResults_t implements Structure.ByReference { - - }; - public static class ByValue extends VROverlayIntersectionResults_t implements Structure.ByValue { - - }; + * @param vPoint C type : HmdVector3_t
+ * @param vNormal C type : HmdVector3_t
+ * @param vUVs C type : HmdVector2_t + */ + public VROverlayIntersectionResults_t(HmdVector3_t vPoint, HmdVector3_t vNormal, HmdVector2_t vUVs, float fDistance) { + super(); + this.vPoint = vPoint; + this.vNormal = vNormal; + this.vUVs = vUVs; + this.fDistance = fDistance; + } + public VROverlayIntersectionResults_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VROverlayIntersectionResults_t implements Structure.ByReference { + + }; + public static class ByValue extends VROverlayIntersectionResults_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureBounds_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureBounds_t.java index 9bb56e46d2..3a0ce15df2 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureBounds_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureBounds_t.java @@ -4,36 +4,36 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1007
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VRTextureBounds_t extends Structure { - public float uMin; - public float vMin; - public float uMax; - public float vMax; - public VRTextureBounds_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("uMin", "vMin", "uMax", "vMax"); - } - public VRTextureBounds_t(float uMin, float vMin, float uMax, float vMax) { - super(); - this.uMin = uMin; - this.vMin = vMin; - this.uMax = uMax; - this.vMax = vMax; - } - public VRTextureBounds_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VRTextureBounds_t implements Structure.ByReference { - - }; - public static class ByValue extends VRTextureBounds_t implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1263
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VRTextureBounds_t extends Structure { + public float uMin; + public float vMin; + public float uMax; + public float vMax; + public VRTextureBounds_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("uMin", "vMin", "uMax", "vMax"); + } + public VRTextureBounds_t(float uMin, float vMin, float uMax, float vMax) { + super(); + this.uMin = uMin; + this.vMin = vMin; + this.uMax = uMax; + this.vMax = vMax; + } + public VRTextureBounds_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VRTextureBounds_t implements Structure.ByReference { + + }; + public static class ByValue extends VRTextureBounds_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureDepthInfo_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureDepthInfo_t.java new file mode 100644 index 0000000000..6dc69f3fba --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureDepthInfo_t.java @@ -0,0 +1,49 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1272
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VRTextureDepthInfo_t extends Structure { + /** + * void *
+ * C type : void* + */ + public Pointer handle; + /** C type : HmdMatrix44_t */ + public HmdMatrix44_t mProjection; + /** C type : HmdVector2_t */ + public HmdVector2_t vRange; + public VRTextureDepthInfo_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("handle", "mProjection", "vRange"); + } + /** + * @param handle void *
+ * C type : void*
+ * @param mProjection C type : HmdMatrix44_t
+ * @param vRange C type : HmdVector2_t + */ + public VRTextureDepthInfo_t(Pointer handle, HmdMatrix44_t mProjection, HmdVector2_t vRange) { + super(); + this.handle = handle; + this.mProjection = mProjection; + this.vRange = vRange; + } + public VRTextureDepthInfo_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VRTextureDepthInfo_t implements Structure.ByReference { + + }; + public static class ByValue extends VRTextureDepthInfo_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureWithDepth_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureWithDepth_t.java new file mode 100644 index 0000000000..2b58cfa601 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureWithDepth_t.java @@ -0,0 +1,35 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1275
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VRTextureWithDepth_t extends Structure { + /** C type : VRTextureDepthInfo_t */ + public VRTextureDepthInfo_t depth; + public VRTextureWithDepth_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("depth"); + } + /** @param depth C type : VRTextureDepthInfo_t */ + public VRTextureWithDepth_t(VRTextureDepthInfo_t depth) { + super(); + this.depth = depth; + } + public VRTextureWithDepth_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VRTextureWithDepth_t implements Structure.ByReference { + + }; + public static class ByValue extends VRTextureWithDepth_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureWithPoseAndDepth_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureWithPoseAndDepth_t.java new file mode 100644 index 0000000000..1ae24aa8b8 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureWithPoseAndDepth_t.java @@ -0,0 +1,35 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1278
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VRTextureWithPoseAndDepth_t extends Structure { + /** C type : VRTextureDepthInfo_t */ + public VRTextureDepthInfo_t depth; + public VRTextureWithPoseAndDepth_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("depth"); + } + /** @param depth C type : VRTextureDepthInfo_t */ + public VRTextureWithPoseAndDepth_t(VRTextureDepthInfo_t depth) { + super(); + this.depth = depth; + } + public VRTextureWithPoseAndDepth_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VRTextureWithPoseAndDepth_t implements Structure.ByReference { + + }; + public static class ByValue extends VRTextureWithPoseAndDepth_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureWithPose_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureWithPose_t.java new file mode 100644 index 0000000000..694562e441 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureWithPose_t.java @@ -0,0 +1,35 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:1266
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VRTextureWithPose_t extends Structure { + /** C type : HmdMatrix34_t */ + public HmdMatrix34_t mDeviceToAbsoluteTracking; + public VRTextureWithPose_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("mDeviceToAbsoluteTracking"); + } + /** @param mDeviceToAbsoluteTracking C type : HmdMatrix34_t */ + public VRTextureWithPose_t(HmdMatrix34_t mDeviceToAbsoluteTracking) { + super(); + this.mDeviceToAbsoluteTracking = mDeviceToAbsoluteTracking; + } + public VRTextureWithPose_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VRTextureWithPose_t implements Structure.ByReference { + + }; + public static class ByValue extends VRTextureWithPose_t implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRVulkanTextureData_t.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRVulkanTextureData_t.java index 08ef57c49f..cf26144bc4 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRVulkanTextureData_t.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VRVulkanTextureData_t.java @@ -8,51 +8,51 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1023
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VRVulkanTextureData_t extends Structure { - public long m_nImage; + * native declaration : headers\openvr_capi.h:1294
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VRVulkanTextureData_t extends Structure { + public long m_nImage; /** - * struct VkDevice_T *
- * C type : VkDevice_T* - */ - public VkDevice_T m_pDevice; + * struct VkDevice_T *
+ * C type : VkDevice_T* + */ + public VkDevice_T m_pDevice; /** - * struct VkPhysicalDevice_T *
- * C type : VkPhysicalDevice_T* - */ - public VkPhysicalDevice_T m_pPhysicalDevice; + * struct VkPhysicalDevice_T *
+ * C type : VkPhysicalDevice_T* + */ + public VkPhysicalDevice_T m_pPhysicalDevice; /** - * struct VkInstance_T *
- * C type : VkInstance_T* - */ - public VkInstance_T m_pInstance; + * struct VkInstance_T *
+ * C type : VkInstance_T* + */ + public VkInstance_T m_pInstance; /** - * struct VkQueue_T *
- * C type : VkQueue_T* - */ - public VkQueue_T m_pQueue; - public int m_nQueueFamilyIndex; - public int m_nWidth; - public int m_nHeight; - public int m_nFormat; - public int m_nSampleCount; - public VRVulkanTextureData_t() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("m_nImage", "m_pDevice", "m_pPhysicalDevice", "m_pInstance", "m_pQueue", "m_nQueueFamilyIndex", "m_nWidth", "m_nHeight", "m_nFormat", "m_nSampleCount"); - } - public VRVulkanTextureData_t(Pointer peer) { - super(peer); - } - public static class ByReference extends VRVulkanTextureData_t implements Structure.ByReference { - - }; - public static class ByValue extends VRVulkanTextureData_t implements Structure.ByValue { - - }; + * struct VkQueue_T *
+ * C type : VkQueue_T* + */ + public VkQueue_T m_pQueue; + public int m_nQueueFamilyIndex; + public int m_nWidth; + public int m_nHeight; + public int m_nFormat; + public int m_nSampleCount; + public VRVulkanTextureData_t() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("m_nImage", "m_pDevice", "m_pPhysicalDevice", "m_pInstance", "m_pQueue", "m_nQueueFamilyIndex", "m_nWidth", "m_nHeight", "m_nFormat", "m_nSampleCount"); + } + public VRVulkanTextureData_t(Pointer peer) { + super(peer); + } + public static class ByReference extends VRVulkanTextureData_t implements Structure.ByReference { + + }; + public static class ByValue extends VRVulkanTextureData_t implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRApplications_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRApplications_FnTable.java index 8102beac3d..8c42698940 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRApplications_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRApplications_FnTable.java @@ -6,211 +6,211 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1514
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRApplications_FnTable extends Structure { - /** C type : AddApplicationManifest_callback* */ - public VR_IVRApplications_FnTable.AddApplicationManifest_callback AddApplicationManifest; - /** C type : RemoveApplicationManifest_callback* */ - public VR_IVRApplications_FnTable.RemoveApplicationManifest_callback RemoveApplicationManifest; - /** C type : IsApplicationInstalled_callback* */ - public VR_IVRApplications_FnTable.IsApplicationInstalled_callback IsApplicationInstalled; - /** C type : GetApplicationCount_callback* */ - public VR_IVRApplications_FnTable.GetApplicationCount_callback GetApplicationCount; - /** C type : GetApplicationKeyByIndex_callback* */ - public VR_IVRApplications_FnTable.GetApplicationKeyByIndex_callback GetApplicationKeyByIndex; - /** C type : GetApplicationKeyByProcessId_callback* */ - public VR_IVRApplications_FnTable.GetApplicationKeyByProcessId_callback GetApplicationKeyByProcessId; - /** C type : LaunchApplication_callback* */ - public VR_IVRApplications_FnTable.LaunchApplication_callback LaunchApplication; - /** C type : LaunchTemplateApplication_callback* */ - public VR_IVRApplications_FnTable.LaunchTemplateApplication_callback LaunchTemplateApplication; - /** C type : LaunchApplicationFromMimeType_callback* */ - public VR_IVRApplications_FnTable.LaunchApplicationFromMimeType_callback LaunchApplicationFromMimeType; - /** C type : LaunchDashboardOverlay_callback* */ - public VR_IVRApplications_FnTable.LaunchDashboardOverlay_callback LaunchDashboardOverlay; - /** C type : CancelApplicationLaunch_callback* */ - public VR_IVRApplications_FnTable.CancelApplicationLaunch_callback CancelApplicationLaunch; - /** C type : IdentifyApplication_callback* */ - public VR_IVRApplications_FnTable.IdentifyApplication_callback IdentifyApplication; - /** C type : GetApplicationProcessId_callback* */ - public VR_IVRApplications_FnTable.GetApplicationProcessId_callback GetApplicationProcessId; - /** C type : GetApplicationsErrorNameFromEnum_callback* */ - public VR_IVRApplications_FnTable.GetApplicationsErrorNameFromEnum_callback GetApplicationsErrorNameFromEnum; - /** C type : GetApplicationPropertyString_callback* */ - public VR_IVRApplications_FnTable.GetApplicationPropertyString_callback GetApplicationPropertyString; - /** C type : GetApplicationPropertyBool_callback* */ - public VR_IVRApplications_FnTable.GetApplicationPropertyBool_callback GetApplicationPropertyBool; - /** C type : GetApplicationPropertyUint64_callback* */ - public VR_IVRApplications_FnTable.GetApplicationPropertyUint64_callback GetApplicationPropertyUint64; - /** C type : SetApplicationAutoLaunch_callback* */ - public VR_IVRApplications_FnTable.SetApplicationAutoLaunch_callback SetApplicationAutoLaunch; - /** C type : GetApplicationAutoLaunch_callback* */ - public VR_IVRApplications_FnTable.GetApplicationAutoLaunch_callback GetApplicationAutoLaunch; - /** C type : SetDefaultApplicationForMimeType_callback* */ - public VR_IVRApplications_FnTable.SetDefaultApplicationForMimeType_callback SetDefaultApplicationForMimeType; - /** C type : GetDefaultApplicationForMimeType_callback* */ - public VR_IVRApplications_FnTable.GetDefaultApplicationForMimeType_callback GetDefaultApplicationForMimeType; - /** C type : GetApplicationSupportedMimeTypes_callback* */ - public VR_IVRApplications_FnTable.GetApplicationSupportedMimeTypes_callback GetApplicationSupportedMimeTypes; - /** C type : GetApplicationsThatSupportMimeType_callback* */ - public VR_IVRApplications_FnTable.GetApplicationsThatSupportMimeType_callback GetApplicationsThatSupportMimeType; - /** C type : GetApplicationLaunchArguments_callback* */ - public VR_IVRApplications_FnTable.GetApplicationLaunchArguments_callback GetApplicationLaunchArguments; - /** C type : GetStartingApplication_callback* */ - public VR_IVRApplications_FnTable.GetStartingApplication_callback GetStartingApplication; - /** C type : GetTransitionState_callback* */ - public VR_IVRApplications_FnTable.GetTransitionState_callback GetTransitionState; - /** C type : PerformApplicationPrelaunchCheck_callback* */ - public VR_IVRApplications_FnTable.PerformApplicationPrelaunchCheck_callback PerformApplicationPrelaunchCheck; - /** C type : GetApplicationsTransitionStateNameFromEnum_callback* */ - public VR_IVRApplications_FnTable.GetApplicationsTransitionStateNameFromEnum_callback GetApplicationsTransitionStateNameFromEnum; - /** C type : IsQuitUserPromptRequested_callback* */ - public VR_IVRApplications_FnTable.IsQuitUserPromptRequested_callback IsQuitUserPromptRequested; - /** C type : LaunchInternalProcess_callback* */ - public VR_IVRApplications_FnTable.LaunchInternalProcess_callback LaunchInternalProcess; - /** C type : GetCurrentSceneProcessId_callback* */ - public VR_IVRApplications_FnTable.GetCurrentSceneProcessId_callback GetCurrentSceneProcessId; - /** native declaration : headers\openvr_capi.h:1483 */ - public interface AddApplicationManifest_callback extends Callback { - int apply(Pointer pchApplicationManifestFullPath, byte bTemporary); - }; - /** native declaration : headers\openvr_capi.h:1484 */ - public interface RemoveApplicationManifest_callback extends Callback { - int apply(Pointer pchApplicationManifestFullPath); - }; - /** native declaration : headers\openvr_capi.h:1485 */ - public interface IsApplicationInstalled_callback extends Callback { - byte apply(Pointer pchAppKey); - }; - /** native declaration : headers\openvr_capi.h:1486 */ - public interface GetApplicationCount_callback extends Callback { - int apply(); - }; - /** native declaration : headers\openvr_capi.h:1487 */ - public interface GetApplicationKeyByIndex_callback extends Callback { - int apply(int unApplicationIndex, Pointer pchAppKeyBuffer, int unAppKeyBufferLen); - }; - /** native declaration : headers\openvr_capi.h:1488 */ - public interface GetApplicationKeyByProcessId_callback extends Callback { - int apply(int unProcessId, Pointer pchAppKeyBuffer, int unAppKeyBufferLen); - }; - /** native declaration : headers\openvr_capi.h:1489 */ - public interface LaunchApplication_callback extends Callback { - int apply(Pointer pchAppKey); - }; - /** native declaration : headers\openvr_capi.h:1490 */ - public interface LaunchTemplateApplication_callback extends Callback { - int apply(Pointer pchTemplateAppKey, Pointer pchNewAppKey, AppOverrideKeys_t pKeys, int unKeys); - }; - /** native declaration : headers\openvr_capi.h:1491 */ - public interface LaunchApplicationFromMimeType_callback extends Callback { - int apply(Pointer pchMimeType, Pointer pchArgs); - }; - /** native declaration : headers\openvr_capi.h:1492 */ - public interface LaunchDashboardOverlay_callback extends Callback { - int apply(Pointer pchAppKey); - }; - /** native declaration : headers\openvr_capi.h:1493 */ - public interface CancelApplicationLaunch_callback extends Callback { - byte apply(Pointer pchAppKey); - }; - /** native declaration : headers\openvr_capi.h:1494 */ - public interface IdentifyApplication_callback extends Callback { - int apply(int unProcessId, Pointer pchAppKey); - }; - /** native declaration : headers\openvr_capi.h:1495 */ - public interface GetApplicationProcessId_callback extends Callback { - int apply(Pointer pchAppKey); - }; - /** native declaration : headers\openvr_capi.h:1496 */ - public interface GetApplicationsErrorNameFromEnum_callback extends Callback { - Pointer apply(int error); - }; - /** native declaration : headers\openvr_capi.h:1497 */ - public interface GetApplicationPropertyString_callback extends Callback { - int apply(Pointer pchAppKey, int eProperty, Pointer pchPropertyValueBuffer, int unPropertyValueBufferLen, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1498 */ - public interface GetApplicationPropertyBool_callback extends Callback { - byte apply(Pointer pchAppKey, int eProperty, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1499 */ - public interface GetApplicationPropertyUint64_callback extends Callback { - long apply(Pointer pchAppKey, int eProperty, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1500 */ - public interface SetApplicationAutoLaunch_callback extends Callback { - int apply(Pointer pchAppKey, byte bAutoLaunch); - }; - /** native declaration : headers\openvr_capi.h:1501 */ - public interface GetApplicationAutoLaunch_callback extends Callback { - byte apply(Pointer pchAppKey); - }; - /** native declaration : headers\openvr_capi.h:1502 */ - public interface SetDefaultApplicationForMimeType_callback extends Callback { - int apply(Pointer pchAppKey, Pointer pchMimeType); - }; - /** native declaration : headers\openvr_capi.h:1503 */ - public interface GetDefaultApplicationForMimeType_callback extends Callback { - byte apply(Pointer pchMimeType, Pointer pchAppKeyBuffer, int unAppKeyBufferLen); - }; - /** native declaration : headers\openvr_capi.h:1504 */ - public interface GetApplicationSupportedMimeTypes_callback extends Callback { - byte apply(Pointer pchAppKey, Pointer pchMimeTypesBuffer, int unMimeTypesBuffer); - }; - /** native declaration : headers\openvr_capi.h:1505 */ - public interface GetApplicationsThatSupportMimeType_callback extends Callback { - int apply(Pointer pchMimeType, Pointer pchAppKeysThatSupportBuffer, int unAppKeysThatSupportBuffer); - }; - /** native declaration : headers\openvr_capi.h:1506 */ - public interface GetApplicationLaunchArguments_callback extends Callback { - int apply(int unHandle, Pointer pchArgs, int unArgs); - }; - /** native declaration : headers\openvr_capi.h:1507 */ - public interface GetStartingApplication_callback extends Callback { - int apply(Pointer pchAppKeyBuffer, int unAppKeyBufferLen); - }; - /** native declaration : headers\openvr_capi.h:1508 */ - public interface GetTransitionState_callback extends Callback { - int apply(); - }; - /** native declaration : headers\openvr_capi.h:1509 */ - public interface PerformApplicationPrelaunchCheck_callback extends Callback { - int apply(Pointer pchAppKey); - }; - /** native declaration : headers\openvr_capi.h:1510 */ - public interface GetApplicationsTransitionStateNameFromEnum_callback extends Callback { - Pointer apply(int state); - }; - /** native declaration : headers\openvr_capi.h:1511 */ - public interface IsQuitUserPromptRequested_callback extends Callback { - byte apply(); - }; - /** native declaration : headers\openvr_capi.h:1512 */ - public interface LaunchInternalProcess_callback extends Callback { - int apply(Pointer pchBinaryPath, Pointer pchArguments, Pointer pchWorkingDirectory); - }; - /** native declaration : headers\openvr_capi.h:1513 */ - public interface GetCurrentSceneProcessId_callback extends Callback { - int apply(); - }; - public VR_IVRApplications_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("AddApplicationManifest", "RemoveApplicationManifest", "IsApplicationInstalled", "GetApplicationCount", "GetApplicationKeyByIndex", "GetApplicationKeyByProcessId", "LaunchApplication", "LaunchTemplateApplication", "LaunchApplicationFromMimeType", "LaunchDashboardOverlay", "CancelApplicationLaunch", "IdentifyApplication", "GetApplicationProcessId", "GetApplicationsErrorNameFromEnum", "GetApplicationPropertyString", "GetApplicationPropertyBool", "GetApplicationPropertyUint64", "SetApplicationAutoLaunch", "GetApplicationAutoLaunch", "SetDefaultApplicationForMimeType", "GetDefaultApplicationForMimeType", "GetApplicationSupportedMimeTypes", "GetApplicationsThatSupportMimeType", "GetApplicationLaunchArguments", "GetStartingApplication", "GetTransitionState", "PerformApplicationPrelaunchCheck", "GetApplicationsTransitionStateNameFromEnum", "IsQuitUserPromptRequested", "LaunchInternalProcess", "GetCurrentSceneProcessId"); - } - public VR_IVRApplications_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRApplications_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRApplications_FnTable implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1897
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRApplications_FnTable extends Structure { + /** C type : AddApplicationManifest_callback* */ + public VR_IVRApplications_FnTable.AddApplicationManifest_callback AddApplicationManifest; + /** C type : RemoveApplicationManifest_callback* */ + public VR_IVRApplications_FnTable.RemoveApplicationManifest_callback RemoveApplicationManifest; + /** C type : IsApplicationInstalled_callback* */ + public VR_IVRApplications_FnTable.IsApplicationInstalled_callback IsApplicationInstalled; + /** C type : GetApplicationCount_callback* */ + public VR_IVRApplications_FnTable.GetApplicationCount_callback GetApplicationCount; + /** C type : GetApplicationKeyByIndex_callback* */ + public VR_IVRApplications_FnTable.GetApplicationKeyByIndex_callback GetApplicationKeyByIndex; + /** C type : GetApplicationKeyByProcessId_callback* */ + public VR_IVRApplications_FnTable.GetApplicationKeyByProcessId_callback GetApplicationKeyByProcessId; + /** C type : LaunchApplication_callback* */ + public VR_IVRApplications_FnTable.LaunchApplication_callback LaunchApplication; + /** C type : LaunchTemplateApplication_callback* */ + public VR_IVRApplications_FnTable.LaunchTemplateApplication_callback LaunchTemplateApplication; + /** C type : LaunchApplicationFromMimeType_callback* */ + public VR_IVRApplications_FnTable.LaunchApplicationFromMimeType_callback LaunchApplicationFromMimeType; + /** C type : LaunchDashboardOverlay_callback* */ + public VR_IVRApplications_FnTable.LaunchDashboardOverlay_callback LaunchDashboardOverlay; + /** C type : CancelApplicationLaunch_callback* */ + public VR_IVRApplications_FnTable.CancelApplicationLaunch_callback CancelApplicationLaunch; + /** C type : IdentifyApplication_callback* */ + public VR_IVRApplications_FnTable.IdentifyApplication_callback IdentifyApplication; + /** C type : GetApplicationProcessId_callback* */ + public VR_IVRApplications_FnTable.GetApplicationProcessId_callback GetApplicationProcessId; + /** C type : GetApplicationsErrorNameFromEnum_callback* */ + public VR_IVRApplications_FnTable.GetApplicationsErrorNameFromEnum_callback GetApplicationsErrorNameFromEnum; + /** C type : GetApplicationPropertyString_callback* */ + public VR_IVRApplications_FnTable.GetApplicationPropertyString_callback GetApplicationPropertyString; + /** C type : GetApplicationPropertyBool_callback* */ + public VR_IVRApplications_FnTable.GetApplicationPropertyBool_callback GetApplicationPropertyBool; + /** C type : GetApplicationPropertyUint64_callback* */ + public VR_IVRApplications_FnTable.GetApplicationPropertyUint64_callback GetApplicationPropertyUint64; + /** C type : SetApplicationAutoLaunch_callback* */ + public VR_IVRApplications_FnTable.SetApplicationAutoLaunch_callback SetApplicationAutoLaunch; + /** C type : GetApplicationAutoLaunch_callback* */ + public VR_IVRApplications_FnTable.GetApplicationAutoLaunch_callback GetApplicationAutoLaunch; + /** C type : SetDefaultApplicationForMimeType_callback* */ + public VR_IVRApplications_FnTable.SetDefaultApplicationForMimeType_callback SetDefaultApplicationForMimeType; + /** C type : GetDefaultApplicationForMimeType_callback* */ + public VR_IVRApplications_FnTable.GetDefaultApplicationForMimeType_callback GetDefaultApplicationForMimeType; + /** C type : GetApplicationSupportedMimeTypes_callback* */ + public VR_IVRApplications_FnTable.GetApplicationSupportedMimeTypes_callback GetApplicationSupportedMimeTypes; + /** C type : GetApplicationsThatSupportMimeType_callback* */ + public VR_IVRApplications_FnTable.GetApplicationsThatSupportMimeType_callback GetApplicationsThatSupportMimeType; + /** C type : GetApplicationLaunchArguments_callback* */ + public VR_IVRApplications_FnTable.GetApplicationLaunchArguments_callback GetApplicationLaunchArguments; + /** C type : GetStartingApplication_callback* */ + public VR_IVRApplications_FnTable.GetStartingApplication_callback GetStartingApplication; + /** C type : GetTransitionState_callback* */ + public VR_IVRApplications_FnTable.GetTransitionState_callback GetTransitionState; + /** C type : PerformApplicationPrelaunchCheck_callback* */ + public VR_IVRApplications_FnTable.PerformApplicationPrelaunchCheck_callback PerformApplicationPrelaunchCheck; + /** C type : GetApplicationsTransitionStateNameFromEnum_callback* */ + public VR_IVRApplications_FnTable.GetApplicationsTransitionStateNameFromEnum_callback GetApplicationsTransitionStateNameFromEnum; + /** C type : IsQuitUserPromptRequested_callback* */ + public VR_IVRApplications_FnTable.IsQuitUserPromptRequested_callback IsQuitUserPromptRequested; + /** C type : LaunchInternalProcess_callback* */ + public VR_IVRApplications_FnTable.LaunchInternalProcess_callback LaunchInternalProcess; + /** C type : GetCurrentSceneProcessId_callback* */ + public VR_IVRApplications_FnTable.GetCurrentSceneProcessId_callback GetCurrentSceneProcessId; + /** native declaration : headers\openvr_capi.h:1866 */ + public interface AddApplicationManifest_callback extends Callback { + int apply(Pointer pchApplicationManifestFullPath, byte bTemporary); + }; + /** native declaration : headers\openvr_capi.h:1867 */ + public interface RemoveApplicationManifest_callback extends Callback { + int apply(Pointer pchApplicationManifestFullPath); + }; + /** native declaration : headers\openvr_capi.h:1868 */ + public interface IsApplicationInstalled_callback extends Callback { + byte apply(Pointer pchAppKey); + }; + /** native declaration : headers\openvr_capi.h:1869 */ + public interface GetApplicationCount_callback extends Callback { + int apply(); + }; + /** native declaration : headers\openvr_capi.h:1870 */ + public interface GetApplicationKeyByIndex_callback extends Callback { + int apply(int unApplicationIndex, Pointer pchAppKeyBuffer, int unAppKeyBufferLen); + }; + /** native declaration : headers\openvr_capi.h:1871 */ + public interface GetApplicationKeyByProcessId_callback extends Callback { + int apply(int unProcessId, Pointer pchAppKeyBuffer, int unAppKeyBufferLen); + }; + /** native declaration : headers\openvr_capi.h:1872 */ + public interface LaunchApplication_callback extends Callback { + int apply(Pointer pchAppKey); + }; + /** native declaration : headers\openvr_capi.h:1873 */ + public interface LaunchTemplateApplication_callback extends Callback { + int apply(Pointer pchTemplateAppKey, Pointer pchNewAppKey, AppOverrideKeys_t pKeys, int unKeys); + }; + /** native declaration : headers\openvr_capi.h:1874 */ + public interface LaunchApplicationFromMimeType_callback extends Callback { + int apply(Pointer pchMimeType, Pointer pchArgs); + }; + /** native declaration : headers\openvr_capi.h:1875 */ + public interface LaunchDashboardOverlay_callback extends Callback { + int apply(Pointer pchAppKey); + }; + /** native declaration : headers\openvr_capi.h:1876 */ + public interface CancelApplicationLaunch_callback extends Callback { + byte apply(Pointer pchAppKey); + }; + /** native declaration : headers\openvr_capi.h:1877 */ + public interface IdentifyApplication_callback extends Callback { + int apply(int unProcessId, Pointer pchAppKey); + }; + /** native declaration : headers\openvr_capi.h:1878 */ + public interface GetApplicationProcessId_callback extends Callback { + int apply(Pointer pchAppKey); + }; + /** native declaration : headers\openvr_capi.h:1879 */ + public interface GetApplicationsErrorNameFromEnum_callback extends Callback { + Pointer apply(int error); + }; + /** native declaration : headers\openvr_capi.h:1880 */ + public interface GetApplicationPropertyString_callback extends Callback { + int apply(Pointer pchAppKey, int eProperty, Pointer pchPropertyValueBuffer, int unPropertyValueBufferLen, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:1881 */ + public interface GetApplicationPropertyBool_callback extends Callback { + byte apply(Pointer pchAppKey, int eProperty, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:1882 */ + public interface GetApplicationPropertyUint64_callback extends Callback { + long apply(Pointer pchAppKey, int eProperty, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:1883 */ + public interface SetApplicationAutoLaunch_callback extends Callback { + int apply(Pointer pchAppKey, byte bAutoLaunch); + }; + /** native declaration : headers\openvr_capi.h:1884 */ + public interface GetApplicationAutoLaunch_callback extends Callback { + byte apply(Pointer pchAppKey); + }; + /** native declaration : headers\openvr_capi.h:1885 */ + public interface SetDefaultApplicationForMimeType_callback extends Callback { + int apply(Pointer pchAppKey, Pointer pchMimeType); + }; + /** native declaration : headers\openvr_capi.h:1886 */ + public interface GetDefaultApplicationForMimeType_callback extends Callback { + byte apply(Pointer pchMimeType, Pointer pchAppKeyBuffer, int unAppKeyBufferLen); + }; + /** native declaration : headers\openvr_capi.h:1887 */ + public interface GetApplicationSupportedMimeTypes_callback extends Callback { + byte apply(Pointer pchAppKey, Pointer pchMimeTypesBuffer, int unMimeTypesBuffer); + }; + /** native declaration : headers\openvr_capi.h:1888 */ + public interface GetApplicationsThatSupportMimeType_callback extends Callback { + int apply(Pointer pchMimeType, Pointer pchAppKeysThatSupportBuffer, int unAppKeysThatSupportBuffer); + }; + /** native declaration : headers\openvr_capi.h:1889 */ + public interface GetApplicationLaunchArguments_callback extends Callback { + int apply(int unHandle, Pointer pchArgs, int unArgs); + }; + /** native declaration : headers\openvr_capi.h:1890 */ + public interface GetStartingApplication_callback extends Callback { + int apply(Pointer pchAppKeyBuffer, int unAppKeyBufferLen); + }; + /** native declaration : headers\openvr_capi.h:1891 */ + public interface GetTransitionState_callback extends Callback { + int apply(); + }; + /** native declaration : headers\openvr_capi.h:1892 */ + public interface PerformApplicationPrelaunchCheck_callback extends Callback { + int apply(Pointer pchAppKey); + }; + /** native declaration : headers\openvr_capi.h:1893 */ + public interface GetApplicationsTransitionStateNameFromEnum_callback extends Callback { + Pointer apply(int state); + }; + /** native declaration : headers\openvr_capi.h:1894 */ + public interface IsQuitUserPromptRequested_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:1895 */ + public interface LaunchInternalProcess_callback extends Callback { + int apply(Pointer pchBinaryPath, Pointer pchArguments, Pointer pchWorkingDirectory); + }; + /** native declaration : headers\openvr_capi.h:1896 */ + public interface GetCurrentSceneProcessId_callback extends Callback { + int apply(); + }; + public VR_IVRApplications_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("AddApplicationManifest", "RemoveApplicationManifest", "IsApplicationInstalled", "GetApplicationCount", "GetApplicationKeyByIndex", "GetApplicationKeyByProcessId", "LaunchApplication", "LaunchTemplateApplication", "LaunchApplicationFromMimeType", "LaunchDashboardOverlay", "CancelApplicationLaunch", "IdentifyApplication", "GetApplicationProcessId", "GetApplicationsErrorNameFromEnum", "GetApplicationPropertyString", "GetApplicationPropertyBool", "GetApplicationPropertyUint64", "SetApplicationAutoLaunch", "GetApplicationAutoLaunch", "SetDefaultApplicationForMimeType", "GetDefaultApplicationForMimeType", "GetApplicationSupportedMimeTypes", "GetApplicationsThatSupportMimeType", "GetApplicationLaunchArguments", "GetStartingApplication", "GetTransitionState", "PerformApplicationPrelaunchCheck", "GetApplicationsTransitionStateNameFromEnum", "IsQuitUserPromptRequested", "LaunchInternalProcess", "GetCurrentSceneProcessId"); + } + public VR_IVRApplications_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRApplications_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRApplications_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRChaperoneSetup_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRChaperoneSetup_FnTable.java index 32708848f7..36be54ea5b 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRChaperoneSetup_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRChaperoneSetup_FnTable.java @@ -7,145 +7,145 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1574
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRChaperoneSetup_FnTable extends Structure { - /** C type : CommitWorkingCopy_callback* */ - public VR_IVRChaperoneSetup_FnTable.CommitWorkingCopy_callback CommitWorkingCopy; - /** C type : RevertWorkingCopy_callback* */ - public VR_IVRChaperoneSetup_FnTable.RevertWorkingCopy_callback RevertWorkingCopy; - /** C type : GetWorkingPlayAreaSize_callback* */ - public VR_IVRChaperoneSetup_FnTable.GetWorkingPlayAreaSize_callback GetWorkingPlayAreaSize; - /** C type : GetWorkingPlayAreaRect_callback* */ - public VR_IVRChaperoneSetup_FnTable.GetWorkingPlayAreaRect_callback GetWorkingPlayAreaRect; - /** C type : GetWorkingCollisionBoundsInfo_callback* */ - public VR_IVRChaperoneSetup_FnTable.GetWorkingCollisionBoundsInfo_callback GetWorkingCollisionBoundsInfo; - /** C type : GetLiveCollisionBoundsInfo_callback* */ - public VR_IVRChaperoneSetup_FnTable.GetLiveCollisionBoundsInfo_callback GetLiveCollisionBoundsInfo; - /** C type : GetWorkingSeatedZeroPoseToRawTrackingPose_callback* */ - public VR_IVRChaperoneSetup_FnTable.GetWorkingSeatedZeroPoseToRawTrackingPose_callback GetWorkingSeatedZeroPoseToRawTrackingPose; - /** C type : GetWorkingStandingZeroPoseToRawTrackingPose_callback* */ - public VR_IVRChaperoneSetup_FnTable.GetWorkingStandingZeroPoseToRawTrackingPose_callback GetWorkingStandingZeroPoseToRawTrackingPose; - /** C type : SetWorkingPlayAreaSize_callback* */ - public VR_IVRChaperoneSetup_FnTable.SetWorkingPlayAreaSize_callback SetWorkingPlayAreaSize; - /** C type : SetWorkingCollisionBoundsInfo_callback* */ - public VR_IVRChaperoneSetup_FnTable.SetWorkingCollisionBoundsInfo_callback SetWorkingCollisionBoundsInfo; - /** C type : SetWorkingSeatedZeroPoseToRawTrackingPose_callback* */ - public VR_IVRChaperoneSetup_FnTable.SetWorkingSeatedZeroPoseToRawTrackingPose_callback SetWorkingSeatedZeroPoseToRawTrackingPose; - /** C type : SetWorkingStandingZeroPoseToRawTrackingPose_callback* */ - public VR_IVRChaperoneSetup_FnTable.SetWorkingStandingZeroPoseToRawTrackingPose_callback SetWorkingStandingZeroPoseToRawTrackingPose; - /** C type : ReloadFromDisk_callback* */ - public VR_IVRChaperoneSetup_FnTable.ReloadFromDisk_callback ReloadFromDisk; - /** C type : GetLiveSeatedZeroPoseToRawTrackingPose_callback* */ - public VR_IVRChaperoneSetup_FnTable.GetLiveSeatedZeroPoseToRawTrackingPose_callback GetLiveSeatedZeroPoseToRawTrackingPose; - /** C type : SetWorkingCollisionBoundsTagsInfo_callback* */ - public VR_IVRChaperoneSetup_FnTable.SetWorkingCollisionBoundsTagsInfo_callback SetWorkingCollisionBoundsTagsInfo; - /** C type : GetLiveCollisionBoundsTagsInfo_callback* */ - public VR_IVRChaperoneSetup_FnTable.GetLiveCollisionBoundsTagsInfo_callback GetLiveCollisionBoundsTagsInfo; - /** C type : SetWorkingPhysicalBoundsInfo_callback* */ - public VR_IVRChaperoneSetup_FnTable.SetWorkingPhysicalBoundsInfo_callback SetWorkingPhysicalBoundsInfo; - /** C type : GetLivePhysicalBoundsInfo_callback* */ - public VR_IVRChaperoneSetup_FnTable.GetLivePhysicalBoundsInfo_callback GetLivePhysicalBoundsInfo; - /** C type : ExportLiveToBuffer_callback* */ - public VR_IVRChaperoneSetup_FnTable.ExportLiveToBuffer_callback ExportLiveToBuffer; - /** C type : ImportFromBufferToWorking_callback* */ - public VR_IVRChaperoneSetup_FnTable.ImportFromBufferToWorking_callback ImportFromBufferToWorking; - /** native declaration : headers\openvr_capi.h:1554 */ - public interface CommitWorkingCopy_callback extends Callback { - byte apply(int configFile); - }; - /** native declaration : headers\openvr_capi.h:1555 */ - public interface RevertWorkingCopy_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1556 */ - public interface GetWorkingPlayAreaSize_callback extends Callback { - byte apply(FloatByReference pSizeX, FloatByReference pSizeZ); - }; - /** native declaration : headers\openvr_capi.h:1557 */ - public interface GetWorkingPlayAreaRect_callback extends Callback { - byte apply(HmdQuad_t rect); - }; - /** native declaration : headers\openvr_capi.h:1558 */ - public interface GetWorkingCollisionBoundsInfo_callback extends Callback { - byte apply(HmdQuad_t pQuadsBuffer, IntByReference punQuadsCount); - }; - /** native declaration : headers\openvr_capi.h:1559 */ - public interface GetLiveCollisionBoundsInfo_callback extends Callback { - byte apply(HmdQuad_t pQuadsBuffer, IntByReference punQuadsCount); - }; - /** native declaration : headers\openvr_capi.h:1560 */ - public interface GetWorkingSeatedZeroPoseToRawTrackingPose_callback extends Callback { - byte apply(HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose); - }; - /** native declaration : headers\openvr_capi.h:1561 */ - public interface GetWorkingStandingZeroPoseToRawTrackingPose_callback extends Callback { - byte apply(HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose); - }; - /** native declaration : headers\openvr_capi.h:1562 */ - public interface SetWorkingPlayAreaSize_callback extends Callback { - void apply(float sizeX, float sizeZ); - }; - /** native declaration : headers\openvr_capi.h:1563 */ - public interface SetWorkingCollisionBoundsInfo_callback extends Callback { - void apply(HmdQuad_t pQuadsBuffer, int unQuadsCount); - }; - /** native declaration : headers\openvr_capi.h:1564 */ - public interface SetWorkingSeatedZeroPoseToRawTrackingPose_callback extends Callback { - void apply(HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose); - }; - /** native declaration : headers\openvr_capi.h:1565 */ - public interface SetWorkingStandingZeroPoseToRawTrackingPose_callback extends Callback { - void apply(HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose); - }; - /** native declaration : headers\openvr_capi.h:1566 */ - public interface ReloadFromDisk_callback extends Callback { - void apply(int configFile); - }; - /** native declaration : headers\openvr_capi.h:1567 */ - public interface GetLiveSeatedZeroPoseToRawTrackingPose_callback extends Callback { - byte apply(HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose); - }; - /** native declaration : headers\openvr_capi.h:1568 */ - public interface SetWorkingCollisionBoundsTagsInfo_callback extends Callback { - void apply(Pointer pTagsBuffer, int unTagCount); - }; - /** native declaration : headers\openvr_capi.h:1569 */ - public interface GetLiveCollisionBoundsTagsInfo_callback extends Callback { - byte apply(Pointer pTagsBuffer, IntByReference punTagCount); - }; - /** native declaration : headers\openvr_capi.h:1570 */ - public interface SetWorkingPhysicalBoundsInfo_callback extends Callback { - byte apply(HmdQuad_t pQuadsBuffer, int unQuadsCount); - }; - /** native declaration : headers\openvr_capi.h:1571 */ - public interface GetLivePhysicalBoundsInfo_callback extends Callback { - byte apply(HmdQuad_t pQuadsBuffer, IntByReference punQuadsCount); - }; - /** native declaration : headers\openvr_capi.h:1572 */ - public interface ExportLiveToBuffer_callback extends Callback { - byte apply(Pointer pBuffer, IntByReference pnBufferLength); - }; - /** native declaration : headers\openvr_capi.h:1573 */ - public interface ImportFromBufferToWorking_callback extends Callback { - byte apply(Pointer pBuffer, int nImportFlags); - }; - public VR_IVRChaperoneSetup_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("CommitWorkingCopy", "RevertWorkingCopy", "GetWorkingPlayAreaSize", "GetWorkingPlayAreaRect", "GetWorkingCollisionBoundsInfo", "GetLiveCollisionBoundsInfo", "GetWorkingSeatedZeroPoseToRawTrackingPose", "GetWorkingStandingZeroPoseToRawTrackingPose", "SetWorkingPlayAreaSize", "SetWorkingCollisionBoundsInfo", "SetWorkingSeatedZeroPoseToRawTrackingPose", "SetWorkingStandingZeroPoseToRawTrackingPose", "ReloadFromDisk", "GetLiveSeatedZeroPoseToRawTrackingPose", "SetWorkingCollisionBoundsTagsInfo", "GetLiveCollisionBoundsTagsInfo", "SetWorkingPhysicalBoundsInfo", "GetLivePhysicalBoundsInfo", "ExportLiveToBuffer", "ImportFromBufferToWorking"); - } - public VR_IVRChaperoneSetup_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRChaperoneSetup_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRChaperoneSetup_FnTable implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1957
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRChaperoneSetup_FnTable extends Structure { + /** C type : CommitWorkingCopy_callback* */ + public VR_IVRChaperoneSetup_FnTable.CommitWorkingCopy_callback CommitWorkingCopy; + /** C type : RevertWorkingCopy_callback* */ + public VR_IVRChaperoneSetup_FnTable.RevertWorkingCopy_callback RevertWorkingCopy; + /** C type : GetWorkingPlayAreaSize_callback* */ + public VR_IVRChaperoneSetup_FnTable.GetWorkingPlayAreaSize_callback GetWorkingPlayAreaSize; + /** C type : GetWorkingPlayAreaRect_callback* */ + public VR_IVRChaperoneSetup_FnTable.GetWorkingPlayAreaRect_callback GetWorkingPlayAreaRect; + /** C type : GetWorkingCollisionBoundsInfo_callback* */ + public VR_IVRChaperoneSetup_FnTable.GetWorkingCollisionBoundsInfo_callback GetWorkingCollisionBoundsInfo; + /** C type : GetLiveCollisionBoundsInfo_callback* */ + public VR_IVRChaperoneSetup_FnTable.GetLiveCollisionBoundsInfo_callback GetLiveCollisionBoundsInfo; + /** C type : GetWorkingSeatedZeroPoseToRawTrackingPose_callback* */ + public VR_IVRChaperoneSetup_FnTable.GetWorkingSeatedZeroPoseToRawTrackingPose_callback GetWorkingSeatedZeroPoseToRawTrackingPose; + /** C type : GetWorkingStandingZeroPoseToRawTrackingPose_callback* */ + public VR_IVRChaperoneSetup_FnTable.GetWorkingStandingZeroPoseToRawTrackingPose_callback GetWorkingStandingZeroPoseToRawTrackingPose; + /** C type : SetWorkingPlayAreaSize_callback* */ + public VR_IVRChaperoneSetup_FnTable.SetWorkingPlayAreaSize_callback SetWorkingPlayAreaSize; + /** C type : SetWorkingCollisionBoundsInfo_callback* */ + public VR_IVRChaperoneSetup_FnTable.SetWorkingCollisionBoundsInfo_callback SetWorkingCollisionBoundsInfo; + /** C type : SetWorkingSeatedZeroPoseToRawTrackingPose_callback* */ + public VR_IVRChaperoneSetup_FnTable.SetWorkingSeatedZeroPoseToRawTrackingPose_callback SetWorkingSeatedZeroPoseToRawTrackingPose; + /** C type : SetWorkingStandingZeroPoseToRawTrackingPose_callback* */ + public VR_IVRChaperoneSetup_FnTable.SetWorkingStandingZeroPoseToRawTrackingPose_callback SetWorkingStandingZeroPoseToRawTrackingPose; + /** C type : ReloadFromDisk_callback* */ + public VR_IVRChaperoneSetup_FnTable.ReloadFromDisk_callback ReloadFromDisk; + /** C type : GetLiveSeatedZeroPoseToRawTrackingPose_callback* */ + public VR_IVRChaperoneSetup_FnTable.GetLiveSeatedZeroPoseToRawTrackingPose_callback GetLiveSeatedZeroPoseToRawTrackingPose; + /** C type : SetWorkingCollisionBoundsTagsInfo_callback* */ + public VR_IVRChaperoneSetup_FnTable.SetWorkingCollisionBoundsTagsInfo_callback SetWorkingCollisionBoundsTagsInfo; + /** C type : GetLiveCollisionBoundsTagsInfo_callback* */ + public VR_IVRChaperoneSetup_FnTable.GetLiveCollisionBoundsTagsInfo_callback GetLiveCollisionBoundsTagsInfo; + /** C type : SetWorkingPhysicalBoundsInfo_callback* */ + public VR_IVRChaperoneSetup_FnTable.SetWorkingPhysicalBoundsInfo_callback SetWorkingPhysicalBoundsInfo; + /** C type : GetLivePhysicalBoundsInfo_callback* */ + public VR_IVRChaperoneSetup_FnTable.GetLivePhysicalBoundsInfo_callback GetLivePhysicalBoundsInfo; + /** C type : ExportLiveToBuffer_callback* */ + public VR_IVRChaperoneSetup_FnTable.ExportLiveToBuffer_callback ExportLiveToBuffer; + /** C type : ImportFromBufferToWorking_callback* */ + public VR_IVRChaperoneSetup_FnTable.ImportFromBufferToWorking_callback ImportFromBufferToWorking; + /** native declaration : headers\openvr_capi.h:1937 */ + public interface CommitWorkingCopy_callback extends Callback { + byte apply(int configFile); + }; + /** native declaration : headers\openvr_capi.h:1938 */ + public interface RevertWorkingCopy_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:1939 */ + public interface GetWorkingPlayAreaSize_callback extends Callback { + byte apply(FloatByReference pSizeX, FloatByReference pSizeZ); + }; + /** native declaration : headers\openvr_capi.h:1940 */ + public interface GetWorkingPlayAreaRect_callback extends Callback { + byte apply(HmdQuad_t rect); + }; + /** native declaration : headers\openvr_capi.h:1941 */ + public interface GetWorkingCollisionBoundsInfo_callback extends Callback { + byte apply(HmdQuad_t pQuadsBuffer, IntByReference punQuadsCount); + }; + /** native declaration : headers\openvr_capi.h:1942 */ + public interface GetLiveCollisionBoundsInfo_callback extends Callback { + byte apply(HmdQuad_t pQuadsBuffer, IntByReference punQuadsCount); + }; + /** native declaration : headers\openvr_capi.h:1943 */ + public interface GetWorkingSeatedZeroPoseToRawTrackingPose_callback extends Callback { + byte apply(HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose); + }; + /** native declaration : headers\openvr_capi.h:1944 */ + public interface GetWorkingStandingZeroPoseToRawTrackingPose_callback extends Callback { + byte apply(HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose); + }; + /** native declaration : headers\openvr_capi.h:1945 */ + public interface SetWorkingPlayAreaSize_callback extends Callback { + void apply(float sizeX, float sizeZ); + }; + /** native declaration : headers\openvr_capi.h:1946 */ + public interface SetWorkingCollisionBoundsInfo_callback extends Callback { + void apply(HmdQuad_t pQuadsBuffer, int unQuadsCount); + }; + /** native declaration : headers\openvr_capi.h:1947 */ + public interface SetWorkingSeatedZeroPoseToRawTrackingPose_callback extends Callback { + void apply(HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose); + }; + /** native declaration : headers\openvr_capi.h:1948 */ + public interface SetWorkingStandingZeroPoseToRawTrackingPose_callback extends Callback { + void apply(HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose); + }; + /** native declaration : headers\openvr_capi.h:1949 */ + public interface ReloadFromDisk_callback extends Callback { + void apply(int configFile); + }; + /** native declaration : headers\openvr_capi.h:1950 */ + public interface GetLiveSeatedZeroPoseToRawTrackingPose_callback extends Callback { + byte apply(HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose); + }; + /** native declaration : headers\openvr_capi.h:1951 */ + public interface SetWorkingCollisionBoundsTagsInfo_callback extends Callback { + void apply(Pointer pTagsBuffer, int unTagCount); + }; + /** native declaration : headers\openvr_capi.h:1952 */ + public interface GetLiveCollisionBoundsTagsInfo_callback extends Callback { + byte apply(Pointer pTagsBuffer, IntByReference punTagCount); + }; + /** native declaration : headers\openvr_capi.h:1953 */ + public interface SetWorkingPhysicalBoundsInfo_callback extends Callback { + byte apply(HmdQuad_t pQuadsBuffer, int unQuadsCount); + }; + /** native declaration : headers\openvr_capi.h:1954 */ + public interface GetLivePhysicalBoundsInfo_callback extends Callback { + byte apply(HmdQuad_t pQuadsBuffer, IntByReference punQuadsCount); + }; + /** native declaration : headers\openvr_capi.h:1955 */ + public interface ExportLiveToBuffer_callback extends Callback { + byte apply(Pointer pBuffer, IntByReference pnBufferLength); + }; + /** native declaration : headers\openvr_capi.h:1956 */ + public interface ImportFromBufferToWorking_callback extends Callback { + byte apply(Pointer pBuffer, int nImportFlags); + }; + public VR_IVRChaperoneSetup_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("CommitWorkingCopy", "RevertWorkingCopy", "GetWorkingPlayAreaSize", "GetWorkingPlayAreaRect", "GetWorkingCollisionBoundsInfo", "GetLiveCollisionBoundsInfo", "GetWorkingSeatedZeroPoseToRawTrackingPose", "GetWorkingStandingZeroPoseToRawTrackingPose", "SetWorkingPlayAreaSize", "SetWorkingCollisionBoundsInfo", "SetWorkingSeatedZeroPoseToRawTrackingPose", "SetWorkingStandingZeroPoseToRawTrackingPose", "ReloadFromDisk", "GetLiveSeatedZeroPoseToRawTrackingPose", "SetWorkingCollisionBoundsTagsInfo", "GetLiveCollisionBoundsTagsInfo", "SetWorkingPhysicalBoundsInfo", "GetLivePhysicalBoundsInfo", "ExportLiveToBuffer", "ImportFromBufferToWorking"); + } + public VR_IVRChaperoneSetup_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRChaperoneSetup_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRChaperoneSetup_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRChaperone_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRChaperone_FnTable.java index 4d34575267..6d71c06af7 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRChaperone_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRChaperone_FnTable.java @@ -6,94 +6,94 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1532
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRChaperone_FnTable extends Structure { - /** C type : GetCalibrationState_callback* */ - public VR_IVRChaperone_FnTable.GetCalibrationState_callback GetCalibrationState; - /** C type : GetPlayAreaSize_callback* */ - public VR_IVRChaperone_FnTable.GetPlayAreaSize_callback GetPlayAreaSize; - /** C type : GetPlayAreaRect_callback* */ - public VR_IVRChaperone_FnTable.GetPlayAreaRect_callback GetPlayAreaRect; - /** C type : ReloadInfo_callback* */ - public VR_IVRChaperone_FnTable.ReloadInfo_callback ReloadInfo; - /** C type : SetSceneColor_callback* */ - public VR_IVRChaperone_FnTable.SetSceneColor_callback SetSceneColor; - /** C type : GetBoundsColor_callback* */ - public VR_IVRChaperone_FnTable.GetBoundsColor_callback GetBoundsColor; - /** C type : AreBoundsVisible_callback* */ - public VR_IVRChaperone_FnTable.AreBoundsVisible_callback AreBoundsVisible; - /** C type : ForceBoundsVisible_callback* */ - public VR_IVRChaperone_FnTable.ForceBoundsVisible_callback ForceBoundsVisible; - /** native declaration : headers\openvr_capi.h:1524 */ - public interface GetCalibrationState_callback extends Callback { - int apply(); - }; - /** native declaration : headers\openvr_capi.h:1525 */ - public interface GetPlayAreaSize_callback extends Callback { - byte apply(FloatByReference pSizeX, FloatByReference pSizeZ); - }; - /** native declaration : headers\openvr_capi.h:1526 */ - public interface GetPlayAreaRect_callback extends Callback { - byte apply(HmdQuad_t rect); - }; - /** native declaration : headers\openvr_capi.h:1527 */ - public interface ReloadInfo_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1528 */ - public interface SetSceneColor_callback extends Callback { - void apply(HmdColor_t.ByValue color); - }; - /** native declaration : headers\openvr_capi.h:1529 */ - public interface GetBoundsColor_callback extends Callback { - void apply(HmdColor_t pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t pOutputCameraColor); - }; - /** native declaration : headers\openvr_capi.h:1530 */ - public interface AreBoundsVisible_callback extends Callback { - byte apply(); - }; - /** native declaration : headers\openvr_capi.h:1531 */ - public interface ForceBoundsVisible_callback extends Callback { - void apply(byte bForce); - }; - public VR_IVRChaperone_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("GetCalibrationState", "GetPlayAreaSize", "GetPlayAreaRect", "ReloadInfo", "SetSceneColor", "GetBoundsColor", "AreBoundsVisible", "ForceBoundsVisible"); - } + * native declaration : headers\openvr_capi.h:1915
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRChaperone_FnTable extends Structure { + /** C type : GetCalibrationState_callback* */ + public VR_IVRChaperone_FnTable.GetCalibrationState_callback GetCalibrationState; + /** C type : GetPlayAreaSize_callback* */ + public VR_IVRChaperone_FnTable.GetPlayAreaSize_callback GetPlayAreaSize; + /** C type : GetPlayAreaRect_callback* */ + public VR_IVRChaperone_FnTable.GetPlayAreaRect_callback GetPlayAreaRect; + /** C type : ReloadInfo_callback* */ + public VR_IVRChaperone_FnTable.ReloadInfo_callback ReloadInfo; + /** C type : SetSceneColor_callback* */ + public VR_IVRChaperone_FnTable.SetSceneColor_callback SetSceneColor; + /** C type : GetBoundsColor_callback* */ + public VR_IVRChaperone_FnTable.GetBoundsColor_callback GetBoundsColor; + /** C type : AreBoundsVisible_callback* */ + public VR_IVRChaperone_FnTable.AreBoundsVisible_callback AreBoundsVisible; + /** C type : ForceBoundsVisible_callback* */ + public VR_IVRChaperone_FnTable.ForceBoundsVisible_callback ForceBoundsVisible; + /** native declaration : headers\openvr_capi.h:1907 */ + public interface GetCalibrationState_callback extends Callback { + int apply(); + }; + /** native declaration : headers\openvr_capi.h:1908 */ + public interface GetPlayAreaSize_callback extends Callback { + byte apply(FloatByReference pSizeX, FloatByReference pSizeZ); + }; + /** native declaration : headers\openvr_capi.h:1909 */ + public interface GetPlayAreaRect_callback extends Callback { + byte apply(HmdQuad_t rect); + }; + /** native declaration : headers\openvr_capi.h:1910 */ + public interface ReloadInfo_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:1911 */ + public interface SetSceneColor_callback extends Callback { + void apply(HmdColor_t.ByValue color); + }; + /** native declaration : headers\openvr_capi.h:1912 */ + public interface GetBoundsColor_callback extends Callback { + void apply(HmdColor_t pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, HmdColor_t pOutputCameraColor); + }; + /** native declaration : headers\openvr_capi.h:1913 */ + public interface AreBoundsVisible_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:1914 */ + public interface ForceBoundsVisible_callback extends Callback { + void apply(byte bForce); + }; + public VR_IVRChaperone_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("GetCalibrationState", "GetPlayAreaSize", "GetPlayAreaRect", "ReloadInfo", "SetSceneColor", "GetBoundsColor", "AreBoundsVisible", "ForceBoundsVisible"); + } /** - * @param GetCalibrationState C type : GetCalibrationState_callback*
- * @param GetPlayAreaSize C type : GetPlayAreaSize_callback*
- * @param GetPlayAreaRect C type : GetPlayAreaRect_callback*
- * @param ReloadInfo C type : ReloadInfo_callback*
- * @param SetSceneColor C type : SetSceneColor_callback*
- * @param GetBoundsColor C type : GetBoundsColor_callback*
- * @param AreBoundsVisible C type : AreBoundsVisible_callback*
- * @param ForceBoundsVisible C type : ForceBoundsVisible_callback* - */ - public VR_IVRChaperone_FnTable(VR_IVRChaperone_FnTable.GetCalibrationState_callback GetCalibrationState, VR_IVRChaperone_FnTable.GetPlayAreaSize_callback GetPlayAreaSize, VR_IVRChaperone_FnTable.GetPlayAreaRect_callback GetPlayAreaRect, VR_IVRChaperone_FnTable.ReloadInfo_callback ReloadInfo, VR_IVRChaperone_FnTable.SetSceneColor_callback SetSceneColor, VR_IVRChaperone_FnTable.GetBoundsColor_callback GetBoundsColor, VR_IVRChaperone_FnTable.AreBoundsVisible_callback AreBoundsVisible, VR_IVRChaperone_FnTable.ForceBoundsVisible_callback ForceBoundsVisible) { - super(); - this.GetCalibrationState = GetCalibrationState; - this.GetPlayAreaSize = GetPlayAreaSize; - this.GetPlayAreaRect = GetPlayAreaRect; - this.ReloadInfo = ReloadInfo; - this.SetSceneColor = SetSceneColor; - this.GetBoundsColor = GetBoundsColor; - this.AreBoundsVisible = AreBoundsVisible; - this.ForceBoundsVisible = ForceBoundsVisible; - } - public VR_IVRChaperone_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRChaperone_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRChaperone_FnTable implements Structure.ByValue { - - }; + * @param GetCalibrationState C type : GetCalibrationState_callback*
+ * @param GetPlayAreaSize C type : GetPlayAreaSize_callback*
+ * @param GetPlayAreaRect C type : GetPlayAreaRect_callback*
+ * @param ReloadInfo C type : ReloadInfo_callback*
+ * @param SetSceneColor C type : SetSceneColor_callback*
+ * @param GetBoundsColor C type : GetBoundsColor_callback*
+ * @param AreBoundsVisible C type : AreBoundsVisible_callback*
+ * @param ForceBoundsVisible C type : ForceBoundsVisible_callback* + */ + public VR_IVRChaperone_FnTable(VR_IVRChaperone_FnTable.GetCalibrationState_callback GetCalibrationState, VR_IVRChaperone_FnTable.GetPlayAreaSize_callback GetPlayAreaSize, VR_IVRChaperone_FnTable.GetPlayAreaRect_callback GetPlayAreaRect, VR_IVRChaperone_FnTable.ReloadInfo_callback ReloadInfo, VR_IVRChaperone_FnTable.SetSceneColor_callback SetSceneColor, VR_IVRChaperone_FnTable.GetBoundsColor_callback GetBoundsColor, VR_IVRChaperone_FnTable.AreBoundsVisible_callback AreBoundsVisible, VR_IVRChaperone_FnTable.ForceBoundsVisible_callback ForceBoundsVisible) { + super(); + this.GetCalibrationState = GetCalibrationState; + this.GetPlayAreaSize = GetPlayAreaSize; + this.GetPlayAreaRect = GetPlayAreaRect; + this.ReloadInfo = ReloadInfo; + this.SetSceneColor = SetSceneColor; + this.GetBoundsColor = GetBoundsColor; + this.AreBoundsVisible = AreBoundsVisible; + this.ForceBoundsVisible = ForceBoundsVisible; + } + public VR_IVRChaperone_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRChaperone_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRChaperone_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRCompositor_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRCompositor_FnTable.java index d9f34b6187..f4154dfdac 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRCompositor_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRCompositor_FnTable.java @@ -8,271 +8,283 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1658
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRCompositor_FnTable extends Structure { - /** C type : SetTrackingSpace_callback* */ - public VR_IVRCompositor_FnTable.SetTrackingSpace_callback SetTrackingSpace; - /** C type : GetTrackingSpace_callback* */ - public VR_IVRCompositor_FnTable.GetTrackingSpace_callback GetTrackingSpace; - /** C type : WaitGetPoses_callback* */ - public VR_IVRCompositor_FnTable.WaitGetPoses_callback WaitGetPoses; - /** C type : GetLastPoses_callback* */ - public VR_IVRCompositor_FnTable.GetLastPoses_callback GetLastPoses; - /** C type : GetLastPoseForTrackedDeviceIndex_callback* */ - public VR_IVRCompositor_FnTable.GetLastPoseForTrackedDeviceIndex_callback GetLastPoseForTrackedDeviceIndex; - /** C type : Submit_callback* */ - public VR_IVRCompositor_FnTable.Submit_callback Submit; - /** C type : ClearLastSubmittedFrame_callback* */ - public VR_IVRCompositor_FnTable.ClearLastSubmittedFrame_callback ClearLastSubmittedFrame; - /** C type : PostPresentHandoff_callback* */ - public VR_IVRCompositor_FnTable.PostPresentHandoff_callback PostPresentHandoff; - /** C type : GetFrameTiming_callback* */ - public VR_IVRCompositor_FnTable.GetFrameTiming_callback GetFrameTiming; - /** C type : GetFrameTimings_callback* */ - public VR_IVRCompositor_FnTable.GetFrameTimings_callback GetFrameTimings; - /** C type : GetFrameTimeRemaining_callback* */ - public VR_IVRCompositor_FnTable.GetFrameTimeRemaining_callback GetFrameTimeRemaining; - /** C type : GetCumulativeStats_callback* */ - public VR_IVRCompositor_FnTable.GetCumulativeStats_callback GetCumulativeStats; - /** C type : FadeToColor_callback* */ - public VR_IVRCompositor_FnTable.FadeToColor_callback FadeToColor; - /** C type : GetCurrentFadeColor_callback* */ - public VR_IVRCompositor_FnTable.GetCurrentFadeColor_callback GetCurrentFadeColor; - /** C type : FadeGrid_callback* */ - public VR_IVRCompositor_FnTable.FadeGrid_callback FadeGrid; - /** C type : GetCurrentGridAlpha_callback* */ - public VR_IVRCompositor_FnTable.GetCurrentGridAlpha_callback GetCurrentGridAlpha; - /** C type : SetSkyboxOverride_callback* */ - public VR_IVRCompositor_FnTable.SetSkyboxOverride_callback SetSkyboxOverride; - /** C type : ClearSkyboxOverride_callback* */ - public VR_IVRCompositor_FnTable.ClearSkyboxOverride_callback ClearSkyboxOverride; - /** C type : CompositorBringToFront_callback* */ - public VR_IVRCompositor_FnTable.CompositorBringToFront_callback CompositorBringToFront; - /** C type : CompositorGoToBack_callback* */ - public VR_IVRCompositor_FnTable.CompositorGoToBack_callback CompositorGoToBack; - /** C type : CompositorQuit_callback* */ - public VR_IVRCompositor_FnTable.CompositorQuit_callback CompositorQuit; - /** C type : IsFullscreen_callback* */ - public VR_IVRCompositor_FnTable.IsFullscreen_callback IsFullscreen; - /** C type : GetCurrentSceneFocusProcess_callback* */ - public VR_IVRCompositor_FnTable.GetCurrentSceneFocusProcess_callback GetCurrentSceneFocusProcess; - /** C type : GetLastFrameRenderer_callback* */ - public VR_IVRCompositor_FnTable.GetLastFrameRenderer_callback GetLastFrameRenderer; - /** C type : CanRenderScene_callback* */ - public VR_IVRCompositor_FnTable.CanRenderScene_callback CanRenderScene; - /** C type : ShowMirrorWindow_callback* */ - public VR_IVRCompositor_FnTable.ShowMirrorWindow_callback ShowMirrorWindow; - /** C type : HideMirrorWindow_callback* */ - public VR_IVRCompositor_FnTable.HideMirrorWindow_callback HideMirrorWindow; - /** C type : IsMirrorWindowVisible_callback* */ - public VR_IVRCompositor_FnTable.IsMirrorWindowVisible_callback IsMirrorWindowVisible; - /** C type : CompositorDumpImages_callback* */ - public VR_IVRCompositor_FnTable.CompositorDumpImages_callback CompositorDumpImages; - /** C type : ShouldAppRenderWithLowResources_callback* */ - public VR_IVRCompositor_FnTable.ShouldAppRenderWithLowResources_callback ShouldAppRenderWithLowResources; - /** C type : ForceInterleavedReprojectionOn_callback* */ - public VR_IVRCompositor_FnTable.ForceInterleavedReprojectionOn_callback ForceInterleavedReprojectionOn; - /** C type : ForceReconnectProcess_callback* */ - public VR_IVRCompositor_FnTable.ForceReconnectProcess_callback ForceReconnectProcess; - /** C type : SuspendRendering_callback* */ - public VR_IVRCompositor_FnTable.SuspendRendering_callback SuspendRendering; - /** C type : GetMirrorTextureD3D11_callback* */ - public VR_IVRCompositor_FnTable.GetMirrorTextureD3D11_callback GetMirrorTextureD3D11; - /** C type : ReleaseMirrorTextureD3D11_callback* */ - public VR_IVRCompositor_FnTable.ReleaseMirrorTextureD3D11_callback ReleaseMirrorTextureD3D11; - /** C type : GetMirrorTextureGL_callback* */ - public VR_IVRCompositor_FnTable.GetMirrorTextureGL_callback GetMirrorTextureGL; - /** C type : ReleaseSharedGLTexture_callback* */ - public VR_IVRCompositor_FnTable.ReleaseSharedGLTexture_callback ReleaseSharedGLTexture; - /** C type : LockGLSharedTextureForAccess_callback* */ - public VR_IVRCompositor_FnTable.LockGLSharedTextureForAccess_callback LockGLSharedTextureForAccess; - /** C type : UnlockGLSharedTextureForAccess_callback* */ - public VR_IVRCompositor_FnTable.UnlockGLSharedTextureForAccess_callback UnlockGLSharedTextureForAccess; - /** C type : GetVulkanInstanceExtensionsRequired_callback* */ - public VR_IVRCompositor_FnTable.GetVulkanInstanceExtensionsRequired_callback GetVulkanInstanceExtensionsRequired; - /** C type : GetVulkanDeviceExtensionsRequired_callback* */ - public VR_IVRCompositor_FnTable.GetVulkanDeviceExtensionsRequired_callback GetVulkanDeviceExtensionsRequired; - /** native declaration : headers\openvr_capi.h:1617 */ - public interface SetTrackingSpace_callback extends Callback { - void apply(int eOrigin); - }; - /** native declaration : headers\openvr_capi.h:1618 */ - public interface GetTrackingSpace_callback extends Callback { - int apply(); - }; - /** native declaration : headers\openvr_capi.h:1619 */ - public interface WaitGetPoses_callback extends Callback { - int apply(TrackedDevicePose_t pRenderPoseArray, int unRenderPoseArrayCount, TrackedDevicePose_t pGamePoseArray, int unGamePoseArrayCount); - }; - /** native declaration : headers\openvr_capi.h:1620 */ - public interface GetLastPoses_callback extends Callback { - int apply(TrackedDevicePose_t pRenderPoseArray, int unRenderPoseArrayCount, TrackedDevicePose_t pGamePoseArray, int unGamePoseArrayCount); - }; - /** native declaration : headers\openvr_capi.h:1621 */ - public interface GetLastPoseForTrackedDeviceIndex_callback extends Callback { - int apply(int unDeviceIndex, TrackedDevicePose_t pOutputPose, TrackedDevicePose_t pOutputGamePose); - }; - /** native declaration : headers\openvr_capi.h:1622 */ - public interface Submit_callback extends Callback { - int apply(int eEye, Texture_t pTexture, VRTextureBounds_t pBounds, int nSubmitFlags); - }; - /** native declaration : headers\openvr_capi.h:1623 */ - public interface ClearLastSubmittedFrame_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1624 */ - public interface PostPresentHandoff_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1625 */ - public interface GetFrameTiming_callback extends Callback { - byte apply(Compositor_FrameTiming pTiming, int unFramesAgo); - }; - /** native declaration : headers\openvr_capi.h:1626 */ - public interface GetFrameTimings_callback extends Callback { - int apply(Compositor_FrameTiming pTiming, int nFrames); - }; - /** native declaration : headers\openvr_capi.h:1627 */ - public interface GetFrameTimeRemaining_callback extends Callback { - float apply(); - }; - /** native declaration : headers\openvr_capi.h:1628 */ - public interface GetCumulativeStats_callback extends Callback { - void apply(Compositor_CumulativeStats pStats, int nStatsSizeInBytes); - }; - /** native declaration : headers\openvr_capi.h:1629 */ - public interface FadeToColor_callback extends Callback { - void apply(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, byte bBackground); - }; - /** native declaration : headers\openvr_capi.h:1630 */ - public interface GetCurrentFadeColor_callback extends Callback { - com.jme3.system.jopenvr.HmdColor_t.ByValue apply(byte bBackground); - }; - /** native declaration : headers\openvr_capi.h:1631 */ - public interface FadeGrid_callback extends Callback { - void apply(float fSeconds, byte bFadeIn); - }; - /** native declaration : headers\openvr_capi.h:1632 */ - public interface GetCurrentGridAlpha_callback extends Callback { - float apply(); - }; - /** native declaration : headers\openvr_capi.h:1633 */ - public interface SetSkyboxOverride_callback extends Callback { - int apply(Texture_t pTextures, int unTextureCount); - }; - /** native declaration : headers\openvr_capi.h:1634 */ - public interface ClearSkyboxOverride_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1635 */ - public interface CompositorBringToFront_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1636 */ - public interface CompositorGoToBack_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1637 */ - public interface CompositorQuit_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1638 */ - public interface IsFullscreen_callback extends Callback { - byte apply(); - }; - /** native declaration : headers\openvr_capi.h:1639 */ - public interface GetCurrentSceneFocusProcess_callback extends Callback { - int apply(); - }; - /** native declaration : headers\openvr_capi.h:1640 */ - public interface GetLastFrameRenderer_callback extends Callback { - int apply(); - }; - /** native declaration : headers\openvr_capi.h:1641 */ - public interface CanRenderScene_callback extends Callback { - byte apply(); - }; - /** native declaration : headers\openvr_capi.h:1642 */ - public interface ShowMirrorWindow_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1643 */ - public interface HideMirrorWindow_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1644 */ - public interface IsMirrorWindowVisible_callback extends Callback { - byte apply(); - }; - /** native declaration : headers\openvr_capi.h:1645 */ - public interface CompositorDumpImages_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1646 */ - public interface ShouldAppRenderWithLowResources_callback extends Callback { - byte apply(); - }; - /** native declaration : headers\openvr_capi.h:1647 */ - public interface ForceInterleavedReprojectionOn_callback extends Callback { - void apply(byte bOverride); - }; - /** native declaration : headers\openvr_capi.h:1648 */ - public interface ForceReconnectProcess_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1649 */ - public interface SuspendRendering_callback extends Callback { - void apply(byte bSuspend); - }; - /** native declaration : headers\openvr_capi.h:1650 */ - public interface GetMirrorTextureD3D11_callback extends Callback { - int apply(int eEye, Pointer pD3D11DeviceOrResource, PointerByReference ppD3D11ShaderResourceView); - }; - /** native declaration : headers\openvr_capi.h:1651 */ - public interface ReleaseMirrorTextureD3D11_callback extends Callback { - void apply(Pointer pD3D11ShaderResourceView); - }; - /** native declaration : headers\openvr_capi.h:1652 */ - public interface GetMirrorTextureGL_callback extends Callback { - int apply(int eEye, IntByReference pglTextureId, PointerByReference pglSharedTextureHandle); - }; - /** native declaration : headers\openvr_capi.h:1653 */ - public interface ReleaseSharedGLTexture_callback extends Callback { - byte apply(int glTextureId, Pointer glSharedTextureHandle); - }; - /** native declaration : headers\openvr_capi.h:1654 */ - public interface LockGLSharedTextureForAccess_callback extends Callback { - void apply(Pointer glSharedTextureHandle); - }; - /** native declaration : headers\openvr_capi.h:1655 */ - public interface UnlockGLSharedTextureForAccess_callback extends Callback { - void apply(Pointer glSharedTextureHandle); - }; - /** native declaration : headers\openvr_capi.h:1656 */ - public interface GetVulkanInstanceExtensionsRequired_callback extends Callback { - int apply(Pointer pchValue, int unBufferSize); - }; - /** native declaration : headers\openvr_capi.h:1657 */ - public interface GetVulkanDeviceExtensionsRequired_callback extends Callback { - int apply(VkPhysicalDevice_T pPhysicalDevice, Pointer pchValue, int unBufferSize); - }; - public VR_IVRCompositor_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("SetTrackingSpace", "GetTrackingSpace", "WaitGetPoses", "GetLastPoses", "GetLastPoseForTrackedDeviceIndex", "Submit", "ClearLastSubmittedFrame", "PostPresentHandoff", "GetFrameTiming", "GetFrameTimings", "GetFrameTimeRemaining", "GetCumulativeStats", "FadeToColor", "GetCurrentFadeColor", "FadeGrid", "GetCurrentGridAlpha", "SetSkyboxOverride", "ClearSkyboxOverride", "CompositorBringToFront", "CompositorGoToBack", "CompositorQuit", "IsFullscreen", "GetCurrentSceneFocusProcess", "GetLastFrameRenderer", "CanRenderScene", "ShowMirrorWindow", "HideMirrorWindow", "IsMirrorWindowVisible", "CompositorDumpImages", "ShouldAppRenderWithLowResources", "ForceInterleavedReprojectionOn", "ForceReconnectProcess", "SuspendRendering", "GetMirrorTextureD3D11", "ReleaseMirrorTextureD3D11", "GetMirrorTextureGL", "ReleaseSharedGLTexture", "LockGLSharedTextureForAccess", "UnlockGLSharedTextureForAccess", "GetVulkanInstanceExtensionsRequired", "GetVulkanDeviceExtensionsRequired"); - } - public VR_IVRCompositor_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRCompositor_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRCompositor_FnTable implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:2045
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRCompositor_FnTable extends Structure { + /** C type : SetTrackingSpace_callback* */ + public VR_IVRCompositor_FnTable.SetTrackingSpace_callback SetTrackingSpace; + /** C type : GetTrackingSpace_callback* */ + public VR_IVRCompositor_FnTable.GetTrackingSpace_callback GetTrackingSpace; + /** C type : WaitGetPoses_callback* */ + public VR_IVRCompositor_FnTable.WaitGetPoses_callback WaitGetPoses; + /** C type : GetLastPoses_callback* */ + public VR_IVRCompositor_FnTable.GetLastPoses_callback GetLastPoses; + /** C type : GetLastPoseForTrackedDeviceIndex_callback* */ + public VR_IVRCompositor_FnTable.GetLastPoseForTrackedDeviceIndex_callback GetLastPoseForTrackedDeviceIndex; + /** C type : Submit_callback* */ + public VR_IVRCompositor_FnTable.Submit_callback Submit; + /** C type : ClearLastSubmittedFrame_callback* */ + public VR_IVRCompositor_FnTable.ClearLastSubmittedFrame_callback ClearLastSubmittedFrame; + /** C type : PostPresentHandoff_callback* */ + public VR_IVRCompositor_FnTable.PostPresentHandoff_callback PostPresentHandoff; + /** C type : GetFrameTiming_callback* */ + public VR_IVRCompositor_FnTable.GetFrameTiming_callback GetFrameTiming; + /** C type : GetFrameTimings_callback* */ + public VR_IVRCompositor_FnTable.GetFrameTimings_callback GetFrameTimings; + /** C type : GetFrameTimeRemaining_callback* */ + public VR_IVRCompositor_FnTable.GetFrameTimeRemaining_callback GetFrameTimeRemaining; + /** C type : GetCumulativeStats_callback* */ + public VR_IVRCompositor_FnTable.GetCumulativeStats_callback GetCumulativeStats; + /** C type : FadeToColor_callback* */ + public VR_IVRCompositor_FnTable.FadeToColor_callback FadeToColor; + /** C type : GetCurrentFadeColor_callback* */ + public VR_IVRCompositor_FnTable.GetCurrentFadeColor_callback GetCurrentFadeColor; + /** C type : FadeGrid_callback* */ + public VR_IVRCompositor_FnTable.FadeGrid_callback FadeGrid; + /** C type : GetCurrentGridAlpha_callback* */ + public VR_IVRCompositor_FnTable.GetCurrentGridAlpha_callback GetCurrentGridAlpha; + /** C type : SetSkyboxOverride_callback* */ + public VR_IVRCompositor_FnTable.SetSkyboxOverride_callback SetSkyboxOverride; + /** C type : ClearSkyboxOverride_callback* */ + public VR_IVRCompositor_FnTable.ClearSkyboxOverride_callback ClearSkyboxOverride; + /** C type : CompositorBringToFront_callback* */ + public VR_IVRCompositor_FnTable.CompositorBringToFront_callback CompositorBringToFront; + /** C type : CompositorGoToBack_callback* */ + public VR_IVRCompositor_FnTable.CompositorGoToBack_callback CompositorGoToBack; + /** C type : CompositorQuit_callback* */ + public VR_IVRCompositor_FnTable.CompositorQuit_callback CompositorQuit; + /** C type : IsFullscreen_callback* */ + public VR_IVRCompositor_FnTable.IsFullscreen_callback IsFullscreen; + /** C type : GetCurrentSceneFocusProcess_callback* */ + public VR_IVRCompositor_FnTable.GetCurrentSceneFocusProcess_callback GetCurrentSceneFocusProcess; + /** C type : GetLastFrameRenderer_callback* */ + public VR_IVRCompositor_FnTable.GetLastFrameRenderer_callback GetLastFrameRenderer; + /** C type : CanRenderScene_callback* */ + public VR_IVRCompositor_FnTable.CanRenderScene_callback CanRenderScene; + /** C type : ShowMirrorWindow_callback* */ + public VR_IVRCompositor_FnTable.ShowMirrorWindow_callback ShowMirrorWindow; + /** C type : HideMirrorWindow_callback* */ + public VR_IVRCompositor_FnTable.HideMirrorWindow_callback HideMirrorWindow; + /** C type : IsMirrorWindowVisible_callback* */ + public VR_IVRCompositor_FnTable.IsMirrorWindowVisible_callback IsMirrorWindowVisible; + /** C type : CompositorDumpImages_callback* */ + public VR_IVRCompositor_FnTable.CompositorDumpImages_callback CompositorDumpImages; + /** C type : ShouldAppRenderWithLowResources_callback* */ + public VR_IVRCompositor_FnTable.ShouldAppRenderWithLowResources_callback ShouldAppRenderWithLowResources; + /** C type : ForceInterleavedReprojectionOn_callback* */ + public VR_IVRCompositor_FnTable.ForceInterleavedReprojectionOn_callback ForceInterleavedReprojectionOn; + /** C type : ForceReconnectProcess_callback* */ + public VR_IVRCompositor_FnTable.ForceReconnectProcess_callback ForceReconnectProcess; + /** C type : SuspendRendering_callback* */ + public VR_IVRCompositor_FnTable.SuspendRendering_callback SuspendRendering; + /** C type : GetMirrorTextureD3D11_callback* */ + public VR_IVRCompositor_FnTable.GetMirrorTextureD3D11_callback GetMirrorTextureD3D11; + /** C type : ReleaseMirrorTextureD3D11_callback* */ + public VR_IVRCompositor_FnTable.ReleaseMirrorTextureD3D11_callback ReleaseMirrorTextureD3D11; + /** C type : GetMirrorTextureGL_callback* */ + public VR_IVRCompositor_FnTable.GetMirrorTextureGL_callback GetMirrorTextureGL; + /** C type : ReleaseSharedGLTexture_callback* */ + public VR_IVRCompositor_FnTable.ReleaseSharedGLTexture_callback ReleaseSharedGLTexture; + /** C type : LockGLSharedTextureForAccess_callback* */ + public VR_IVRCompositor_FnTable.LockGLSharedTextureForAccess_callback LockGLSharedTextureForAccess; + /** C type : UnlockGLSharedTextureForAccess_callback* */ + public VR_IVRCompositor_FnTable.UnlockGLSharedTextureForAccess_callback UnlockGLSharedTextureForAccess; + /** C type : GetVulkanInstanceExtensionsRequired_callback* */ + public VR_IVRCompositor_FnTable.GetVulkanInstanceExtensionsRequired_callback GetVulkanInstanceExtensionsRequired; + /** C type : GetVulkanDeviceExtensionsRequired_callback* */ + public VR_IVRCompositor_FnTable.GetVulkanDeviceExtensionsRequired_callback GetVulkanDeviceExtensionsRequired; + /** C type : SetExplicitTimingMode_callback* */ + public VR_IVRCompositor_FnTable.SetExplicitTimingMode_callback SetExplicitTimingMode; + /** C type : SubmitExplicitTimingData_callback* */ + public VR_IVRCompositor_FnTable.SubmitExplicitTimingData_callback SubmitExplicitTimingData; + /** native declaration : headers\openvr_capi.h:2002 */ + public interface SetTrackingSpace_callback extends Callback { + void apply(int eOrigin); + }; + /** native declaration : headers\openvr_capi.h:2003 */ + public interface GetTrackingSpace_callback extends Callback { + int apply(); + }; + /** native declaration : headers\openvr_capi.h:2004 */ + public interface WaitGetPoses_callback extends Callback { + int apply(TrackedDevicePose_t pRenderPoseArray, int unRenderPoseArrayCount, TrackedDevicePose_t pGamePoseArray, int unGamePoseArrayCount); + }; + /** native declaration : headers\openvr_capi.h:2005 */ + public interface GetLastPoses_callback extends Callback { + int apply(TrackedDevicePose_t pRenderPoseArray, int unRenderPoseArrayCount, TrackedDevicePose_t pGamePoseArray, int unGamePoseArrayCount); + }; + /** native declaration : headers\openvr_capi.h:2006 */ + public interface GetLastPoseForTrackedDeviceIndex_callback extends Callback { + int apply(int unDeviceIndex, TrackedDevicePose_t pOutputPose, TrackedDevicePose_t pOutputGamePose); + }; + /** native declaration : headers\openvr_capi.h:2007 */ + public interface Submit_callback extends Callback { + int apply(int eEye, Texture_t pTexture, VRTextureBounds_t pBounds, int nSubmitFlags); + }; + /** native declaration : headers\openvr_capi.h:2008 */ + public interface ClearLastSubmittedFrame_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:2009 */ + public interface PostPresentHandoff_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:2010 */ + public interface GetFrameTiming_callback extends Callback { + byte apply(Compositor_FrameTiming pTiming, int unFramesAgo); + }; + /** native declaration : headers\openvr_capi.h:2011 */ + public interface GetFrameTimings_callback extends Callback { + int apply(Compositor_FrameTiming pTiming, int nFrames); + }; + /** native declaration : headers\openvr_capi.h:2012 */ + public interface GetFrameTimeRemaining_callback extends Callback { + float apply(); + }; + /** native declaration : headers\openvr_capi.h:2013 */ + public interface GetCumulativeStats_callback extends Callback { + void apply(Compositor_CumulativeStats pStats, int nStatsSizeInBytes); + }; + /** native declaration : headers\openvr_capi.h:2014 */ + public interface FadeToColor_callback extends Callback { + void apply(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, byte bBackground); + }; + /** native declaration : headers\openvr_capi.h:2015 */ + public interface GetCurrentFadeColor_callback extends Callback { + com.jme3.system.jopenvr.HmdColor_t.ByValue apply(byte bBackground); + }; + /** native declaration : headers\openvr_capi.h:2016 */ + public interface FadeGrid_callback extends Callback { + void apply(float fSeconds, byte bFadeIn); + }; + /** native declaration : headers\openvr_capi.h:2017 */ + public interface GetCurrentGridAlpha_callback extends Callback { + float apply(); + }; + /** native declaration : headers\openvr_capi.h:2018 */ + public interface SetSkyboxOverride_callback extends Callback { + int apply(Texture_t pTextures, int unTextureCount); + }; + /** native declaration : headers\openvr_capi.h:2019 */ + public interface ClearSkyboxOverride_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:2020 */ + public interface CompositorBringToFront_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:2021 */ + public interface CompositorGoToBack_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:2022 */ + public interface CompositorQuit_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:2023 */ + public interface IsFullscreen_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:2024 */ + public interface GetCurrentSceneFocusProcess_callback extends Callback { + int apply(); + }; + /** native declaration : headers\openvr_capi.h:2025 */ + public interface GetLastFrameRenderer_callback extends Callback { + int apply(); + }; + /** native declaration : headers\openvr_capi.h:2026 */ + public interface CanRenderScene_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:2027 */ + public interface ShowMirrorWindow_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:2028 */ + public interface HideMirrorWindow_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:2029 */ + public interface IsMirrorWindowVisible_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:2030 */ + public interface CompositorDumpImages_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:2031 */ + public interface ShouldAppRenderWithLowResources_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:2032 */ + public interface ForceInterleavedReprojectionOn_callback extends Callback { + void apply(byte bOverride); + }; + /** native declaration : headers\openvr_capi.h:2033 */ + public interface ForceReconnectProcess_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:2034 */ + public interface SuspendRendering_callback extends Callback { + void apply(byte bSuspend); + }; + /** native declaration : headers\openvr_capi.h:2035 */ + public interface GetMirrorTextureD3D11_callback extends Callback { + int apply(int eEye, Pointer pD3D11DeviceOrResource, PointerByReference ppD3D11ShaderResourceView); + }; + /** native declaration : headers\openvr_capi.h:2036 */ + public interface ReleaseMirrorTextureD3D11_callback extends Callback { + void apply(Pointer pD3D11ShaderResourceView); + }; + /** native declaration : headers\openvr_capi.h:2037 */ + public interface GetMirrorTextureGL_callback extends Callback { + int apply(int eEye, IntByReference pglTextureId, PointerByReference pglSharedTextureHandle); + }; + /** native declaration : headers\openvr_capi.h:2038 */ + public interface ReleaseSharedGLTexture_callback extends Callback { + byte apply(int glTextureId, Pointer glSharedTextureHandle); + }; + /** native declaration : headers\openvr_capi.h:2039 */ + public interface LockGLSharedTextureForAccess_callback extends Callback { + void apply(Pointer glSharedTextureHandle); + }; + /** native declaration : headers\openvr_capi.h:2040 */ + public interface UnlockGLSharedTextureForAccess_callback extends Callback { + void apply(Pointer glSharedTextureHandle); + }; + /** native declaration : headers\openvr_capi.h:2041 */ + public interface GetVulkanInstanceExtensionsRequired_callback extends Callback { + int apply(Pointer pchValue, int unBufferSize); + }; + /** native declaration : headers\openvr_capi.h:2042 */ + public interface GetVulkanDeviceExtensionsRequired_callback extends Callback { + int apply(VkPhysicalDevice_T pPhysicalDevice, Pointer pchValue, int unBufferSize); + }; + /** native declaration : headers\openvr_capi.h:2043 */ + public interface SetExplicitTimingMode_callback extends Callback { + void apply(int eTimingMode); + }; + /** native declaration : headers\openvr_capi.h:2044 */ + public interface SubmitExplicitTimingData_callback extends Callback { + int apply(); + }; + public VR_IVRCompositor_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("SetTrackingSpace", "GetTrackingSpace", "WaitGetPoses", "GetLastPoses", "GetLastPoseForTrackedDeviceIndex", "Submit", "ClearLastSubmittedFrame", "PostPresentHandoff", "GetFrameTiming", "GetFrameTimings", "GetFrameTimeRemaining", "GetCumulativeStats", "FadeToColor", "GetCurrentFadeColor", "FadeGrid", "GetCurrentGridAlpha", "SetSkyboxOverride", "ClearSkyboxOverride", "CompositorBringToFront", "CompositorGoToBack", "CompositorQuit", "IsFullscreen", "GetCurrentSceneFocusProcess", "GetLastFrameRenderer", "CanRenderScene", "ShowMirrorWindow", "HideMirrorWindow", "IsMirrorWindowVisible", "CompositorDumpImages", "ShouldAppRenderWithLowResources", "ForceInterleavedReprojectionOn", "ForceReconnectProcess", "SuspendRendering", "GetMirrorTextureD3D11", "ReleaseMirrorTextureD3D11", "GetMirrorTextureGL", "ReleaseSharedGLTexture", "LockGLSharedTextureForAccess", "UnlockGLSharedTextureForAccess", "GetVulkanInstanceExtensionsRequired", "GetVulkanDeviceExtensionsRequired", "SetExplicitTimingMode", "SubmitExplicitTimingData"); + } + public VR_IVRCompositor_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRCompositor_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRCompositor_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRDriverManager_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRDriverManager_FnTable.java index 4bd9188599..f8e926a1c7 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRDriverManager_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRDriverManager_FnTable.java @@ -5,46 +5,54 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1918
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRDriverManager_FnTable extends Structure { - /** C type : GetDriverCount_callback* */ - public VR_IVRDriverManager_FnTable.GetDriverCount_callback GetDriverCount; - /** C type : GetDriverName_callback* */ - public VR_IVRDriverManager_FnTable.GetDriverName_callback GetDriverName; - /** native declaration : headers\openvr_capi.h:1916 */ - public interface GetDriverCount_callback extends Callback { - int apply(); - }; - /** native declaration : headers\openvr_capi.h:1917 */ - public interface GetDriverName_callback extends Callback { - int apply(int nDriver, Pointer pchValue, int unBufferSize); - }; - public VR_IVRDriverManager_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("GetDriverCount", "GetDriverName"); - } + * native declaration : headers\openvr_capi.h:2313
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRDriverManager_FnTable extends Structure { + /** C type : GetDriverCount_callback* */ + public VR_IVRDriverManager_FnTable.GetDriverCount_callback GetDriverCount; + /** C type : GetDriverName_callback* */ + public VR_IVRDriverManager_FnTable.GetDriverName_callback GetDriverName; + /** C type : GetDriverHandle_callback* */ + public VR_IVRDriverManager_FnTable.GetDriverHandle_callback GetDriverHandle; + /** native declaration : headers\openvr_capi.h:2310 */ + public interface GetDriverCount_callback extends Callback { + int apply(); + }; + /** native declaration : headers\openvr_capi.h:2311 */ + public interface GetDriverName_callback extends Callback { + int apply(int nDriver, Pointer pchValue, int unBufferSize); + }; + /** native declaration : headers\openvr_capi.h:2312 */ + public interface GetDriverHandle_callback extends Callback { + long apply(Pointer pchDriverName); + }; + public VR_IVRDriverManager_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("GetDriverCount", "GetDriverName", "GetDriverHandle"); + } /** - * @param GetDriverCount C type : GetDriverCount_callback*
- * @param GetDriverName C type : GetDriverName_callback* - */ - public VR_IVRDriverManager_FnTable(VR_IVRDriverManager_FnTable.GetDriverCount_callback GetDriverCount, VR_IVRDriverManager_FnTable.GetDriverName_callback GetDriverName) { - super(); - this.GetDriverCount = GetDriverCount; - this.GetDriverName = GetDriverName; - } - public VR_IVRDriverManager_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRDriverManager_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRDriverManager_FnTable implements Structure.ByValue { - - }; + * @param GetDriverCount C type : GetDriverCount_callback*
+ * @param GetDriverName C type : GetDriverName_callback*
+ * @param GetDriverHandle C type : GetDriverHandle_callback* + */ + public VR_IVRDriverManager_FnTable(VR_IVRDriverManager_FnTable.GetDriverCount_callback GetDriverCount, VR_IVRDriverManager_FnTable.GetDriverName_callback GetDriverName, VR_IVRDriverManager_FnTable.GetDriverHandle_callback GetDriverHandle) { + super(); + this.GetDriverCount = GetDriverCount; + this.GetDriverName = GetDriverName; + this.GetDriverHandle = GetDriverHandle; + } + public VR_IVRDriverManager_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRDriverManager_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRDriverManager_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRExtendedDisplay_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRExtendedDisplay_FnTable.java index ded79eec3e..de9b54af2e 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRExtendedDisplay_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRExtendedDisplay_FnTable.java @@ -6,54 +6,54 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1424
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRExtendedDisplay_FnTable extends Structure { - /** C type : GetWindowBounds_callback* */ - public VR_IVRExtendedDisplay_FnTable.GetWindowBounds_callback GetWindowBounds; - /** C type : GetEyeOutputViewport_callback* */ - public VR_IVRExtendedDisplay_FnTable.GetEyeOutputViewport_callback GetEyeOutputViewport; - /** C type : GetDXGIOutputInfo_callback* */ - public VR_IVRExtendedDisplay_FnTable.GetDXGIOutputInfo_callback GetDXGIOutputInfo; - /** native declaration : headers\openvr_capi.h:1421 */ - public interface GetWindowBounds_callback extends Callback { - void apply(IntByReference pnX, IntByReference pnY, IntByReference pnWidth, IntByReference pnHeight); - }; - /** native declaration : headers\openvr_capi.h:1422 */ - public interface GetEyeOutputViewport_callback extends Callback { - void apply(int eEye, IntByReference pnX, IntByReference pnY, IntByReference pnWidth, IntByReference pnHeight); - }; - /** native declaration : headers\openvr_capi.h:1423 */ - public interface GetDXGIOutputInfo_callback extends Callback { - void apply(IntByReference pnAdapterIndex, IntByReference pnAdapterOutputIndex); - }; - public VR_IVRExtendedDisplay_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("GetWindowBounds", "GetEyeOutputViewport", "GetDXGIOutputInfo"); - } + * native declaration : headers\openvr_capi.h:1807
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRExtendedDisplay_FnTable extends Structure { + /** C type : GetWindowBounds_callback* */ + public VR_IVRExtendedDisplay_FnTable.GetWindowBounds_callback GetWindowBounds; + /** C type : GetEyeOutputViewport_callback* */ + public VR_IVRExtendedDisplay_FnTable.GetEyeOutputViewport_callback GetEyeOutputViewport; + /** C type : GetDXGIOutputInfo_callback* */ + public VR_IVRExtendedDisplay_FnTable.GetDXGIOutputInfo_callback GetDXGIOutputInfo; + /** native declaration : headers\openvr_capi.h:1804 */ + public interface GetWindowBounds_callback extends Callback { + void apply(IntByReference pnX, IntByReference pnY, IntByReference pnWidth, IntByReference pnHeight); + }; + /** native declaration : headers\openvr_capi.h:1805 */ + public interface GetEyeOutputViewport_callback extends Callback { + void apply(int eEye, IntByReference pnX, IntByReference pnY, IntByReference pnWidth, IntByReference pnHeight); + }; + /** native declaration : headers\openvr_capi.h:1806 */ + public interface GetDXGIOutputInfo_callback extends Callback { + void apply(IntByReference pnAdapterIndex, IntByReference pnAdapterOutputIndex); + }; + public VR_IVRExtendedDisplay_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("GetWindowBounds", "GetEyeOutputViewport", "GetDXGIOutputInfo"); + } /** - * @param GetWindowBounds C type : GetWindowBounds_callback*
- * @param GetEyeOutputViewport C type : GetEyeOutputViewport_callback*
- * @param GetDXGIOutputInfo C type : GetDXGIOutputInfo_callback* - */ - public VR_IVRExtendedDisplay_FnTable(VR_IVRExtendedDisplay_FnTable.GetWindowBounds_callback GetWindowBounds, VR_IVRExtendedDisplay_FnTable.GetEyeOutputViewport_callback GetEyeOutputViewport, VR_IVRExtendedDisplay_FnTable.GetDXGIOutputInfo_callback GetDXGIOutputInfo) { - super(); - this.GetWindowBounds = GetWindowBounds; - this.GetEyeOutputViewport = GetEyeOutputViewport; - this.GetDXGIOutputInfo = GetDXGIOutputInfo; - } - public VR_IVRExtendedDisplay_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRExtendedDisplay_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRExtendedDisplay_FnTable implements Structure.ByValue { - - }; + * @param GetWindowBounds C type : GetWindowBounds_callback*
+ * @param GetEyeOutputViewport C type : GetEyeOutputViewport_callback*
+ * @param GetDXGIOutputInfo C type : GetDXGIOutputInfo_callback* + */ + public VR_IVRExtendedDisplay_FnTable(VR_IVRExtendedDisplay_FnTable.GetWindowBounds_callback GetWindowBounds, VR_IVRExtendedDisplay_FnTable.GetEyeOutputViewport_callback GetEyeOutputViewport, VR_IVRExtendedDisplay_FnTable.GetDXGIOutputInfo_callback GetDXGIOutputInfo) { + super(); + this.GetWindowBounds = GetWindowBounds; + this.GetEyeOutputViewport = GetEyeOutputViewport; + this.GetDXGIOutputInfo = GetDXGIOutputInfo; + } + public VR_IVRExtendedDisplay_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRExtendedDisplay_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRExtendedDisplay_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRIOBuffer_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRIOBuffer_FnTable.java new file mode 100644 index 0000000000..7237387299 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRIOBuffer_FnTable.java @@ -0,0 +1,76 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Callback; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import com.sun.jna.ptr.IntByReference; +import com.sun.jna.ptr.LongByReference; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:2363
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRIOBuffer_FnTable extends Structure { + /** C type : Open_callback* */ + public VR_IVRIOBuffer_FnTable.Open_callback Open; + /** C type : Close_callback* */ + public VR_IVRIOBuffer_FnTable.Close_callback Close; + /** C type : Read_callback* */ + public VR_IVRIOBuffer_FnTable.Read_callback Read; + /** C type : Write_callback* */ + public VR_IVRIOBuffer_FnTable.Write_callback Write; + /** C type : PropertyContainer_callback* */ + public VR_IVRIOBuffer_FnTable.PropertyContainer_callback PropertyContainer; + /** native declaration : headers\openvr_capi.h:2358 */ + public interface Open_callback extends Callback { + int apply(Pointer pchPath, int mode, int unElementSize, int unElements, LongByReference pulBuffer); + }; + /** native declaration : headers\openvr_capi.h:2359 */ + public interface Close_callback extends Callback { + int apply(long ulBuffer); + }; + /** native declaration : headers\openvr_capi.h:2360 */ + public interface Read_callback extends Callback { + int apply(long ulBuffer, Pointer pDst, int unBytes, IntByReference punRead); + }; + /** native declaration : headers\openvr_capi.h:2361 */ + public interface Write_callback extends Callback { + int apply(long ulBuffer, Pointer pSrc, int unBytes); + }; + /** native declaration : headers\openvr_capi.h:2362 */ + public interface PropertyContainer_callback extends Callback { + long apply(long ulBuffer); + }; + public VR_IVRIOBuffer_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("Open", "Close", "Read", "Write", "PropertyContainer"); + } + /** + * @param Open C type : Open_callback*
+ * @param Close C type : Close_callback*
+ * @param Read C type : Read_callback*
+ * @param Write C type : Write_callback*
+ * @param PropertyContainer C type : PropertyContainer_callback* + */ + public VR_IVRIOBuffer_FnTable(VR_IVRIOBuffer_FnTable.Open_callback Open, VR_IVRIOBuffer_FnTable.Close_callback Close, VR_IVRIOBuffer_FnTable.Read_callback Read, VR_IVRIOBuffer_FnTable.Write_callback Write, VR_IVRIOBuffer_FnTable.PropertyContainer_callback PropertyContainer) { + super(); + this.Open = Open; + this.Close = Close; + this.Read = Read; + this.Write = Write; + this.PropertyContainer = PropertyContainer; + } + public VR_IVRIOBuffer_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRIOBuffer_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRIOBuffer_FnTable implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRInput_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRInput_FnTable.java new file mode 100644 index 0000000000..c7fcb0aabd --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRInput_FnTable.java @@ -0,0 +1,139 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Callback; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import com.sun.jna.ptr.IntByReference; +import com.sun.jna.ptr.LongByReference; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:2351
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRInput_FnTable extends Structure { + /** C type : SetActionManifestPath_callback* */ + public VR_IVRInput_FnTable.SetActionManifestPath_callback SetActionManifestPath; + /** C type : GetActionSetHandle_callback* */ + public VR_IVRInput_FnTable.GetActionSetHandle_callback GetActionSetHandle; + /** C type : GetActionHandle_callback* */ + public VR_IVRInput_FnTable.GetActionHandle_callback GetActionHandle; + /** C type : GetInputSourceHandle_callback* */ + public VR_IVRInput_FnTable.GetInputSourceHandle_callback GetInputSourceHandle; + /** C type : UpdateActionState_callback* */ + public VR_IVRInput_FnTable.UpdateActionState_callback UpdateActionState; + /** C type : GetDigitalActionData_callback* */ + public VR_IVRInput_FnTable.GetDigitalActionData_callback GetDigitalActionData; + /** C type : GetAnalogActionData_callback* */ + public VR_IVRInput_FnTable.GetAnalogActionData_callback GetAnalogActionData; + /** C type : GetPoseActionData_callback* */ + public VR_IVRInput_FnTable.GetPoseActionData_callback GetPoseActionData; + /** C type : GetSkeletalActionData_callback* */ + public VR_IVRInput_FnTable.GetSkeletalActionData_callback GetSkeletalActionData; + /** C type : GetSkeletalBoneData_callback* */ + public VR_IVRInput_FnTable.GetSkeletalBoneData_callback GetSkeletalBoneData; + /** C type : GetSkeletalBoneDataCompressed_callback* */ + public VR_IVRInput_FnTable.GetSkeletalBoneDataCompressed_callback GetSkeletalBoneDataCompressed; + /** C type : DecompressSkeletalBoneData_callback* */ + public VR_IVRInput_FnTable.DecompressSkeletalBoneData_callback DecompressSkeletalBoneData; + /** C type : TriggerHapticVibrationAction_callback* */ + public VR_IVRInput_FnTable.TriggerHapticVibrationAction_callback TriggerHapticVibrationAction; + /** C type : GetActionOrigins_callback* */ + public VR_IVRInput_FnTable.GetActionOrigins_callback GetActionOrigins; + /** C type : GetOriginLocalizedName_callback* */ + public VR_IVRInput_FnTable.GetOriginLocalizedName_callback GetOriginLocalizedName; + /** C type : GetOriginTrackedDeviceInfo_callback* */ + public VR_IVRInput_FnTable.GetOriginTrackedDeviceInfo_callback GetOriginTrackedDeviceInfo; + /** C type : ShowActionOrigins_callback* */ + public VR_IVRInput_FnTable.ShowActionOrigins_callback ShowActionOrigins; + /** C type : ShowBindingsForActionSet_callback* */ + public VR_IVRInput_FnTable.ShowBindingsForActionSet_callback ShowBindingsForActionSet; + /** native declaration : headers\openvr_capi.h:2333 */ + public interface SetActionManifestPath_callback extends Callback { + int apply(Pointer pchActionManifestPath); + }; + /** native declaration : headers\openvr_capi.h:2334 */ + public interface GetActionSetHandle_callback extends Callback { + int apply(Pointer pchActionSetName, LongByReference pHandle); + }; + /** native declaration : headers\openvr_capi.h:2335 */ + public interface GetActionHandle_callback extends Callback { + int apply(Pointer pchActionName, LongByReference pHandle); + }; + /** native declaration : headers\openvr_capi.h:2336 */ + public interface GetInputSourceHandle_callback extends Callback { + int apply(Pointer pchInputSourcePath, LongByReference pHandle); + }; + /** native declaration : headers\openvr_capi.h:2337 */ + public interface UpdateActionState_callback extends Callback { + int apply(VRActiveActionSet_t pSets, int unSizeOfVRSelectedActionSet_t, int unSetCount); + }; + /** native declaration : headers\openvr_capi.h:2338 */ + public interface GetDigitalActionData_callback extends Callback { + int apply(long action, InputDigitalActionData_t pActionData, int unActionDataSize, long ulRestrictToDevice); + }; + /** native declaration : headers\openvr_capi.h:2339 */ + public interface GetAnalogActionData_callback extends Callback { + int apply(long action, InputAnalogActionData_t pActionData, int unActionDataSize, long ulRestrictToDevice); + }; + /** native declaration : headers\openvr_capi.h:2340 */ + public interface GetPoseActionData_callback extends Callback { + int apply(long action, int eOrigin, float fPredictedSecondsFromNow, InputPoseActionData_t pActionData, int unActionDataSize, long ulRestrictToDevice); + }; + /** native declaration : headers\openvr_capi.h:2341 */ + public interface GetSkeletalActionData_callback extends Callback { + int apply(long action, InputSkeletalActionData_t pActionData, int unActionDataSize, long ulRestrictToDevice); + }; + /** native declaration : headers\openvr_capi.h:2342 */ + public interface GetSkeletalBoneData_callback extends Callback { + int apply(long action, int eTransformSpace, int eMotionRange, VRBoneTransform_t pTransformArray, int unTransformArrayCount, long ulRestrictToDevice); + }; + /** native declaration : headers\openvr_capi.h:2343 */ + public interface GetSkeletalBoneDataCompressed_callback extends Callback { + int apply(long action, int eTransformSpace, int eMotionRange, Pointer pvCompressedData, int unCompressedSize, IntByReference punRequiredCompressedSize, long ulRestrictToDevice); + }; + /** native declaration : headers\openvr_capi.h:2344 */ + public interface DecompressSkeletalBoneData_callback extends Callback { + int apply(Pointer pvCompressedBuffer, int unCompressedBufferSize, IntByReference peTransformSpace, VRBoneTransform_t pTransformArray, int unTransformArrayCount); + }; + /** native declaration : headers\openvr_capi.h:2345 */ + public interface TriggerHapticVibrationAction_callback extends Callback { + int apply(long action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, long ulRestrictToDevice); + }; + /** native declaration : headers\openvr_capi.h:2346 */ + public interface GetActionOrigins_callback extends Callback { + int apply(long actionSetHandle, long digitalActionHandle, LongByReference originsOut, int originOutCount); + }; + /** native declaration : headers\openvr_capi.h:2347 */ + public interface GetOriginLocalizedName_callback extends Callback { + int apply(long origin, Pointer pchNameArray, int unNameArraySize); + }; + /** native declaration : headers\openvr_capi.h:2348 */ + public interface GetOriginTrackedDeviceInfo_callback extends Callback { + int apply(long origin, InputOriginInfo_t pOriginInfo, int unOriginInfoSize); + }; + /** native declaration : headers\openvr_capi.h:2349 */ + public interface ShowActionOrigins_callback extends Callback { + int apply(long actionSetHandle, long ulActionHandle); + }; + /** native declaration : headers\openvr_capi.h:2350 */ + public interface ShowBindingsForActionSet_callback extends Callback { + int apply(VRActiveActionSet_t pSets, int unSizeOfVRSelectedActionSet_t, int unSetCount, long originToHighlight); + }; + public VR_IVRInput_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("SetActionManifestPath", "GetActionSetHandle", "GetActionHandle", "GetInputSourceHandle", "UpdateActionState", "GetDigitalActionData", "GetAnalogActionData", "GetPoseActionData", "GetSkeletalActionData", "GetSkeletalBoneData", "GetSkeletalBoneDataCompressed", "DecompressSkeletalBoneData", "TriggerHapticVibrationAction", "GetActionOrigins", "GetOriginLocalizedName", "GetOriginTrackedDeviceInfo", "ShowActionOrigins", "ShowBindingsForActionSet"); + } + public VR_IVRInput_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRInput_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRInput_FnTable implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRNotifications_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRNotifications_FnTable.java index f7e701982a..5456f6f081 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRNotifications_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRNotifications_FnTable.java @@ -6,46 +6,46 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1864
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRNotifications_FnTable extends Structure { - /** C type : CreateNotification_callback* */ - public VR_IVRNotifications_FnTable.CreateNotification_callback CreateNotification; - /** C type : RemoveNotification_callback* */ - public VR_IVRNotifications_FnTable.RemoveNotification_callback RemoveNotification; - /** native declaration : headers\openvr_capi.h:1862 */ - public interface CreateNotification_callback extends Callback { - int apply(long ulOverlayHandle, long ulUserValue, int type, Pointer pchText, int style, NotificationBitmap_t pImage, IntByReference pNotificationId); - }; - /** native declaration : headers\openvr_capi.h:1863 */ - public interface RemoveNotification_callback extends Callback { - int apply(int notificationId); - }; - public VR_IVRNotifications_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("CreateNotification", "RemoveNotification"); - } + * native declaration : headers\openvr_capi.h:2257
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRNotifications_FnTable extends Structure { + /** C type : CreateNotification_callback* */ + public VR_IVRNotifications_FnTable.CreateNotification_callback CreateNotification; + /** C type : RemoveNotification_callback* */ + public VR_IVRNotifications_FnTable.RemoveNotification_callback RemoveNotification; + /** native declaration : headers\openvr_capi.h:2255 */ + public interface CreateNotification_callback extends Callback { + int apply(long ulOverlayHandle, long ulUserValue, int type, Pointer pchText, int style, NotificationBitmap_t pImage, IntByReference pNotificationId); + }; + /** native declaration : headers\openvr_capi.h:2256 */ + public interface RemoveNotification_callback extends Callback { + int apply(int notificationId); + }; + public VR_IVRNotifications_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("CreateNotification", "RemoveNotification"); + } /** - * @param CreateNotification C type : CreateNotification_callback*
- * @param RemoveNotification C type : RemoveNotification_callback* - */ - public VR_IVRNotifications_FnTable(VR_IVRNotifications_FnTable.CreateNotification_callback CreateNotification, VR_IVRNotifications_FnTable.RemoveNotification_callback RemoveNotification) { - super(); - this.CreateNotification = CreateNotification; - this.RemoveNotification = RemoveNotification; - } - public VR_IVRNotifications_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRNotifications_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRNotifications_FnTable implements Structure.ByValue { - - }; + * @param CreateNotification C type : CreateNotification_callback*
+ * @param RemoveNotification C type : RemoveNotification_callback* + */ + public VR_IVRNotifications_FnTable(VR_IVRNotifications_FnTable.CreateNotification_callback CreateNotification, VR_IVRNotifications_FnTable.RemoveNotification_callback RemoveNotification) { + super(); + this.CreateNotification = CreateNotification; + this.RemoveNotification = RemoveNotification; + } + public VR_IVRNotifications_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRNotifications_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRNotifications_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVROverlay_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVROverlay_FnTable.java index 6ad29adca5..7dc6a2d408 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVROverlay_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVROverlay_FnTable.java @@ -9,505 +9,517 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1820
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVROverlay_FnTable extends Structure { - /** C type : FindOverlay_callback* */ - public VR_IVROverlay_FnTable.FindOverlay_callback FindOverlay; - /** C type : CreateOverlay_callback* */ - public VR_IVROverlay_FnTable.CreateOverlay_callback CreateOverlay; - /** C type : DestroyOverlay_callback* */ - public VR_IVROverlay_FnTable.DestroyOverlay_callback DestroyOverlay; - /** C type : SetHighQualityOverlay_callback* */ - public VR_IVROverlay_FnTable.SetHighQualityOverlay_callback SetHighQualityOverlay; - /** C type : GetHighQualityOverlay_callback* */ - public VR_IVROverlay_FnTable.GetHighQualityOverlay_callback GetHighQualityOverlay; - /** C type : GetOverlayKey_callback* */ - public VR_IVROverlay_FnTable.GetOverlayKey_callback GetOverlayKey; - /** C type : GetOverlayName_callback* */ - public VR_IVROverlay_FnTable.GetOverlayName_callback GetOverlayName; - /** C type : SetOverlayName_callback* */ - public VR_IVROverlay_FnTable.SetOverlayName_callback SetOverlayName; - /** C type : GetOverlayImageData_callback* */ - public VR_IVROverlay_FnTable.GetOverlayImageData_callback GetOverlayImageData; - /** C type : GetOverlayErrorNameFromEnum_callback* */ - public VR_IVROverlay_FnTable.GetOverlayErrorNameFromEnum_callback GetOverlayErrorNameFromEnum; - /** C type : SetOverlayRenderingPid_callback* */ - public VR_IVROverlay_FnTable.SetOverlayRenderingPid_callback SetOverlayRenderingPid; - /** C type : GetOverlayRenderingPid_callback* */ - public VR_IVROverlay_FnTable.GetOverlayRenderingPid_callback GetOverlayRenderingPid; - /** C type : SetOverlayFlag_callback* */ - public VR_IVROverlay_FnTable.SetOverlayFlag_callback SetOverlayFlag; - /** C type : GetOverlayFlag_callback* */ - public VR_IVROverlay_FnTable.GetOverlayFlag_callback GetOverlayFlag; - /** C type : SetOverlayColor_callback* */ - public VR_IVROverlay_FnTable.SetOverlayColor_callback SetOverlayColor; - /** C type : GetOverlayColor_callback* */ - public VR_IVROverlay_FnTable.GetOverlayColor_callback GetOverlayColor; - /** C type : SetOverlayAlpha_callback* */ - public VR_IVROverlay_FnTable.SetOverlayAlpha_callback SetOverlayAlpha; - /** C type : GetOverlayAlpha_callback* */ - public VR_IVROverlay_FnTable.GetOverlayAlpha_callback GetOverlayAlpha; - /** C type : SetOverlayTexelAspect_callback* */ - public VR_IVROverlay_FnTable.SetOverlayTexelAspect_callback SetOverlayTexelAspect; - /** C type : GetOverlayTexelAspect_callback* */ - public VR_IVROverlay_FnTable.GetOverlayTexelAspect_callback GetOverlayTexelAspect; - /** C type : SetOverlaySortOrder_callback* */ - public VR_IVROverlay_FnTable.SetOverlaySortOrder_callback SetOverlaySortOrder; - /** C type : GetOverlaySortOrder_callback* */ - public VR_IVROverlay_FnTable.GetOverlaySortOrder_callback GetOverlaySortOrder; - /** C type : SetOverlayWidthInMeters_callback* */ - public VR_IVROverlay_FnTable.SetOverlayWidthInMeters_callback SetOverlayWidthInMeters; - /** C type : GetOverlayWidthInMeters_callback* */ - public VR_IVROverlay_FnTable.GetOverlayWidthInMeters_callback GetOverlayWidthInMeters; - /** C type : SetOverlayAutoCurveDistanceRangeInMeters_callback* */ - public VR_IVROverlay_FnTable.SetOverlayAutoCurveDistanceRangeInMeters_callback SetOverlayAutoCurveDistanceRangeInMeters; - /** C type : GetOverlayAutoCurveDistanceRangeInMeters_callback* */ - public VR_IVROverlay_FnTable.GetOverlayAutoCurveDistanceRangeInMeters_callback GetOverlayAutoCurveDistanceRangeInMeters; - /** C type : SetOverlayTextureColorSpace_callback* */ - public VR_IVROverlay_FnTable.SetOverlayTextureColorSpace_callback SetOverlayTextureColorSpace; - /** C type : GetOverlayTextureColorSpace_callback* */ - public VR_IVROverlay_FnTable.GetOverlayTextureColorSpace_callback GetOverlayTextureColorSpace; - /** C type : SetOverlayTextureBounds_callback* */ - public VR_IVROverlay_FnTable.SetOverlayTextureBounds_callback SetOverlayTextureBounds; - /** C type : GetOverlayTextureBounds_callback* */ - public VR_IVROverlay_FnTable.GetOverlayTextureBounds_callback GetOverlayTextureBounds; - /** C type : GetOverlayRenderModel_callback* */ - public VR_IVROverlay_FnTable.GetOverlayRenderModel_callback GetOverlayRenderModel; - /** C type : SetOverlayRenderModel_callback* */ - public VR_IVROverlay_FnTable.SetOverlayRenderModel_callback SetOverlayRenderModel; - /** C type : GetOverlayTransformType_callback* */ - public VR_IVROverlay_FnTable.GetOverlayTransformType_callback GetOverlayTransformType; - /** C type : SetOverlayTransformAbsolute_callback* */ - public VR_IVROverlay_FnTable.SetOverlayTransformAbsolute_callback SetOverlayTransformAbsolute; - /** C type : GetOverlayTransformAbsolute_callback* */ - public VR_IVROverlay_FnTable.GetOverlayTransformAbsolute_callback GetOverlayTransformAbsolute; - /** C type : SetOverlayTransformTrackedDeviceRelative_callback* */ - public VR_IVROverlay_FnTable.SetOverlayTransformTrackedDeviceRelative_callback SetOverlayTransformTrackedDeviceRelative; - /** C type : GetOverlayTransformTrackedDeviceRelative_callback* */ - public VR_IVROverlay_FnTable.GetOverlayTransformTrackedDeviceRelative_callback GetOverlayTransformTrackedDeviceRelative; - /** C type : SetOverlayTransformTrackedDeviceComponent_callback* */ - public VR_IVROverlay_FnTable.SetOverlayTransformTrackedDeviceComponent_callback SetOverlayTransformTrackedDeviceComponent; - /** C type : GetOverlayTransformTrackedDeviceComponent_callback* */ - public VR_IVROverlay_FnTable.GetOverlayTransformTrackedDeviceComponent_callback GetOverlayTransformTrackedDeviceComponent; - /** C type : GetOverlayTransformOverlayRelative_callback* */ - public VR_IVROverlay_FnTable.GetOverlayTransformOverlayRelative_callback GetOverlayTransformOverlayRelative; - /** C type : SetOverlayTransformOverlayRelative_callback* */ - public VR_IVROverlay_FnTable.SetOverlayTransformOverlayRelative_callback SetOverlayTransformOverlayRelative; - /** C type : ShowOverlay_callback* */ - public VR_IVROverlay_FnTable.ShowOverlay_callback ShowOverlay; - /** C type : HideOverlay_callback* */ - public VR_IVROverlay_FnTable.HideOverlay_callback HideOverlay; - /** C type : IsOverlayVisible_callback* */ - public VR_IVROverlay_FnTable.IsOverlayVisible_callback IsOverlayVisible; - /** C type : GetTransformForOverlayCoordinates_callback* */ - public VR_IVROverlay_FnTable.GetTransformForOverlayCoordinates_callback GetTransformForOverlayCoordinates; - /** C type : PollNextOverlayEvent_callback* */ - public VR_IVROverlay_FnTable.PollNextOverlayEvent_callback PollNextOverlayEvent; - /** C type : GetOverlayInputMethod_callback* */ - public VR_IVROverlay_FnTable.GetOverlayInputMethod_callback GetOverlayInputMethod; - /** C type : SetOverlayInputMethod_callback* */ - public VR_IVROverlay_FnTable.SetOverlayInputMethod_callback SetOverlayInputMethod; - /** C type : GetOverlayMouseScale_callback* */ - public VR_IVROverlay_FnTable.GetOverlayMouseScale_callback GetOverlayMouseScale; - /** C type : SetOverlayMouseScale_callback* */ - public VR_IVROverlay_FnTable.SetOverlayMouseScale_callback SetOverlayMouseScale; - /** C type : ComputeOverlayIntersection_callback* */ - public VR_IVROverlay_FnTable.ComputeOverlayIntersection_callback ComputeOverlayIntersection; - /** C type : HandleControllerOverlayInteractionAsMouse_callback* */ - public VR_IVROverlay_FnTable.HandleControllerOverlayInteractionAsMouse_callback HandleControllerOverlayInteractionAsMouse; - /** C type : IsHoverTargetOverlay_callback* */ - public VR_IVROverlay_FnTable.IsHoverTargetOverlay_callback IsHoverTargetOverlay; - /** C type : GetGamepadFocusOverlay_callback* */ - public VR_IVROverlay_FnTable.GetGamepadFocusOverlay_callback GetGamepadFocusOverlay; - /** C type : SetGamepadFocusOverlay_callback* */ - public VR_IVROverlay_FnTable.SetGamepadFocusOverlay_callback SetGamepadFocusOverlay; - /** C type : SetOverlayNeighbor_callback* */ - public VR_IVROverlay_FnTable.SetOverlayNeighbor_callback SetOverlayNeighbor; - /** C type : MoveGamepadFocusToNeighbor_callback* */ - public VR_IVROverlay_FnTable.MoveGamepadFocusToNeighbor_callback MoveGamepadFocusToNeighbor; - /** C type : SetOverlayTexture_callback* */ - public VR_IVROverlay_FnTable.SetOverlayTexture_callback SetOverlayTexture; - /** C type : ClearOverlayTexture_callback* */ - public VR_IVROverlay_FnTable.ClearOverlayTexture_callback ClearOverlayTexture; - /** C type : SetOverlayRaw_callback* */ - public VR_IVROverlay_FnTable.SetOverlayRaw_callback SetOverlayRaw; - /** C type : SetOverlayFromFile_callback* */ - public VR_IVROverlay_FnTable.SetOverlayFromFile_callback SetOverlayFromFile; - /** C type : GetOverlayTexture_callback* */ - public VR_IVROverlay_FnTable.GetOverlayTexture_callback GetOverlayTexture; - /** C type : ReleaseNativeOverlayHandle_callback* */ - public VR_IVROverlay_FnTable.ReleaseNativeOverlayHandle_callback ReleaseNativeOverlayHandle; - /** C type : GetOverlayTextureSize_callback* */ - public VR_IVROverlay_FnTable.GetOverlayTextureSize_callback GetOverlayTextureSize; - /** C type : CreateDashboardOverlay_callback* */ - public VR_IVROverlay_FnTable.CreateDashboardOverlay_callback CreateDashboardOverlay; - /** C type : IsDashboardVisible_callback* */ - public VR_IVROverlay_FnTable.IsDashboardVisible_callback IsDashboardVisible; - /** C type : IsActiveDashboardOverlay_callback* */ - public VR_IVROverlay_FnTable.IsActiveDashboardOverlay_callback IsActiveDashboardOverlay; - /** C type : SetDashboardOverlaySceneProcess_callback* */ - public VR_IVROverlay_FnTable.SetDashboardOverlaySceneProcess_callback SetDashboardOverlaySceneProcess; - /** C type : GetDashboardOverlaySceneProcess_callback* */ - public VR_IVROverlay_FnTable.GetDashboardOverlaySceneProcess_callback GetDashboardOverlaySceneProcess; - /** C type : ShowDashboard_callback* */ - public VR_IVROverlay_FnTable.ShowDashboard_callback ShowDashboard; - /** C type : GetPrimaryDashboardDevice_callback* */ - public VR_IVROverlay_FnTable.GetPrimaryDashboardDevice_callback GetPrimaryDashboardDevice; - /** C type : ShowKeyboard_callback* */ - public VR_IVROverlay_FnTable.ShowKeyboard_callback ShowKeyboard; - /** C type : ShowKeyboardForOverlay_callback* */ - public VR_IVROverlay_FnTable.ShowKeyboardForOverlay_callback ShowKeyboardForOverlay; - /** C type : GetKeyboardText_callback* */ - public VR_IVROverlay_FnTable.GetKeyboardText_callback GetKeyboardText; - /** C type : HideKeyboard_callback* */ - public VR_IVROverlay_FnTable.HideKeyboard_callback HideKeyboard; - /** C type : SetKeyboardTransformAbsolute_callback* */ - public VR_IVROverlay_FnTable.SetKeyboardTransformAbsolute_callback SetKeyboardTransformAbsolute; - /** C type : SetKeyboardPositionForOverlay_callback* */ - public VR_IVROverlay_FnTable.SetKeyboardPositionForOverlay_callback SetKeyboardPositionForOverlay; - /** C type : SetOverlayIntersectionMask_callback* */ - public VR_IVROverlay_FnTable.SetOverlayIntersectionMask_callback SetOverlayIntersectionMask; - /** C type : GetOverlayFlags_callback* */ - public VR_IVROverlay_FnTable.GetOverlayFlags_callback GetOverlayFlags; - /** C type : ShowMessageOverlay_callback* */ - public VR_IVROverlay_FnTable.ShowMessageOverlay_callback ShowMessageOverlay; - /** native declaration : headers\openvr_capi.h:1740 */ - public interface FindOverlay_callback extends Callback { - int apply(Pointer pchOverlayKey, LongByReference pOverlayHandle); - }; - /** native declaration : headers\openvr_capi.h:1741 */ - public interface CreateOverlay_callback extends Callback { - int apply(Pointer pchOverlayKey, Pointer pchOverlayName, LongByReference pOverlayHandle); - }; - /** native declaration : headers\openvr_capi.h:1742 */ - public interface DestroyOverlay_callback extends Callback { - int apply(long ulOverlayHandle); - }; - /** native declaration : headers\openvr_capi.h:1743 */ - public interface SetHighQualityOverlay_callback extends Callback { - int apply(long ulOverlayHandle); - }; - /** native declaration : headers\openvr_capi.h:1744 */ - public interface GetHighQualityOverlay_callback extends Callback { - long apply(); - }; - /** native declaration : headers\openvr_capi.h:1745 */ - public interface GetOverlayKey_callback extends Callback { - int apply(long ulOverlayHandle, Pointer pchValue, int unBufferSize, IntByReference pError); - }; - /** native declaration : headers\openvr_capi.h:1746 */ - public interface GetOverlayName_callback extends Callback { - int apply(long ulOverlayHandle, Pointer pchValue, int unBufferSize, IntByReference pError); - }; - /** native declaration : headers\openvr_capi.h:1747 */ - public interface SetOverlayName_callback extends Callback { - int apply(long ulOverlayHandle, Pointer pchName); - }; - /** native declaration : headers\openvr_capi.h:1748 */ - public interface GetOverlayImageData_callback extends Callback { - int apply(long ulOverlayHandle, Pointer pvBuffer, int unBufferSize, IntByReference punWidth, IntByReference punHeight); - }; - /** native declaration : headers\openvr_capi.h:1749 */ - public interface GetOverlayErrorNameFromEnum_callback extends Callback { - Pointer apply(int error); - }; - /** native declaration : headers\openvr_capi.h:1750 */ - public interface SetOverlayRenderingPid_callback extends Callback { - int apply(long ulOverlayHandle, int unPID); - }; - /** native declaration : headers\openvr_capi.h:1751 */ - public interface GetOverlayRenderingPid_callback extends Callback { - int apply(long ulOverlayHandle); - }; - /** native declaration : headers\openvr_capi.h:1752 */ - public interface SetOverlayFlag_callback extends Callback { - int apply(long ulOverlayHandle, int eOverlayFlag, byte bEnabled); - }; - /** native declaration : headers\openvr_capi.h:1753 */ - public interface GetOverlayFlag_callback extends Callback { - int apply(long ulOverlayHandle, int eOverlayFlag, Pointer pbEnabled); - }; - /** native declaration : headers\openvr_capi.h:1754 */ - public interface SetOverlayColor_callback extends Callback { - int apply(long ulOverlayHandle, float fRed, float fGreen, float fBlue); - }; - /** native declaration : headers\openvr_capi.h:1755 */ - public interface GetOverlayColor_callback extends Callback { - int apply(long ulOverlayHandle, FloatByReference pfRed, FloatByReference pfGreen, FloatByReference pfBlue); - }; - /** native declaration : headers\openvr_capi.h:1756 */ - public interface SetOverlayAlpha_callback extends Callback { - int apply(long ulOverlayHandle, float fAlpha); - }; - /** native declaration : headers\openvr_capi.h:1757 */ - public interface GetOverlayAlpha_callback extends Callback { - int apply(long ulOverlayHandle, FloatByReference pfAlpha); - }; - /** native declaration : headers\openvr_capi.h:1758 */ - public interface SetOverlayTexelAspect_callback extends Callback { - int apply(long ulOverlayHandle, float fTexelAspect); - }; - /** native declaration : headers\openvr_capi.h:1759 */ - public interface GetOverlayTexelAspect_callback extends Callback { - int apply(long ulOverlayHandle, FloatByReference pfTexelAspect); - }; - /** native declaration : headers\openvr_capi.h:1760 */ - public interface SetOverlaySortOrder_callback extends Callback { - int apply(long ulOverlayHandle, int unSortOrder); - }; - /** native declaration : headers\openvr_capi.h:1761 */ - public interface GetOverlaySortOrder_callback extends Callback { - int apply(long ulOverlayHandle, IntByReference punSortOrder); - }; - /** native declaration : headers\openvr_capi.h:1762 */ - public interface SetOverlayWidthInMeters_callback extends Callback { - int apply(long ulOverlayHandle, float fWidthInMeters); - }; - /** native declaration : headers\openvr_capi.h:1763 */ - public interface GetOverlayWidthInMeters_callback extends Callback { - int apply(long ulOverlayHandle, FloatByReference pfWidthInMeters); - }; - /** native declaration : headers\openvr_capi.h:1764 */ - public interface SetOverlayAutoCurveDistanceRangeInMeters_callback extends Callback { - int apply(long ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters); - }; - /** native declaration : headers\openvr_capi.h:1765 */ - public interface GetOverlayAutoCurveDistanceRangeInMeters_callback extends Callback { - int apply(long ulOverlayHandle, FloatByReference pfMinDistanceInMeters, FloatByReference pfMaxDistanceInMeters); - }; - /** native declaration : headers\openvr_capi.h:1766 */ - public interface SetOverlayTextureColorSpace_callback extends Callback { - int apply(long ulOverlayHandle, int eTextureColorSpace); - }; - /** native declaration : headers\openvr_capi.h:1767 */ - public interface GetOverlayTextureColorSpace_callback extends Callback { - int apply(long ulOverlayHandle, IntByReference peTextureColorSpace); - }; - /** native declaration : headers\openvr_capi.h:1768 */ - public interface SetOverlayTextureBounds_callback extends Callback { - int apply(long ulOverlayHandle, VRTextureBounds_t pOverlayTextureBounds); - }; - /** native declaration : headers\openvr_capi.h:1769 */ - public interface GetOverlayTextureBounds_callback extends Callback { - int apply(long ulOverlayHandle, VRTextureBounds_t pOverlayTextureBounds); - }; - /** native declaration : headers\openvr_capi.h:1770 */ - public interface GetOverlayRenderModel_callback extends Callback { - int apply(long ulOverlayHandle, Pointer pchValue, int unBufferSize, HmdColor_t pColor, IntByReference pError); - }; - /** native declaration : headers\openvr_capi.h:1771 */ - public interface SetOverlayRenderModel_callback extends Callback { - int apply(long ulOverlayHandle, Pointer pchRenderModel, HmdColor_t pColor); - }; - /** native declaration : headers\openvr_capi.h:1772 */ - public interface GetOverlayTransformType_callback extends Callback { - int apply(long ulOverlayHandle, IntByReference peTransformType); - }; - /** native declaration : headers\openvr_capi.h:1773 */ - public interface SetOverlayTransformAbsolute_callback extends Callback { - int apply(long ulOverlayHandle, int eTrackingOrigin, HmdMatrix34_t pmatTrackingOriginToOverlayTransform); - }; - /** native declaration : headers\openvr_capi.h:1774 */ - public interface GetOverlayTransformAbsolute_callback extends Callback { - int apply(long ulOverlayHandle, IntByReference peTrackingOrigin, HmdMatrix34_t pmatTrackingOriginToOverlayTransform); - }; - /** native declaration : headers\openvr_capi.h:1775 */ - public interface SetOverlayTransformTrackedDeviceRelative_callback extends Callback { - int apply(long ulOverlayHandle, int unTrackedDevice, HmdMatrix34_t pmatTrackedDeviceToOverlayTransform); - }; - /** native declaration : headers\openvr_capi.h:1776 */ - public interface GetOverlayTransformTrackedDeviceRelative_callback extends Callback { - int apply(long ulOverlayHandle, IntByReference punTrackedDevice, HmdMatrix34_t pmatTrackedDeviceToOverlayTransform); - }; - /** native declaration : headers\openvr_capi.h:1777 */ - public interface SetOverlayTransformTrackedDeviceComponent_callback extends Callback { - int apply(long ulOverlayHandle, int unDeviceIndex, Pointer pchComponentName); - }; - /** native declaration : headers\openvr_capi.h:1778 */ - public interface GetOverlayTransformTrackedDeviceComponent_callback extends Callback { - int apply(long ulOverlayHandle, IntByReference punDeviceIndex, Pointer pchComponentName, int unComponentNameSize); - }; - /** native declaration : headers\openvr_capi.h:1779 */ - public interface GetOverlayTransformOverlayRelative_callback extends Callback { - int apply(long ulOverlayHandle, LongByReference ulOverlayHandleParent, HmdMatrix34_t pmatParentOverlayToOverlayTransform); - }; - /** native declaration : headers\openvr_capi.h:1780 */ - public interface SetOverlayTransformOverlayRelative_callback extends Callback { - int apply(long ulOverlayHandle, long ulOverlayHandleParent, HmdMatrix34_t pmatParentOverlayToOverlayTransform); - }; - /** native declaration : headers\openvr_capi.h:1781 */ - public interface ShowOverlay_callback extends Callback { - int apply(long ulOverlayHandle); - }; - /** native declaration : headers\openvr_capi.h:1782 */ - public interface HideOverlay_callback extends Callback { - int apply(long ulOverlayHandle); - }; - /** native declaration : headers\openvr_capi.h:1783 */ - public interface IsOverlayVisible_callback extends Callback { - byte apply(long ulOverlayHandle); - }; - /** native declaration : headers\openvr_capi.h:1784 */ - public interface GetTransformForOverlayCoordinates_callback extends Callback { - int apply(long ulOverlayHandle, int eTrackingOrigin, HmdVector2_t.ByValue coordinatesInOverlay, HmdMatrix34_t pmatTransform); - }; - /** native declaration : headers\openvr_capi.h:1785 */ - public interface PollNextOverlayEvent_callback extends Callback { - byte apply(long ulOverlayHandle, VREvent_t pEvent, int uncbVREvent); - }; - /** native declaration : headers\openvr_capi.h:1786 */ - public interface GetOverlayInputMethod_callback extends Callback { - int apply(long ulOverlayHandle, IntByReference peInputMethod); - }; - /** native declaration : headers\openvr_capi.h:1787 */ - public interface SetOverlayInputMethod_callback extends Callback { - int apply(long ulOverlayHandle, int eInputMethod); - }; - /** native declaration : headers\openvr_capi.h:1788 */ - public interface GetOverlayMouseScale_callback extends Callback { - int apply(long ulOverlayHandle, HmdVector2_t pvecMouseScale); - }; - /** native declaration : headers\openvr_capi.h:1789 */ - public interface SetOverlayMouseScale_callback extends Callback { - int apply(long ulOverlayHandle, HmdVector2_t pvecMouseScale); - }; - /** native declaration : headers\openvr_capi.h:1790 */ - public interface ComputeOverlayIntersection_callback extends Callback { - byte apply(long ulOverlayHandle, VROverlayIntersectionParams_t pParams, VROverlayIntersectionResults_t pResults); - }; - /** native declaration : headers\openvr_capi.h:1791 */ - public interface HandleControllerOverlayInteractionAsMouse_callback extends Callback { - byte apply(long ulOverlayHandle, int unControllerDeviceIndex); - }; - /** native declaration : headers\openvr_capi.h:1792 */ - public interface IsHoverTargetOverlay_callback extends Callback { - byte apply(long ulOverlayHandle); - }; - /** native declaration : headers\openvr_capi.h:1793 */ - public interface GetGamepadFocusOverlay_callback extends Callback { - long apply(); - }; - /** native declaration : headers\openvr_capi.h:1794 */ - public interface SetGamepadFocusOverlay_callback extends Callback { - int apply(long ulNewFocusOverlay); - }; - /** native declaration : headers\openvr_capi.h:1795 */ - public interface SetOverlayNeighbor_callback extends Callback { - int apply(int eDirection, long ulFrom, long ulTo); - }; - /** native declaration : headers\openvr_capi.h:1796 */ - public interface MoveGamepadFocusToNeighbor_callback extends Callback { - int apply(int eDirection, long ulFrom); - }; - /** native declaration : headers\openvr_capi.h:1797 */ - public interface SetOverlayTexture_callback extends Callback { - int apply(long ulOverlayHandle, Texture_t pTexture); - }; - /** native declaration : headers\openvr_capi.h:1798 */ - public interface ClearOverlayTexture_callback extends Callback { - int apply(long ulOverlayHandle); - }; - /** native declaration : headers\openvr_capi.h:1799 */ - public interface SetOverlayRaw_callback extends Callback { - int apply(long ulOverlayHandle, Pointer pvBuffer, int unWidth, int unHeight, int unDepth); - }; - /** native declaration : headers\openvr_capi.h:1800 */ - public interface SetOverlayFromFile_callback extends Callback { - int apply(long ulOverlayHandle, Pointer pchFilePath); - }; - /** native declaration : headers\openvr_capi.h:1801 */ - public interface GetOverlayTexture_callback extends Callback { - int apply(long ulOverlayHandle, PointerByReference pNativeTextureHandle, Pointer pNativeTextureRef, IntByReference pWidth, IntByReference pHeight, IntByReference pNativeFormat, IntByReference pAPIType, IntByReference pColorSpace, VRTextureBounds_t pTextureBounds); - }; - /** native declaration : headers\openvr_capi.h:1802 */ - public interface ReleaseNativeOverlayHandle_callback extends Callback { - int apply(long ulOverlayHandle, Pointer pNativeTextureHandle); - }; - /** native declaration : headers\openvr_capi.h:1803 */ - public interface GetOverlayTextureSize_callback extends Callback { - int apply(long ulOverlayHandle, IntByReference pWidth, IntByReference pHeight); - }; - /** native declaration : headers\openvr_capi.h:1804 */ - public interface CreateDashboardOverlay_callback extends Callback { - int apply(Pointer pchOverlayKey, Pointer pchOverlayFriendlyName, LongByReference pMainHandle, LongByReference pThumbnailHandle); - }; - /** native declaration : headers\openvr_capi.h:1805 */ - public interface IsDashboardVisible_callback extends Callback { - byte apply(); - }; - /** native declaration : headers\openvr_capi.h:1806 */ - public interface IsActiveDashboardOverlay_callback extends Callback { - byte apply(long ulOverlayHandle); - }; - /** native declaration : headers\openvr_capi.h:1807 */ - public interface SetDashboardOverlaySceneProcess_callback extends Callback { - int apply(long ulOverlayHandle, int unProcessId); - }; - /** native declaration : headers\openvr_capi.h:1808 */ - public interface GetDashboardOverlaySceneProcess_callback extends Callback { - int apply(long ulOverlayHandle, IntByReference punProcessId); - }; - /** native declaration : headers\openvr_capi.h:1809 */ - public interface ShowDashboard_callback extends Callback { - void apply(Pointer pchOverlayToShow); - }; - /** native declaration : headers\openvr_capi.h:1810 */ - public interface GetPrimaryDashboardDevice_callback extends Callback { - int apply(); - }; - /** native declaration : headers\openvr_capi.h:1811 */ - public interface ShowKeyboard_callback extends Callback { - int apply(int eInputMode, int eLineInputMode, Pointer pchDescription, int unCharMax, Pointer pchExistingText, byte bUseMinimalMode, long uUserValue); - }; - /** native declaration : headers\openvr_capi.h:1812 */ - public interface ShowKeyboardForOverlay_callback extends Callback { - int apply(long ulOverlayHandle, int eInputMode, int eLineInputMode, Pointer pchDescription, int unCharMax, Pointer pchExistingText, byte bUseMinimalMode, long uUserValue); - }; - /** native declaration : headers\openvr_capi.h:1813 */ - public interface GetKeyboardText_callback extends Callback { - int apply(Pointer pchText, int cchText); - }; - /** native declaration : headers\openvr_capi.h:1814 */ - public interface HideKeyboard_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1815 */ - public interface SetKeyboardTransformAbsolute_callback extends Callback { - void apply(int eTrackingOrigin, HmdMatrix34_t pmatTrackingOriginToKeyboardTransform); - }; - /** native declaration : headers\openvr_capi.h:1816 */ - public interface SetKeyboardPositionForOverlay_callback extends Callback { - void apply(long ulOverlayHandle, com.jme3.system.jopenvr.HmdRect2_t.ByValue avoidRect); - }; - /** native declaration : headers\openvr_capi.h:1817 */ - public interface SetOverlayIntersectionMask_callback extends Callback { - int apply(long ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, int unNumMaskPrimitives, int unPrimitiveSize); - }; - /** native declaration : headers\openvr_capi.h:1818 */ - public interface GetOverlayFlags_callback extends Callback { - int apply(long ulOverlayHandle, IntByReference pFlags); - }; - /** native declaration : headers\openvr_capi.h:1819 */ - public interface ShowMessageOverlay_callback extends Callback { - int apply(Pointer pchText, Pointer pchCaption, Pointer pchButton0Text, Pointer pchButton1Text, Pointer pchButton2Text, Pointer pchButton3Text); - }; - public VR_IVROverlay_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("FindOverlay", "CreateOverlay", "DestroyOverlay", "SetHighQualityOverlay", "GetHighQualityOverlay", "GetOverlayKey", "GetOverlayName", "SetOverlayName", "GetOverlayImageData", "GetOverlayErrorNameFromEnum", "SetOverlayRenderingPid", "GetOverlayRenderingPid", "SetOverlayFlag", "GetOverlayFlag", "SetOverlayColor", "GetOverlayColor", "SetOverlayAlpha", "GetOverlayAlpha", "SetOverlayTexelAspect", "GetOverlayTexelAspect", "SetOverlaySortOrder", "GetOverlaySortOrder", "SetOverlayWidthInMeters", "GetOverlayWidthInMeters", "SetOverlayAutoCurveDistanceRangeInMeters", "GetOverlayAutoCurveDistanceRangeInMeters", "SetOverlayTextureColorSpace", "GetOverlayTextureColorSpace", "SetOverlayTextureBounds", "GetOverlayTextureBounds", "GetOverlayRenderModel", "SetOverlayRenderModel", "GetOverlayTransformType", "SetOverlayTransformAbsolute", "GetOverlayTransformAbsolute", "SetOverlayTransformTrackedDeviceRelative", "GetOverlayTransformTrackedDeviceRelative", "SetOverlayTransformTrackedDeviceComponent", "GetOverlayTransformTrackedDeviceComponent", "GetOverlayTransformOverlayRelative", "SetOverlayTransformOverlayRelative", "ShowOverlay", "HideOverlay", "IsOverlayVisible", "GetTransformForOverlayCoordinates", "PollNextOverlayEvent", "GetOverlayInputMethod", "SetOverlayInputMethod", "GetOverlayMouseScale", "SetOverlayMouseScale", "ComputeOverlayIntersection", "HandleControllerOverlayInteractionAsMouse", "IsHoverTargetOverlay", "GetGamepadFocusOverlay", "SetGamepadFocusOverlay", "SetOverlayNeighbor", "MoveGamepadFocusToNeighbor", "SetOverlayTexture", "ClearOverlayTexture", "SetOverlayRaw", "SetOverlayFromFile", "GetOverlayTexture", "ReleaseNativeOverlayHandle", "GetOverlayTextureSize", "CreateDashboardOverlay", "IsDashboardVisible", "IsActiveDashboardOverlay", "SetDashboardOverlaySceneProcess", "GetDashboardOverlaySceneProcess", "ShowDashboard", "GetPrimaryDashboardDevice", "ShowKeyboard", "ShowKeyboardForOverlay", "GetKeyboardText", "HideKeyboard", "SetKeyboardTransformAbsolute", "SetKeyboardPositionForOverlay", "SetOverlayIntersectionMask", "GetOverlayFlags", "ShowMessageOverlay"); - } - public VR_IVROverlay_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVROverlay_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVROverlay_FnTable implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:2211
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVROverlay_FnTable extends Structure { + /** C type : FindOverlay_callback* */ + public VR_IVROverlay_FnTable.FindOverlay_callback FindOverlay; + /** C type : CreateOverlay_callback* */ + public VR_IVROverlay_FnTable.CreateOverlay_callback CreateOverlay; + /** C type : DestroyOverlay_callback* */ + public VR_IVROverlay_FnTable.DestroyOverlay_callback DestroyOverlay; + /** C type : SetHighQualityOverlay_callback* */ + public VR_IVROverlay_FnTable.SetHighQualityOverlay_callback SetHighQualityOverlay; + /** C type : GetHighQualityOverlay_callback* */ + public VR_IVROverlay_FnTable.GetHighQualityOverlay_callback GetHighQualityOverlay; + /** C type : GetOverlayKey_callback* */ + public VR_IVROverlay_FnTable.GetOverlayKey_callback GetOverlayKey; + /** C type : GetOverlayName_callback* */ + public VR_IVROverlay_FnTable.GetOverlayName_callback GetOverlayName; + /** C type : SetOverlayName_callback* */ + public VR_IVROverlay_FnTable.SetOverlayName_callback SetOverlayName; + /** C type : GetOverlayImageData_callback* */ + public VR_IVROverlay_FnTable.GetOverlayImageData_callback GetOverlayImageData; + /** C type : GetOverlayErrorNameFromEnum_callback* */ + public VR_IVROverlay_FnTable.GetOverlayErrorNameFromEnum_callback GetOverlayErrorNameFromEnum; + /** C type : SetOverlayRenderingPid_callback* */ + public VR_IVROverlay_FnTable.SetOverlayRenderingPid_callback SetOverlayRenderingPid; + /** C type : GetOverlayRenderingPid_callback* */ + public VR_IVROverlay_FnTable.GetOverlayRenderingPid_callback GetOverlayRenderingPid; + /** C type : SetOverlayFlag_callback* */ + public VR_IVROverlay_FnTable.SetOverlayFlag_callback SetOverlayFlag; + /** C type : GetOverlayFlag_callback* */ + public VR_IVROverlay_FnTable.GetOverlayFlag_callback GetOverlayFlag; + /** C type : SetOverlayColor_callback* */ + public VR_IVROverlay_FnTable.SetOverlayColor_callback SetOverlayColor; + /** C type : GetOverlayColor_callback* */ + public VR_IVROverlay_FnTable.GetOverlayColor_callback GetOverlayColor; + /** C type : SetOverlayAlpha_callback* */ + public VR_IVROverlay_FnTable.SetOverlayAlpha_callback SetOverlayAlpha; + /** C type : GetOverlayAlpha_callback* */ + public VR_IVROverlay_FnTable.GetOverlayAlpha_callback GetOverlayAlpha; + /** C type : SetOverlayTexelAspect_callback* */ + public VR_IVROverlay_FnTable.SetOverlayTexelAspect_callback SetOverlayTexelAspect; + /** C type : GetOverlayTexelAspect_callback* */ + public VR_IVROverlay_FnTable.GetOverlayTexelAspect_callback GetOverlayTexelAspect; + /** C type : SetOverlaySortOrder_callback* */ + public VR_IVROverlay_FnTable.SetOverlaySortOrder_callback SetOverlaySortOrder; + /** C type : GetOverlaySortOrder_callback* */ + public VR_IVROverlay_FnTable.GetOverlaySortOrder_callback GetOverlaySortOrder; + /** C type : SetOverlayWidthInMeters_callback* */ + public VR_IVROverlay_FnTable.SetOverlayWidthInMeters_callback SetOverlayWidthInMeters; + /** C type : GetOverlayWidthInMeters_callback* */ + public VR_IVROverlay_FnTable.GetOverlayWidthInMeters_callback GetOverlayWidthInMeters; + /** C type : SetOverlayAutoCurveDistanceRangeInMeters_callback* */ + public VR_IVROverlay_FnTable.SetOverlayAutoCurveDistanceRangeInMeters_callback SetOverlayAutoCurveDistanceRangeInMeters; + /** C type : GetOverlayAutoCurveDistanceRangeInMeters_callback* */ + public VR_IVROverlay_FnTable.GetOverlayAutoCurveDistanceRangeInMeters_callback GetOverlayAutoCurveDistanceRangeInMeters; + /** C type : SetOverlayTextureColorSpace_callback* */ + public VR_IVROverlay_FnTable.SetOverlayTextureColorSpace_callback SetOverlayTextureColorSpace; + /** C type : GetOverlayTextureColorSpace_callback* */ + public VR_IVROverlay_FnTable.GetOverlayTextureColorSpace_callback GetOverlayTextureColorSpace; + /** C type : SetOverlayTextureBounds_callback* */ + public VR_IVROverlay_FnTable.SetOverlayTextureBounds_callback SetOverlayTextureBounds; + /** C type : GetOverlayTextureBounds_callback* */ + public VR_IVROverlay_FnTable.GetOverlayTextureBounds_callback GetOverlayTextureBounds; + /** C type : GetOverlayRenderModel_callback* */ + public VR_IVROverlay_FnTable.GetOverlayRenderModel_callback GetOverlayRenderModel; + /** C type : SetOverlayRenderModel_callback* */ + public VR_IVROverlay_FnTable.SetOverlayRenderModel_callback SetOverlayRenderModel; + /** C type : GetOverlayTransformType_callback* */ + public VR_IVROverlay_FnTable.GetOverlayTransformType_callback GetOverlayTransformType; + /** C type : SetOverlayTransformAbsolute_callback* */ + public VR_IVROverlay_FnTable.SetOverlayTransformAbsolute_callback SetOverlayTransformAbsolute; + /** C type : GetOverlayTransformAbsolute_callback* */ + public VR_IVROverlay_FnTable.GetOverlayTransformAbsolute_callback GetOverlayTransformAbsolute; + /** C type : SetOverlayTransformTrackedDeviceRelative_callback* */ + public VR_IVROverlay_FnTable.SetOverlayTransformTrackedDeviceRelative_callback SetOverlayTransformTrackedDeviceRelative; + /** C type : GetOverlayTransformTrackedDeviceRelative_callback* */ + public VR_IVROverlay_FnTable.GetOverlayTransformTrackedDeviceRelative_callback GetOverlayTransformTrackedDeviceRelative; + /** C type : SetOverlayTransformTrackedDeviceComponent_callback* */ + public VR_IVROverlay_FnTable.SetOverlayTransformTrackedDeviceComponent_callback SetOverlayTransformTrackedDeviceComponent; + /** C type : GetOverlayTransformTrackedDeviceComponent_callback* */ + public VR_IVROverlay_FnTable.GetOverlayTransformTrackedDeviceComponent_callback GetOverlayTransformTrackedDeviceComponent; + /** C type : GetOverlayTransformOverlayRelative_callback* */ + public VR_IVROverlay_FnTable.GetOverlayTransformOverlayRelative_callback GetOverlayTransformOverlayRelative; + /** C type : SetOverlayTransformOverlayRelative_callback* */ + public VR_IVROverlay_FnTable.SetOverlayTransformOverlayRelative_callback SetOverlayTransformOverlayRelative; + /** C type : ShowOverlay_callback* */ + public VR_IVROverlay_FnTable.ShowOverlay_callback ShowOverlay; + /** C type : HideOverlay_callback* */ + public VR_IVROverlay_FnTable.HideOverlay_callback HideOverlay; + /** C type : IsOverlayVisible_callback* */ + public VR_IVROverlay_FnTable.IsOverlayVisible_callback IsOverlayVisible; + /** C type : GetTransformForOverlayCoordinates_callback* */ + public VR_IVROverlay_FnTable.GetTransformForOverlayCoordinates_callback GetTransformForOverlayCoordinates; + /** C type : PollNextOverlayEvent_callback* */ + public VR_IVROverlay_FnTable.PollNextOverlayEvent_callback PollNextOverlayEvent; + /** C type : GetOverlayInputMethod_callback* */ + public VR_IVROverlay_FnTable.GetOverlayInputMethod_callback GetOverlayInputMethod; + /** C type : SetOverlayInputMethod_callback* */ + public VR_IVROverlay_FnTable.SetOverlayInputMethod_callback SetOverlayInputMethod; + /** C type : GetOverlayMouseScale_callback* */ + public VR_IVROverlay_FnTable.GetOverlayMouseScale_callback GetOverlayMouseScale; + /** C type : SetOverlayMouseScale_callback* */ + public VR_IVROverlay_FnTable.SetOverlayMouseScale_callback SetOverlayMouseScale; + /** C type : ComputeOverlayIntersection_callback* */ + public VR_IVROverlay_FnTable.ComputeOverlayIntersection_callback ComputeOverlayIntersection; + /** C type : IsHoverTargetOverlay_callback* */ + public VR_IVROverlay_FnTable.IsHoverTargetOverlay_callback IsHoverTargetOverlay; + /** C type : GetGamepadFocusOverlay_callback* */ + public VR_IVROverlay_FnTable.GetGamepadFocusOverlay_callback GetGamepadFocusOverlay; + /** C type : SetGamepadFocusOverlay_callback* */ + public VR_IVROverlay_FnTable.SetGamepadFocusOverlay_callback SetGamepadFocusOverlay; + /** C type : SetOverlayNeighbor_callback* */ + public VR_IVROverlay_FnTable.SetOverlayNeighbor_callback SetOverlayNeighbor; + /** C type : MoveGamepadFocusToNeighbor_callback* */ + public VR_IVROverlay_FnTable.MoveGamepadFocusToNeighbor_callback MoveGamepadFocusToNeighbor; + /** C type : SetOverlayDualAnalogTransform_callback* */ + public VR_IVROverlay_FnTable.SetOverlayDualAnalogTransform_callback SetOverlayDualAnalogTransform; + /** C type : GetOverlayDualAnalogTransform_callback* */ + public VR_IVROverlay_FnTable.GetOverlayDualAnalogTransform_callback GetOverlayDualAnalogTransform; + /** C type : SetOverlayTexture_callback* */ + public VR_IVROverlay_FnTable.SetOverlayTexture_callback SetOverlayTexture; + /** C type : ClearOverlayTexture_callback* */ + public VR_IVROverlay_FnTable.ClearOverlayTexture_callback ClearOverlayTexture; + /** C type : SetOverlayRaw_callback* */ + public VR_IVROverlay_FnTable.SetOverlayRaw_callback SetOverlayRaw; + /** C type : SetOverlayFromFile_callback* */ + public VR_IVROverlay_FnTable.SetOverlayFromFile_callback SetOverlayFromFile; + /** C type : GetOverlayTexture_callback* */ + public VR_IVROverlay_FnTable.GetOverlayTexture_callback GetOverlayTexture; + /** C type : ReleaseNativeOverlayHandle_callback* */ + public VR_IVROverlay_FnTable.ReleaseNativeOverlayHandle_callback ReleaseNativeOverlayHandle; + /** C type : GetOverlayTextureSize_callback* */ + public VR_IVROverlay_FnTable.GetOverlayTextureSize_callback GetOverlayTextureSize; + /** C type : CreateDashboardOverlay_callback* */ + public VR_IVROverlay_FnTable.CreateDashboardOverlay_callback CreateDashboardOverlay; + /** C type : IsDashboardVisible_callback* */ + public VR_IVROverlay_FnTable.IsDashboardVisible_callback IsDashboardVisible; + /** C type : IsActiveDashboardOverlay_callback* */ + public VR_IVROverlay_FnTable.IsActiveDashboardOverlay_callback IsActiveDashboardOverlay; + /** C type : SetDashboardOverlaySceneProcess_callback* */ + public VR_IVROverlay_FnTable.SetDashboardOverlaySceneProcess_callback SetDashboardOverlaySceneProcess; + /** C type : GetDashboardOverlaySceneProcess_callback* */ + public VR_IVROverlay_FnTable.GetDashboardOverlaySceneProcess_callback GetDashboardOverlaySceneProcess; + /** C type : ShowDashboard_callback* */ + public VR_IVROverlay_FnTable.ShowDashboard_callback ShowDashboard; + /** C type : GetPrimaryDashboardDevice_callback* */ + public VR_IVROverlay_FnTable.GetPrimaryDashboardDevice_callback GetPrimaryDashboardDevice; + /** C type : ShowKeyboard_callback* */ + public VR_IVROverlay_FnTable.ShowKeyboard_callback ShowKeyboard; + /** C type : ShowKeyboardForOverlay_callback* */ + public VR_IVROverlay_FnTable.ShowKeyboardForOverlay_callback ShowKeyboardForOverlay; + /** C type : GetKeyboardText_callback* */ + public VR_IVROverlay_FnTable.GetKeyboardText_callback GetKeyboardText; + /** C type : HideKeyboard_callback* */ + public VR_IVROverlay_FnTable.HideKeyboard_callback HideKeyboard; + /** C type : SetKeyboardTransformAbsolute_callback* */ + public VR_IVROverlay_FnTable.SetKeyboardTransformAbsolute_callback SetKeyboardTransformAbsolute; + /** C type : SetKeyboardPositionForOverlay_callback* */ + public VR_IVROverlay_FnTable.SetKeyboardPositionForOverlay_callback SetKeyboardPositionForOverlay; + /** C type : SetOverlayIntersectionMask_callback* */ + public VR_IVROverlay_FnTable.SetOverlayIntersectionMask_callback SetOverlayIntersectionMask; + /** C type : GetOverlayFlags_callback* */ + public VR_IVROverlay_FnTable.GetOverlayFlags_callback GetOverlayFlags; + /** C type : ShowMessageOverlay_callback* */ + public VR_IVROverlay_FnTable.ShowMessageOverlay_callback ShowMessageOverlay; + /** C type : CloseMessageOverlay_callback* */ + public VR_IVROverlay_FnTable.CloseMessageOverlay_callback CloseMessageOverlay; + /** native declaration : headers\openvr_capi.h:2129 */ + public interface FindOverlay_callback extends Callback { + int apply(Pointer pchOverlayKey, LongByReference pOverlayHandle); + }; + /** native declaration : headers\openvr_capi.h:2130 */ + public interface CreateOverlay_callback extends Callback { + int apply(Pointer pchOverlayKey, Pointer pchOverlayName, LongByReference pOverlayHandle); + }; + /** native declaration : headers\openvr_capi.h:2131 */ + public interface DestroyOverlay_callback extends Callback { + int apply(long ulOverlayHandle); + }; + /** native declaration : headers\openvr_capi.h:2132 */ + public interface SetHighQualityOverlay_callback extends Callback { + int apply(long ulOverlayHandle); + }; + /** native declaration : headers\openvr_capi.h:2133 */ + public interface GetHighQualityOverlay_callback extends Callback { + long apply(); + }; + /** native declaration : headers\openvr_capi.h:2134 */ + public interface GetOverlayKey_callback extends Callback { + int apply(long ulOverlayHandle, Pointer pchValue, int unBufferSize, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:2135 */ + public interface GetOverlayName_callback extends Callback { + int apply(long ulOverlayHandle, Pointer pchValue, int unBufferSize, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:2136 */ + public interface SetOverlayName_callback extends Callback { + int apply(long ulOverlayHandle, Pointer pchName); + }; + /** native declaration : headers\openvr_capi.h:2137 */ + public interface GetOverlayImageData_callback extends Callback { + int apply(long ulOverlayHandle, Pointer pvBuffer, int unBufferSize, IntByReference punWidth, IntByReference punHeight); + }; + /** native declaration : headers\openvr_capi.h:2138 */ + public interface GetOverlayErrorNameFromEnum_callback extends Callback { + Pointer apply(int error); + }; + /** native declaration : headers\openvr_capi.h:2139 */ + public interface SetOverlayRenderingPid_callback extends Callback { + int apply(long ulOverlayHandle, int unPID); + }; + /** native declaration : headers\openvr_capi.h:2140 */ + public interface GetOverlayRenderingPid_callback extends Callback { + int apply(long ulOverlayHandle); + }; + /** native declaration : headers\openvr_capi.h:2141 */ + public interface SetOverlayFlag_callback extends Callback { + int apply(long ulOverlayHandle, int eOverlayFlag, byte bEnabled); + }; + /** native declaration : headers\openvr_capi.h:2142 */ + public interface GetOverlayFlag_callback extends Callback { + int apply(long ulOverlayHandle, int eOverlayFlag, Pointer pbEnabled); + }; + /** native declaration : headers\openvr_capi.h:2143 */ + public interface SetOverlayColor_callback extends Callback { + int apply(long ulOverlayHandle, float fRed, float fGreen, float fBlue); + }; + /** native declaration : headers\openvr_capi.h:2144 */ + public interface GetOverlayColor_callback extends Callback { + int apply(long ulOverlayHandle, FloatByReference pfRed, FloatByReference pfGreen, FloatByReference pfBlue); + }; + /** native declaration : headers\openvr_capi.h:2145 */ + public interface SetOverlayAlpha_callback extends Callback { + int apply(long ulOverlayHandle, float fAlpha); + }; + /** native declaration : headers\openvr_capi.h:2146 */ + public interface GetOverlayAlpha_callback extends Callback { + int apply(long ulOverlayHandle, FloatByReference pfAlpha); + }; + /** native declaration : headers\openvr_capi.h:2147 */ + public interface SetOverlayTexelAspect_callback extends Callback { + int apply(long ulOverlayHandle, float fTexelAspect); + }; + /** native declaration : headers\openvr_capi.h:2148 */ + public interface GetOverlayTexelAspect_callback extends Callback { + int apply(long ulOverlayHandle, FloatByReference pfTexelAspect); + }; + /** native declaration : headers\openvr_capi.h:2149 */ + public interface SetOverlaySortOrder_callback extends Callback { + int apply(long ulOverlayHandle, int unSortOrder); + }; + /** native declaration : headers\openvr_capi.h:2150 */ + public interface GetOverlaySortOrder_callback extends Callback { + int apply(long ulOverlayHandle, IntByReference punSortOrder); + }; + /** native declaration : headers\openvr_capi.h:2151 */ + public interface SetOverlayWidthInMeters_callback extends Callback { + int apply(long ulOverlayHandle, float fWidthInMeters); + }; + /** native declaration : headers\openvr_capi.h:2152 */ + public interface GetOverlayWidthInMeters_callback extends Callback { + int apply(long ulOverlayHandle, FloatByReference pfWidthInMeters); + }; + /** native declaration : headers\openvr_capi.h:2153 */ + public interface SetOverlayAutoCurveDistanceRangeInMeters_callback extends Callback { + int apply(long ulOverlayHandle, float fMinDistanceInMeters, float fMaxDistanceInMeters); + }; + /** native declaration : headers\openvr_capi.h:2154 */ + public interface GetOverlayAutoCurveDistanceRangeInMeters_callback extends Callback { + int apply(long ulOverlayHandle, FloatByReference pfMinDistanceInMeters, FloatByReference pfMaxDistanceInMeters); + }; + /** native declaration : headers\openvr_capi.h:2155 */ + public interface SetOverlayTextureColorSpace_callback extends Callback { + int apply(long ulOverlayHandle, int eTextureColorSpace); + }; + /** native declaration : headers\openvr_capi.h:2156 */ + public interface GetOverlayTextureColorSpace_callback extends Callback { + int apply(long ulOverlayHandle, IntByReference peTextureColorSpace); + }; + /** native declaration : headers\openvr_capi.h:2157 */ + public interface SetOverlayTextureBounds_callback extends Callback { + int apply(long ulOverlayHandle, VRTextureBounds_t pOverlayTextureBounds); + }; + /** native declaration : headers\openvr_capi.h:2158 */ + public interface GetOverlayTextureBounds_callback extends Callback { + int apply(long ulOverlayHandle, VRTextureBounds_t pOverlayTextureBounds); + }; + /** native declaration : headers\openvr_capi.h:2159 */ + public interface GetOverlayRenderModel_callback extends Callback { + int apply(long ulOverlayHandle, Pointer pchValue, int unBufferSize, HmdColor_t pColor, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:2160 */ + public interface SetOverlayRenderModel_callback extends Callback { + int apply(long ulOverlayHandle, Pointer pchRenderModel, HmdColor_t pColor); + }; + /** native declaration : headers\openvr_capi.h:2161 */ + public interface GetOverlayTransformType_callback extends Callback { + int apply(long ulOverlayHandle, IntByReference peTransformType); + }; + /** native declaration : headers\openvr_capi.h:2162 */ + public interface SetOverlayTransformAbsolute_callback extends Callback { + int apply(long ulOverlayHandle, int eTrackingOrigin, HmdMatrix34_t pmatTrackingOriginToOverlayTransform); + }; + /** native declaration : headers\openvr_capi.h:2163 */ + public interface GetOverlayTransformAbsolute_callback extends Callback { + int apply(long ulOverlayHandle, IntByReference peTrackingOrigin, HmdMatrix34_t pmatTrackingOriginToOverlayTransform); + }; + /** native declaration : headers\openvr_capi.h:2164 */ + public interface SetOverlayTransformTrackedDeviceRelative_callback extends Callback { + int apply(long ulOverlayHandle, int unTrackedDevice, HmdMatrix34_t pmatTrackedDeviceToOverlayTransform); + }; + /** native declaration : headers\openvr_capi.h:2165 */ + public interface GetOverlayTransformTrackedDeviceRelative_callback extends Callback { + int apply(long ulOverlayHandle, IntByReference punTrackedDevice, HmdMatrix34_t pmatTrackedDeviceToOverlayTransform); + }; + /** native declaration : headers\openvr_capi.h:2166 */ + public interface SetOverlayTransformTrackedDeviceComponent_callback extends Callback { + int apply(long ulOverlayHandle, int unDeviceIndex, Pointer pchComponentName); + }; + /** native declaration : headers\openvr_capi.h:2167 */ + public interface GetOverlayTransformTrackedDeviceComponent_callback extends Callback { + int apply(long ulOverlayHandle, IntByReference punDeviceIndex, Pointer pchComponentName, int unComponentNameSize); + }; + /** native declaration : headers\openvr_capi.h:2168 */ + public interface GetOverlayTransformOverlayRelative_callback extends Callback { + int apply(long ulOverlayHandle, LongByReference ulOverlayHandleParent, HmdMatrix34_t pmatParentOverlayToOverlayTransform); + }; + /** native declaration : headers\openvr_capi.h:2169 */ + public interface SetOverlayTransformOverlayRelative_callback extends Callback { + int apply(long ulOverlayHandle, long ulOverlayHandleParent, HmdMatrix34_t pmatParentOverlayToOverlayTransform); + }; + /** native declaration : headers\openvr_capi.h:2170 */ + public interface ShowOverlay_callback extends Callback { + int apply(long ulOverlayHandle); + }; + /** native declaration : headers\openvr_capi.h:2171 */ + public interface HideOverlay_callback extends Callback { + int apply(long ulOverlayHandle); + }; + /** native declaration : headers\openvr_capi.h:2172 */ + public interface IsOverlayVisible_callback extends Callback { + byte apply(long ulOverlayHandle); + }; + /** native declaration : headers\openvr_capi.h:2173 */ + public interface GetTransformForOverlayCoordinates_callback extends Callback { + int apply(long ulOverlayHandle, int eTrackingOrigin, HmdVector2_t.ByValue coordinatesInOverlay, HmdMatrix34_t pmatTransform); + }; + /** native declaration : headers\openvr_capi.h:2174 */ + public interface PollNextOverlayEvent_callback extends Callback { + byte apply(long ulOverlayHandle, VREvent_t pEvent, int uncbVREvent); + }; + /** native declaration : headers\openvr_capi.h:2175 */ + public interface GetOverlayInputMethod_callback extends Callback { + int apply(long ulOverlayHandle, IntByReference peInputMethod); + }; + /** native declaration : headers\openvr_capi.h:2176 */ + public interface SetOverlayInputMethod_callback extends Callback { + int apply(long ulOverlayHandle, int eInputMethod); + }; + /** native declaration : headers\openvr_capi.h:2177 */ + public interface GetOverlayMouseScale_callback extends Callback { + int apply(long ulOverlayHandle, HmdVector2_t pvecMouseScale); + }; + /** native declaration : headers\openvr_capi.h:2178 */ + public interface SetOverlayMouseScale_callback extends Callback { + int apply(long ulOverlayHandle, HmdVector2_t pvecMouseScale); + }; + /** native declaration : headers\openvr_capi.h:2179 */ + public interface ComputeOverlayIntersection_callback extends Callback { + byte apply(long ulOverlayHandle, VROverlayIntersectionParams_t pParams, VROverlayIntersectionResults_t pResults); + }; + /** native declaration : headers\openvr_capi.h:2180 */ + public interface IsHoverTargetOverlay_callback extends Callback { + byte apply(long ulOverlayHandle); + }; + /** native declaration : headers\openvr_capi.h:2181 */ + public interface GetGamepadFocusOverlay_callback extends Callback { + long apply(); + }; + /** native declaration : headers\openvr_capi.h:2182 */ + public interface SetGamepadFocusOverlay_callback extends Callback { + int apply(long ulNewFocusOverlay); + }; + /** native declaration : headers\openvr_capi.h:2183 */ + public interface SetOverlayNeighbor_callback extends Callback { + int apply(int eDirection, long ulFrom, long ulTo); + }; + /** native declaration : headers\openvr_capi.h:2184 */ + public interface MoveGamepadFocusToNeighbor_callback extends Callback { + int apply(int eDirection, long ulFrom); + }; + /** native declaration : headers\openvr_capi.h:2185 */ + public interface SetOverlayDualAnalogTransform_callback extends Callback { + int apply(long ulOverlay, int eWhich, HmdVector2_t vCenter, float fRadius); + }; + /** native declaration : headers\openvr_capi.h:2186 */ + public interface GetOverlayDualAnalogTransform_callback extends Callback { + int apply(long ulOverlay, int eWhich, HmdVector2_t pvCenter, FloatByReference pfRadius); + }; + /** native declaration : headers\openvr_capi.h:2187 */ + public interface SetOverlayTexture_callback extends Callback { + int apply(long ulOverlayHandle, Texture_t pTexture); + }; + /** native declaration : headers\openvr_capi.h:2188 */ + public interface ClearOverlayTexture_callback extends Callback { + int apply(long ulOverlayHandle); + }; + /** native declaration : headers\openvr_capi.h:2189 */ + public interface SetOverlayRaw_callback extends Callback { + int apply(long ulOverlayHandle, Pointer pvBuffer, int unWidth, int unHeight, int unDepth); + }; + /** native declaration : headers\openvr_capi.h:2190 */ + public interface SetOverlayFromFile_callback extends Callback { + int apply(long ulOverlayHandle, Pointer pchFilePath); + }; + /** native declaration : headers\openvr_capi.h:2191 */ + public interface GetOverlayTexture_callback extends Callback { + int apply(long ulOverlayHandle, PointerByReference pNativeTextureHandle, Pointer pNativeTextureRef, IntByReference pWidth, IntByReference pHeight, IntByReference pNativeFormat, IntByReference pAPIType, IntByReference pColorSpace, VRTextureBounds_t pTextureBounds); + }; + /** native declaration : headers\openvr_capi.h:2192 */ + public interface ReleaseNativeOverlayHandle_callback extends Callback { + int apply(long ulOverlayHandle, Pointer pNativeTextureHandle); + }; + /** native declaration : headers\openvr_capi.h:2193 */ + public interface GetOverlayTextureSize_callback extends Callback { + int apply(long ulOverlayHandle, IntByReference pWidth, IntByReference pHeight); + }; + /** native declaration : headers\openvr_capi.h:2194 */ + public interface CreateDashboardOverlay_callback extends Callback { + int apply(Pointer pchOverlayKey, Pointer pchOverlayFriendlyName, LongByReference pMainHandle, LongByReference pThumbnailHandle); + }; + /** native declaration : headers\openvr_capi.h:2195 */ + public interface IsDashboardVisible_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:2196 */ + public interface IsActiveDashboardOverlay_callback extends Callback { + byte apply(long ulOverlayHandle); + }; + /** native declaration : headers\openvr_capi.h:2197 */ + public interface SetDashboardOverlaySceneProcess_callback extends Callback { + int apply(long ulOverlayHandle, int unProcessId); + }; + /** native declaration : headers\openvr_capi.h:2198 */ + public interface GetDashboardOverlaySceneProcess_callback extends Callback { + int apply(long ulOverlayHandle, IntByReference punProcessId); + }; + /** native declaration : headers\openvr_capi.h:2199 */ + public interface ShowDashboard_callback extends Callback { + void apply(Pointer pchOverlayToShow); + }; + /** native declaration : headers\openvr_capi.h:2200 */ + public interface GetPrimaryDashboardDevice_callback extends Callback { + int apply(); + }; + /** native declaration : headers\openvr_capi.h:2201 */ + public interface ShowKeyboard_callback extends Callback { + int apply(int eInputMode, int eLineInputMode, Pointer pchDescription, int unCharMax, Pointer pchExistingText, byte bUseMinimalMode, long uUserValue); + }; + /** native declaration : headers\openvr_capi.h:2202 */ + public interface ShowKeyboardForOverlay_callback extends Callback { + int apply(long ulOverlayHandle, int eInputMode, int eLineInputMode, Pointer pchDescription, int unCharMax, Pointer pchExistingText, byte bUseMinimalMode, long uUserValue); + }; + /** native declaration : headers\openvr_capi.h:2203 */ + public interface GetKeyboardText_callback extends Callback { + int apply(Pointer pchText, int cchText); + }; + /** native declaration : headers\openvr_capi.h:2204 */ + public interface HideKeyboard_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:2205 */ + public interface SetKeyboardTransformAbsolute_callback extends Callback { + void apply(int eTrackingOrigin, HmdMatrix34_t pmatTrackingOriginToKeyboardTransform); + }; + /** native declaration : headers\openvr_capi.h:2206 */ + public interface SetKeyboardPositionForOverlay_callback extends Callback { + void apply(long ulOverlayHandle, com.jme3.system.jopenvr.HmdRect2_t.ByValue avoidRect); + }; + /** native declaration : headers\openvr_capi.h:2207 */ + public interface SetOverlayIntersectionMask_callback extends Callback { + int apply(long ulOverlayHandle, VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, int unNumMaskPrimitives, int unPrimitiveSize); + }; + /** native declaration : headers\openvr_capi.h:2208 */ + public interface GetOverlayFlags_callback extends Callback { + int apply(long ulOverlayHandle, IntByReference pFlags); + }; + /** native declaration : headers\openvr_capi.h:2209 */ + public interface ShowMessageOverlay_callback extends Callback { + int apply(Pointer pchText, Pointer pchCaption, Pointer pchButton0Text, Pointer pchButton1Text, Pointer pchButton2Text, Pointer pchButton3Text); + }; + /** native declaration : headers\openvr_capi.h:2210 */ + public interface CloseMessageOverlay_callback extends Callback { + void apply(); + }; + public VR_IVROverlay_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("FindOverlay", "CreateOverlay", "DestroyOverlay", "SetHighQualityOverlay", "GetHighQualityOverlay", "GetOverlayKey", "GetOverlayName", "SetOverlayName", "GetOverlayImageData", "GetOverlayErrorNameFromEnum", "SetOverlayRenderingPid", "GetOverlayRenderingPid", "SetOverlayFlag", "GetOverlayFlag", "SetOverlayColor", "GetOverlayColor", "SetOverlayAlpha", "GetOverlayAlpha", "SetOverlayTexelAspect", "GetOverlayTexelAspect", "SetOverlaySortOrder", "GetOverlaySortOrder", "SetOverlayWidthInMeters", "GetOverlayWidthInMeters", "SetOverlayAutoCurveDistanceRangeInMeters", "GetOverlayAutoCurveDistanceRangeInMeters", "SetOverlayTextureColorSpace", "GetOverlayTextureColorSpace", "SetOverlayTextureBounds", "GetOverlayTextureBounds", "GetOverlayRenderModel", "SetOverlayRenderModel", "GetOverlayTransformType", "SetOverlayTransformAbsolute", "GetOverlayTransformAbsolute", "SetOverlayTransformTrackedDeviceRelative", "GetOverlayTransformTrackedDeviceRelative", "SetOverlayTransformTrackedDeviceComponent", "GetOverlayTransformTrackedDeviceComponent", "GetOverlayTransformOverlayRelative", "SetOverlayTransformOverlayRelative", "ShowOverlay", "HideOverlay", "IsOverlayVisible", "GetTransformForOverlayCoordinates", "PollNextOverlayEvent", "GetOverlayInputMethod", "SetOverlayInputMethod", "GetOverlayMouseScale", "SetOverlayMouseScale", "ComputeOverlayIntersection", "IsHoverTargetOverlay", "GetGamepadFocusOverlay", "SetGamepadFocusOverlay", "SetOverlayNeighbor", "MoveGamepadFocusToNeighbor", "SetOverlayDualAnalogTransform", "GetOverlayDualAnalogTransform", "SetOverlayTexture", "ClearOverlayTexture", "SetOverlayRaw", "SetOverlayFromFile", "GetOverlayTexture", "ReleaseNativeOverlayHandle", "GetOverlayTextureSize", "CreateDashboardOverlay", "IsDashboardVisible", "IsActiveDashboardOverlay", "SetDashboardOverlaySceneProcess", "GetDashboardOverlaySceneProcess", "ShowDashboard", "GetPrimaryDashboardDevice", "ShowKeyboard", "ShowKeyboardForOverlay", "GetKeyboardText", "HideKeyboard", "SetKeyboardTransformAbsolute", "SetKeyboardPositionForOverlay", "SetOverlayIntersectionMask", "GetOverlayFlags", "ShowMessageOverlay", "CloseMessageOverlay"); + } + public VR_IVROverlay_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVROverlay_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVROverlay_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRRenderModels_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRRenderModels_FnTable.java index 548b2c1ed0..a025a415ec 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRRenderModels_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRRenderModels_FnTable.java @@ -7,133 +7,139 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1858
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRRenderModels_FnTable extends Structure { - /** C type : LoadRenderModel_Async_callback* */ - public VR_IVRRenderModels_FnTable.LoadRenderModel_Async_callback LoadRenderModel_Async; - /** C type : FreeRenderModel_callback* */ - public VR_IVRRenderModels_FnTable.FreeRenderModel_callback FreeRenderModel; - /** C type : LoadTexture_Async_callback* */ - public VR_IVRRenderModels_FnTable.LoadTexture_Async_callback LoadTexture_Async; - /** C type : FreeTexture_callback* */ - public VR_IVRRenderModels_FnTable.FreeTexture_callback FreeTexture; - /** C type : LoadTextureD3D11_Async_callback* */ - public VR_IVRRenderModels_FnTable.LoadTextureD3D11_Async_callback LoadTextureD3D11_Async; - /** C type : LoadIntoTextureD3D11_Async_callback* */ - public VR_IVRRenderModels_FnTable.LoadIntoTextureD3D11_Async_callback LoadIntoTextureD3D11_Async; - /** C type : FreeTextureD3D11_callback* */ - public VR_IVRRenderModels_FnTable.FreeTextureD3D11_callback FreeTextureD3D11; - /** C type : GetRenderModelName_callback* */ - public VR_IVRRenderModels_FnTable.GetRenderModelName_callback GetRenderModelName; - /** C type : GetRenderModelCount_callback* */ - public VR_IVRRenderModels_FnTable.GetRenderModelCount_callback GetRenderModelCount; - /** C type : GetComponentCount_callback* */ - public VR_IVRRenderModels_FnTable.GetComponentCount_callback GetComponentCount; - /** C type : GetComponentName_callback* */ - public VR_IVRRenderModels_FnTable.GetComponentName_callback GetComponentName; - /** C type : GetComponentButtonMask_callback* */ - public VR_IVRRenderModels_FnTable.GetComponentButtonMask_callback GetComponentButtonMask; - /** C type : GetComponentRenderModelName_callback* */ - public VR_IVRRenderModels_FnTable.GetComponentRenderModelName_callback GetComponentRenderModelName; - /** C type : GetComponentState_callback* */ - public VR_IVRRenderModels_FnTable.GetComponentState_callback GetComponentState; - /** C type : RenderModelHasComponent_callback* */ - public VR_IVRRenderModels_FnTable.RenderModelHasComponent_callback RenderModelHasComponent; - /** C type : GetRenderModelThumbnailURL_callback* */ - public VR_IVRRenderModels_FnTable.GetRenderModelThumbnailURL_callback GetRenderModelThumbnailURL; - /** C type : GetRenderModelOriginalPath_callback* */ - public VR_IVRRenderModels_FnTable.GetRenderModelOriginalPath_callback GetRenderModelOriginalPath; - /** C type : GetRenderModelErrorNameFromEnum_callback* */ - public VR_IVRRenderModels_FnTable.GetRenderModelErrorNameFromEnum_callback GetRenderModelErrorNameFromEnum; - /** native declaration : headers\openvr_capi.h:1840 */ - public interface LoadRenderModel_Async_callback extends Callback { - int apply(Pointer pchRenderModelName, PointerByReference ppRenderModel); - }; - /** native declaration : headers\openvr_capi.h:1841 */ - public interface FreeRenderModel_callback extends Callback { - void apply(RenderModel_t pRenderModel); - }; - /** native declaration : headers\openvr_capi.h:1842 */ - public interface LoadTexture_Async_callback extends Callback { - int apply(int textureId, PointerByReference ppTexture); - }; - /** native declaration : headers\openvr_capi.h:1843 */ - public interface FreeTexture_callback extends Callback { - void apply(RenderModel_TextureMap_t pTexture); - }; - /** native declaration : headers\openvr_capi.h:1844 */ - public interface LoadTextureD3D11_Async_callback extends Callback { - int apply(int textureId, Pointer pD3D11Device, PointerByReference ppD3D11Texture2D); - }; - /** native declaration : headers\openvr_capi.h:1845 */ - public interface LoadIntoTextureD3D11_Async_callback extends Callback { - int apply(int textureId, Pointer pDstTexture); - }; - /** native declaration : headers\openvr_capi.h:1846 */ - public interface FreeTextureD3D11_callback extends Callback { - void apply(Pointer pD3D11Texture2D); - }; - /** native declaration : headers\openvr_capi.h:1847 */ - public interface GetRenderModelName_callback extends Callback { - int apply(int unRenderModelIndex, Pointer pchRenderModelName, int unRenderModelNameLen); - }; - /** native declaration : headers\openvr_capi.h:1848 */ - public interface GetRenderModelCount_callback extends Callback { - int apply(); - }; - /** native declaration : headers\openvr_capi.h:1849 */ - public interface GetComponentCount_callback extends Callback { - int apply(Pointer pchRenderModelName); - }; - /** native declaration : headers\openvr_capi.h:1850 */ - public interface GetComponentName_callback extends Callback { - int apply(Pointer pchRenderModelName, int unComponentIndex, Pointer pchComponentName, int unComponentNameLen); - }; - /** native declaration : headers\openvr_capi.h:1851 */ - public interface GetComponentButtonMask_callback extends Callback { - long apply(Pointer pchRenderModelName, Pointer pchComponentName); - }; - /** native declaration : headers\openvr_capi.h:1852 */ - public interface GetComponentRenderModelName_callback extends Callback { - int apply(Pointer pchRenderModelName, Pointer pchComponentName, Pointer pchComponentRenderModelName, int unComponentRenderModelNameLen); - }; - /** native declaration : headers\openvr_capi.h:1853 */ - public interface GetComponentState_callback extends Callback { - byte apply(Pointer pchRenderModelName, Pointer pchComponentName, VRControllerState_t pControllerState, RenderModel_ControllerMode_State_t pState, RenderModel_ComponentState_t pComponentState); - }; - /** native declaration : headers\openvr_capi.h:1854 */ - public interface RenderModelHasComponent_callback extends Callback { - byte apply(Pointer pchRenderModelName, Pointer pchComponentName); - }; - /** native declaration : headers\openvr_capi.h:1855 */ - public interface GetRenderModelThumbnailURL_callback extends Callback { - int apply(Pointer pchRenderModelName, Pointer pchThumbnailURL, int unThumbnailURLLen, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1856 */ - public interface GetRenderModelOriginalPath_callback extends Callback { - int apply(Pointer pchRenderModelName, Pointer pchOriginalPath, int unOriginalPathLen, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1857 */ - public interface GetRenderModelErrorNameFromEnum_callback extends Callback { - Pointer apply(int error); - }; - public VR_IVRRenderModels_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("LoadRenderModel_Async", "FreeRenderModel", "LoadTexture_Async", "FreeTexture", "LoadTextureD3D11_Async", "LoadIntoTextureD3D11_Async", "FreeTextureD3D11", "GetRenderModelName", "GetRenderModelCount", "GetComponentCount", "GetComponentName", "GetComponentButtonMask", "GetComponentRenderModelName", "GetComponentState", "RenderModelHasComponent", "GetRenderModelThumbnailURL", "GetRenderModelOriginalPath", "GetRenderModelErrorNameFromEnum"); - } - public VR_IVRRenderModels_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRRenderModels_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRRenderModels_FnTable implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:2251
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRRenderModels_FnTable extends Structure { + /** C type : LoadRenderModel_Async_callback* */ + public VR_IVRRenderModels_FnTable.LoadRenderModel_Async_callback LoadRenderModel_Async; + /** C type : FreeRenderModel_callback* */ + public VR_IVRRenderModels_FnTable.FreeRenderModel_callback FreeRenderModel; + /** C type : LoadTexture_Async_callback* */ + public VR_IVRRenderModels_FnTable.LoadTexture_Async_callback LoadTexture_Async; + /** C type : FreeTexture_callback* */ + public VR_IVRRenderModels_FnTable.FreeTexture_callback FreeTexture; + /** C type : LoadTextureD3D11_Async_callback* */ + public VR_IVRRenderModels_FnTable.LoadTextureD3D11_Async_callback LoadTextureD3D11_Async; + /** C type : LoadIntoTextureD3D11_Async_callback* */ + public VR_IVRRenderModels_FnTable.LoadIntoTextureD3D11_Async_callback LoadIntoTextureD3D11_Async; + /** C type : FreeTextureD3D11_callback* */ + public VR_IVRRenderModels_FnTable.FreeTextureD3D11_callback FreeTextureD3D11; + /** C type : GetRenderModelName_callback* */ + public VR_IVRRenderModels_FnTable.GetRenderModelName_callback GetRenderModelName; + /** C type : GetRenderModelCount_callback* */ + public VR_IVRRenderModels_FnTable.GetRenderModelCount_callback GetRenderModelCount; + /** C type : GetComponentCount_callback* */ + public VR_IVRRenderModels_FnTable.GetComponentCount_callback GetComponentCount; + /** C type : GetComponentName_callback* */ + public VR_IVRRenderModels_FnTable.GetComponentName_callback GetComponentName; + /** C type : GetComponentButtonMask_callback* */ + public VR_IVRRenderModels_FnTable.GetComponentButtonMask_callback GetComponentButtonMask; + /** C type : GetComponentRenderModelName_callback* */ + public VR_IVRRenderModels_FnTable.GetComponentRenderModelName_callback GetComponentRenderModelName; + /** C type : GetComponentStateForDevicePath_callback* */ + public VR_IVRRenderModels_FnTable.GetComponentStateForDevicePath_callback GetComponentStateForDevicePath; + /** C type : GetComponentState_callback* */ + public VR_IVRRenderModels_FnTable.GetComponentState_callback GetComponentState; + /** C type : RenderModelHasComponent_callback* */ + public VR_IVRRenderModels_FnTable.RenderModelHasComponent_callback RenderModelHasComponent; + /** C type : GetRenderModelThumbnailURL_callback* */ + public VR_IVRRenderModels_FnTable.GetRenderModelThumbnailURL_callback GetRenderModelThumbnailURL; + /** C type : GetRenderModelOriginalPath_callback* */ + public VR_IVRRenderModels_FnTable.GetRenderModelOriginalPath_callback GetRenderModelOriginalPath; + /** C type : GetRenderModelErrorNameFromEnum_callback* */ + public VR_IVRRenderModels_FnTable.GetRenderModelErrorNameFromEnum_callback GetRenderModelErrorNameFromEnum; + /** native declaration : headers\openvr_capi.h:2232 */ + public interface LoadRenderModel_Async_callback extends Callback { + int apply(Pointer pchRenderModelName, PointerByReference ppRenderModel); + }; + /** native declaration : headers\openvr_capi.h:2233 */ + public interface FreeRenderModel_callback extends Callback { + void apply(RenderModel_t pRenderModel); + }; + /** native declaration : headers\openvr_capi.h:2234 */ + public interface LoadTexture_Async_callback extends Callback { + int apply(int textureId, PointerByReference ppTexture); + }; + /** native declaration : headers\openvr_capi.h:2235 */ + public interface FreeTexture_callback extends Callback { + void apply(RenderModel_TextureMap_t pTexture); + }; + /** native declaration : headers\openvr_capi.h:2236 */ + public interface LoadTextureD3D11_Async_callback extends Callback { + int apply(int textureId, Pointer pD3D11Device, PointerByReference ppD3D11Texture2D); + }; + /** native declaration : headers\openvr_capi.h:2237 */ + public interface LoadIntoTextureD3D11_Async_callback extends Callback { + int apply(int textureId, Pointer pDstTexture); + }; + /** native declaration : headers\openvr_capi.h:2238 */ + public interface FreeTextureD3D11_callback extends Callback { + void apply(Pointer pD3D11Texture2D); + }; + /** native declaration : headers\openvr_capi.h:2239 */ + public interface GetRenderModelName_callback extends Callback { + int apply(int unRenderModelIndex, Pointer pchRenderModelName, int unRenderModelNameLen); + }; + /** native declaration : headers\openvr_capi.h:2240 */ + public interface GetRenderModelCount_callback extends Callback { + int apply(); + }; + /** native declaration : headers\openvr_capi.h:2241 */ + public interface GetComponentCount_callback extends Callback { + int apply(Pointer pchRenderModelName); + }; + /** native declaration : headers\openvr_capi.h:2242 */ + public interface GetComponentName_callback extends Callback { + int apply(Pointer pchRenderModelName, int unComponentIndex, Pointer pchComponentName, int unComponentNameLen); + }; + /** native declaration : headers\openvr_capi.h:2243 */ + public interface GetComponentButtonMask_callback extends Callback { + long apply(Pointer pchRenderModelName, Pointer pchComponentName); + }; + /** native declaration : headers\openvr_capi.h:2244 */ + public interface GetComponentRenderModelName_callback extends Callback { + int apply(Pointer pchRenderModelName, Pointer pchComponentName, Pointer pchComponentRenderModelName, int unComponentRenderModelNameLen); + }; + /** native declaration : headers\openvr_capi.h:2245 */ + public interface GetComponentStateForDevicePath_callback extends Callback { + byte apply(Pointer pchRenderModelName, Pointer pchComponentName, long devicePath, RenderModel_ControllerMode_State_t pState, RenderModel_ComponentState_t pComponentState); + }; + /** native declaration : headers\openvr_capi.h:2246 */ + public interface GetComponentState_callback extends Callback { + byte apply(Pointer pchRenderModelName, Pointer pchComponentName, VRControllerState_t pControllerState, RenderModel_ControllerMode_State_t pState, RenderModel_ComponentState_t pComponentState); + }; + /** native declaration : headers\openvr_capi.h:2247 */ + public interface RenderModelHasComponent_callback extends Callback { + byte apply(Pointer pchRenderModelName, Pointer pchComponentName); + }; + /** native declaration : headers\openvr_capi.h:2248 */ + public interface GetRenderModelThumbnailURL_callback extends Callback { + int apply(Pointer pchRenderModelName, Pointer pchThumbnailURL, int unThumbnailURLLen, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2249 */ + public interface GetRenderModelOriginalPath_callback extends Callback { + int apply(Pointer pchRenderModelName, Pointer pchOriginalPath, int unOriginalPathLen, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2250 */ + public interface GetRenderModelErrorNameFromEnum_callback extends Callback { + Pointer apply(int error); + }; + public VR_IVRRenderModels_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("LoadRenderModel_Async", "FreeRenderModel", "LoadTexture_Async", "FreeTexture", "LoadTextureD3D11_Async", "LoadIntoTextureD3D11_Async", "FreeTextureD3D11", "GetRenderModelName", "GetRenderModelCount", "GetComponentCount", "GetComponentName", "GetComponentButtonMask", "GetComponentRenderModelName", "GetComponentStateForDevicePath", "GetComponentState", "RenderModelHasComponent", "GetRenderModelThumbnailURL", "GetRenderModelOriginalPath", "GetRenderModelErrorNameFromEnum"); + } + public VR_IVRRenderModels_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRRenderModels_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRRenderModels_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRResources_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRResources_FnTable.java index b0c098a3ef..889feb9822 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRResources_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRResources_FnTable.java @@ -5,46 +5,46 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1912
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRResources_FnTable extends Structure { - /** C type : LoadSharedResource_callback* */ - public VR_IVRResources_FnTable.LoadSharedResource_callback LoadSharedResource; - /** C type : GetResourceFullPath_callback* */ - public VR_IVRResources_FnTable.GetResourceFullPath_callback GetResourceFullPath; - /** native declaration : headers\openvr_capi.h:1910 */ - public interface LoadSharedResource_callback extends Callback { - int apply(Pointer pchResourceName, Pointer pchBuffer, int unBufferLen); - }; - /** native declaration : headers\openvr_capi.h:1911 */ - public interface GetResourceFullPath_callback extends Callback { - int apply(Pointer pchResourceName, Pointer pchResourceTypeDirectory, Pointer pchPathBuffer, int unBufferLen); - }; - public VR_IVRResources_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("LoadSharedResource", "GetResourceFullPath"); - } + * native declaration : headers\openvr_capi.h:2305
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRResources_FnTable extends Structure { + /** C type : LoadSharedResource_callback* */ + public VR_IVRResources_FnTable.LoadSharedResource_callback LoadSharedResource; + /** C type : GetResourceFullPath_callback* */ + public VR_IVRResources_FnTable.GetResourceFullPath_callback GetResourceFullPath; + /** native declaration : headers\openvr_capi.h:2303 */ + public interface LoadSharedResource_callback extends Callback { + int apply(Pointer pchResourceName, Pointer pchBuffer, int unBufferLen); + }; + /** native declaration : headers\openvr_capi.h:2304 */ + public interface GetResourceFullPath_callback extends Callback { + int apply(Pointer pchResourceName, Pointer pchResourceTypeDirectory, Pointer pchPathBuffer, int unBufferLen); + }; + public VR_IVRResources_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("LoadSharedResource", "GetResourceFullPath"); + } /** - * @param LoadSharedResource C type : LoadSharedResource_callback*
- * @param GetResourceFullPath C type : GetResourceFullPath_callback* - */ - public VR_IVRResources_FnTable(VR_IVRResources_FnTable.LoadSharedResource_callback LoadSharedResource, VR_IVRResources_FnTable.GetResourceFullPath_callback GetResourceFullPath) { - super(); - this.LoadSharedResource = LoadSharedResource; - this.GetResourceFullPath = GetResourceFullPath; - } - public VR_IVRResources_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRResources_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRResources_FnTable implements Structure.ByValue { - - }; + * @param LoadSharedResource C type : LoadSharedResource_callback*
+ * @param GetResourceFullPath C type : GetResourceFullPath_callback* + */ + public VR_IVRResources_FnTable(VR_IVRResources_FnTable.LoadSharedResource_callback LoadSharedResource, VR_IVRResources_FnTable.GetResourceFullPath_callback GetResourceFullPath) { + super(); + this.LoadSharedResource = LoadSharedResource; + this.GetResourceFullPath = GetResourceFullPath; + } + public VR_IVRResources_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRResources_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRResources_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRScreenshots_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRScreenshots_FnTable.java index d6328b8e8d..888c3ce2d9 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRScreenshots_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRScreenshots_FnTable.java @@ -6,86 +6,86 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1906
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRScreenshots_FnTable extends Structure { - /** C type : RequestScreenshot_callback* */ - public VR_IVRScreenshots_FnTable.RequestScreenshot_callback RequestScreenshot; - /** C type : HookScreenshot_callback* */ - public VR_IVRScreenshots_FnTable.HookScreenshot_callback HookScreenshot; - /** C type : GetScreenshotPropertyType_callback* */ - public VR_IVRScreenshots_FnTable.GetScreenshotPropertyType_callback GetScreenshotPropertyType; - /** C type : GetScreenshotPropertyFilename_callback* */ - public VR_IVRScreenshots_FnTable.GetScreenshotPropertyFilename_callback GetScreenshotPropertyFilename; - /** C type : UpdateScreenshotProgress_callback* */ - public VR_IVRScreenshots_FnTable.UpdateScreenshotProgress_callback UpdateScreenshotProgress; - /** C type : TakeStereoScreenshot_callback* */ - public VR_IVRScreenshots_FnTable.TakeStereoScreenshot_callback TakeStereoScreenshot; - /** C type : SubmitScreenshot_callback* */ - public VR_IVRScreenshots_FnTable.SubmitScreenshot_callback SubmitScreenshot; - /** native declaration : headers\openvr_capi.h:1899 */ - public interface RequestScreenshot_callback extends Callback { - int apply(IntByReference pOutScreenshotHandle, int type, Pointer pchPreviewFilename, Pointer pchVRFilename); - }; - /** native declaration : headers\openvr_capi.h:1900 */ - public interface HookScreenshot_callback extends Callback { - int apply(IntByReference pSupportedTypes, int numTypes); - }; - /** native declaration : headers\openvr_capi.h:1901 */ - public interface GetScreenshotPropertyType_callback extends Callback { - int apply(int screenshotHandle, IntByReference pError); - }; - /** native declaration : headers\openvr_capi.h:1902 */ - public interface GetScreenshotPropertyFilename_callback extends Callback { - int apply(int screenshotHandle, int filenameType, Pointer pchFilename, int cchFilename, IntByReference pError); - }; - /** native declaration : headers\openvr_capi.h:1903 */ - public interface UpdateScreenshotProgress_callback extends Callback { - int apply(int screenshotHandle, float flProgress); - }; - /** native declaration : headers\openvr_capi.h:1904 */ - public interface TakeStereoScreenshot_callback extends Callback { - int apply(IntByReference pOutScreenshotHandle, Pointer pchPreviewFilename, Pointer pchVRFilename); - }; - /** native declaration : headers\openvr_capi.h:1905 */ - public interface SubmitScreenshot_callback extends Callback { - int apply(int screenshotHandle, int type, Pointer pchSourcePreviewFilename, Pointer pchSourceVRFilename); - }; - public VR_IVRScreenshots_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("RequestScreenshot", "HookScreenshot", "GetScreenshotPropertyType", "GetScreenshotPropertyFilename", "UpdateScreenshotProgress", "TakeStereoScreenshot", "SubmitScreenshot"); - } + * native declaration : headers\openvr_capi.h:2299
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRScreenshots_FnTable extends Structure { + /** C type : RequestScreenshot_callback* */ + public VR_IVRScreenshots_FnTable.RequestScreenshot_callback RequestScreenshot; + /** C type : HookScreenshot_callback* */ + public VR_IVRScreenshots_FnTable.HookScreenshot_callback HookScreenshot; + /** C type : GetScreenshotPropertyType_callback* */ + public VR_IVRScreenshots_FnTable.GetScreenshotPropertyType_callback GetScreenshotPropertyType; + /** C type : GetScreenshotPropertyFilename_callback* */ + public VR_IVRScreenshots_FnTable.GetScreenshotPropertyFilename_callback GetScreenshotPropertyFilename; + /** C type : UpdateScreenshotProgress_callback* */ + public VR_IVRScreenshots_FnTable.UpdateScreenshotProgress_callback UpdateScreenshotProgress; + /** C type : TakeStereoScreenshot_callback* */ + public VR_IVRScreenshots_FnTable.TakeStereoScreenshot_callback TakeStereoScreenshot; + /** C type : SubmitScreenshot_callback* */ + public VR_IVRScreenshots_FnTable.SubmitScreenshot_callback SubmitScreenshot; + /** native declaration : headers\openvr_capi.h:2292 */ + public interface RequestScreenshot_callback extends Callback { + int apply(IntByReference pOutScreenshotHandle, int type, Pointer pchPreviewFilename, Pointer pchVRFilename); + }; + /** native declaration : headers\openvr_capi.h:2293 */ + public interface HookScreenshot_callback extends Callback { + int apply(IntByReference pSupportedTypes, int numTypes); + }; + /** native declaration : headers\openvr_capi.h:2294 */ + public interface GetScreenshotPropertyType_callback extends Callback { + int apply(int screenshotHandle, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:2295 */ + public interface GetScreenshotPropertyFilename_callback extends Callback { + int apply(int screenshotHandle, int filenameType, Pointer pchFilename, int cchFilename, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:2296 */ + public interface UpdateScreenshotProgress_callback extends Callback { + int apply(int screenshotHandle, float flProgress); + }; + /** native declaration : headers\openvr_capi.h:2297 */ + public interface TakeStereoScreenshot_callback extends Callback { + int apply(IntByReference pOutScreenshotHandle, Pointer pchPreviewFilename, Pointer pchVRFilename); + }; + /** native declaration : headers\openvr_capi.h:2298 */ + public interface SubmitScreenshot_callback extends Callback { + int apply(int screenshotHandle, int type, Pointer pchSourcePreviewFilename, Pointer pchSourceVRFilename); + }; + public VR_IVRScreenshots_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("RequestScreenshot", "HookScreenshot", "GetScreenshotPropertyType", "GetScreenshotPropertyFilename", "UpdateScreenshotProgress", "TakeStereoScreenshot", "SubmitScreenshot"); + } /** - * @param RequestScreenshot C type : RequestScreenshot_callback*
- * @param HookScreenshot C type : HookScreenshot_callback*
- * @param GetScreenshotPropertyType C type : GetScreenshotPropertyType_callback*
- * @param GetScreenshotPropertyFilename C type : GetScreenshotPropertyFilename_callback*
- * @param UpdateScreenshotProgress C type : UpdateScreenshotProgress_callback*
- * @param TakeStereoScreenshot C type : TakeStereoScreenshot_callback*
- * @param SubmitScreenshot C type : SubmitScreenshot_callback* - */ - public VR_IVRScreenshots_FnTable(VR_IVRScreenshots_FnTable.RequestScreenshot_callback RequestScreenshot, VR_IVRScreenshots_FnTable.HookScreenshot_callback HookScreenshot, VR_IVRScreenshots_FnTable.GetScreenshotPropertyType_callback GetScreenshotPropertyType, VR_IVRScreenshots_FnTable.GetScreenshotPropertyFilename_callback GetScreenshotPropertyFilename, VR_IVRScreenshots_FnTable.UpdateScreenshotProgress_callback UpdateScreenshotProgress, VR_IVRScreenshots_FnTable.TakeStereoScreenshot_callback TakeStereoScreenshot, VR_IVRScreenshots_FnTable.SubmitScreenshot_callback SubmitScreenshot) { - super(); - this.RequestScreenshot = RequestScreenshot; - this.HookScreenshot = HookScreenshot; - this.GetScreenshotPropertyType = GetScreenshotPropertyType; - this.GetScreenshotPropertyFilename = GetScreenshotPropertyFilename; - this.UpdateScreenshotProgress = UpdateScreenshotProgress; - this.TakeStereoScreenshot = TakeStereoScreenshot; - this.SubmitScreenshot = SubmitScreenshot; - } - public VR_IVRScreenshots_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRScreenshots_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRScreenshots_FnTable implements Structure.ByValue { - - }; + * @param RequestScreenshot C type : RequestScreenshot_callback*
+ * @param HookScreenshot C type : HookScreenshot_callback*
+ * @param GetScreenshotPropertyType C type : GetScreenshotPropertyType_callback*
+ * @param GetScreenshotPropertyFilename C type : GetScreenshotPropertyFilename_callback*
+ * @param UpdateScreenshotProgress C type : UpdateScreenshotProgress_callback*
+ * @param TakeStereoScreenshot C type : TakeStereoScreenshot_callback*
+ * @param SubmitScreenshot C type : SubmitScreenshot_callback* + */ + public VR_IVRScreenshots_FnTable(VR_IVRScreenshots_FnTable.RequestScreenshot_callback RequestScreenshot, VR_IVRScreenshots_FnTable.HookScreenshot_callback HookScreenshot, VR_IVRScreenshots_FnTable.GetScreenshotPropertyType_callback GetScreenshotPropertyType, VR_IVRScreenshots_FnTable.GetScreenshotPropertyFilename_callback GetScreenshotPropertyFilename, VR_IVRScreenshots_FnTable.UpdateScreenshotProgress_callback UpdateScreenshotProgress, VR_IVRScreenshots_FnTable.TakeStereoScreenshot_callback TakeStereoScreenshot, VR_IVRScreenshots_FnTable.SubmitScreenshot_callback SubmitScreenshot) { + super(); + this.RequestScreenshot = RequestScreenshot; + this.HookScreenshot = HookScreenshot; + this.GetScreenshotPropertyType = GetScreenshotPropertyType; + this.GetScreenshotPropertyFilename = GetScreenshotPropertyFilename; + this.UpdateScreenshotProgress = UpdateScreenshotProgress; + this.TakeStereoScreenshot = TakeStereoScreenshot; + this.SubmitScreenshot = SubmitScreenshot; + } + public VR_IVRScreenshots_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRScreenshots_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRScreenshots_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRSettings_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRSettings_FnTable.java index 3ea08aa08f..a3704ec539 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRSettings_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRSettings_FnTable.java @@ -6,97 +6,97 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1890
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRSettings_FnTable extends Structure { - /** C type : GetSettingsErrorNameFromEnum_callback* */ - public VR_IVRSettings_FnTable.GetSettingsErrorNameFromEnum_callback GetSettingsErrorNameFromEnum; - /** C type : Sync_callback* */ - public VR_IVRSettings_FnTable.Sync_callback Sync; - /** C type : SetBool_callback* */ - public VR_IVRSettings_FnTable.SetBool_callback SetBool; - /** C type : SetInt32_callback* */ - public VR_IVRSettings_FnTable.SetInt32_callback SetInt32; - /** C type : SetFloat_callback* */ - public VR_IVRSettings_FnTable.SetFloat_callback SetFloat; - /** C type : SetString_callback* */ - public VR_IVRSettings_FnTable.SetString_callback SetString; - /** C type : GetBool_callback* */ - public VR_IVRSettings_FnTable.GetBool_callback GetBool; - /** C type : GetInt32_callback* */ - public VR_IVRSettings_FnTable.GetInt32_callback GetInt32; - /** C type : GetFloat_callback* */ - public VR_IVRSettings_FnTable.GetFloat_callback GetFloat; - /** C type : GetString_callback* */ - public VR_IVRSettings_FnTable.GetString_callback GetString; - /** C type : RemoveSection_callback* */ - public VR_IVRSettings_FnTable.RemoveSection_callback RemoveSection; - /** C type : RemoveKeyInSection_callback* */ - public VR_IVRSettings_FnTable.RemoveKeyInSection_callback RemoveKeyInSection; - /** native declaration : headers\openvr_capi.h:1878 */ - public interface GetSettingsErrorNameFromEnum_callback extends Callback { - Pointer apply(int eError); - }; - /** native declaration : headers\openvr_capi.h:1879 */ - public interface Sync_callback extends Callback { - byte apply(byte bForce, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1880 */ - public interface SetBool_callback extends Callback { - void apply(Pointer pchSection, Pointer pchSettingsKey, byte bValue, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1881 */ - public interface SetInt32_callback extends Callback { - void apply(Pointer pchSection, Pointer pchSettingsKey, int nValue, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1882 */ - public interface SetFloat_callback extends Callback { - void apply(Pointer pchSection, Pointer pchSettingsKey, float flValue, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1883 */ - public interface SetString_callback extends Callback { - void apply(Pointer pchSection, Pointer pchSettingsKey, Pointer pchValue, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1884 */ - public interface GetBool_callback extends Callback { - byte apply(Pointer pchSection, Pointer pchSettingsKey, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1885 */ - public interface GetInt32_callback extends Callback { - int apply(Pointer pchSection, Pointer pchSettingsKey, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1886 */ - public interface GetFloat_callback extends Callback { - float apply(Pointer pchSection, Pointer pchSettingsKey, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1887 */ - public interface GetString_callback extends Callback { - void apply(Pointer pchSection, Pointer pchSettingsKey, Pointer pchValue, int unValueLen, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1888 */ - public interface RemoveSection_callback extends Callback { - void apply(Pointer pchSection, IntByReference peError); - }; - /** native declaration : headers\openvr_capi.h:1889 */ - public interface RemoveKeyInSection_callback extends Callback { - void apply(Pointer pchSection, Pointer pchSettingsKey, IntByReference peError); - }; - public VR_IVRSettings_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("GetSettingsErrorNameFromEnum", "Sync", "SetBool", "SetInt32", "SetFloat", "SetString", "GetBool", "GetInt32", "GetFloat", "GetString", "RemoveSection", "RemoveKeyInSection"); - } - public VR_IVRSettings_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRSettings_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRSettings_FnTable implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:2283
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRSettings_FnTable extends Structure { + /** C type : GetSettingsErrorNameFromEnum_callback* */ + public VR_IVRSettings_FnTable.GetSettingsErrorNameFromEnum_callback GetSettingsErrorNameFromEnum; + /** C type : Sync_callback* */ + public VR_IVRSettings_FnTable.Sync_callback Sync; + /** C type : SetBool_callback* */ + public VR_IVRSettings_FnTable.SetBool_callback SetBool; + /** C type : SetInt32_callback* */ + public VR_IVRSettings_FnTable.SetInt32_callback SetInt32; + /** C type : SetFloat_callback* */ + public VR_IVRSettings_FnTable.SetFloat_callback SetFloat; + /** C type : SetString_callback* */ + public VR_IVRSettings_FnTable.SetString_callback SetString; + /** C type : GetBool_callback* */ + public VR_IVRSettings_FnTable.GetBool_callback GetBool; + /** C type : GetInt32_callback* */ + public VR_IVRSettings_FnTable.GetInt32_callback GetInt32; + /** C type : GetFloat_callback* */ + public VR_IVRSettings_FnTable.GetFloat_callback GetFloat; + /** C type : GetString_callback* */ + public VR_IVRSettings_FnTable.GetString_callback GetString; + /** C type : RemoveSection_callback* */ + public VR_IVRSettings_FnTable.RemoveSection_callback RemoveSection; + /** C type : RemoveKeyInSection_callback* */ + public VR_IVRSettings_FnTable.RemoveKeyInSection_callback RemoveKeyInSection; + /** native declaration : headers\openvr_capi.h:2271 */ + public interface GetSettingsErrorNameFromEnum_callback extends Callback { + Pointer apply(int eError); + }; + /** native declaration : headers\openvr_capi.h:2272 */ + public interface Sync_callback extends Callback { + byte apply(byte bForce, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2273 */ + public interface SetBool_callback extends Callback { + void apply(Pointer pchSection, Pointer pchSettingsKey, byte bValue, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2274 */ + public interface SetInt32_callback extends Callback { + void apply(Pointer pchSection, Pointer pchSettingsKey, int nValue, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2275 */ + public interface SetFloat_callback extends Callback { + void apply(Pointer pchSection, Pointer pchSettingsKey, float flValue, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2276 */ + public interface SetString_callback extends Callback { + void apply(Pointer pchSection, Pointer pchSettingsKey, Pointer pchValue, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2277 */ + public interface GetBool_callback extends Callback { + byte apply(Pointer pchSection, Pointer pchSettingsKey, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2278 */ + public interface GetInt32_callback extends Callback { + int apply(Pointer pchSection, Pointer pchSettingsKey, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2279 */ + public interface GetFloat_callback extends Callback { + float apply(Pointer pchSection, Pointer pchSettingsKey, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2280 */ + public interface GetString_callback extends Callback { + void apply(Pointer pchSection, Pointer pchSettingsKey, Pointer pchValue, int unValueLen, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2281 */ + public interface RemoveSection_callback extends Callback { + void apply(Pointer pchSection, IntByReference peError); + }; + /** native declaration : headers\openvr_capi.h:2282 */ + public interface RemoveKeyInSection_callback extends Callback { + void apply(Pointer pchSection, Pointer pchSettingsKey, IntByReference peError); + }; + public VR_IVRSettings_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("GetSettingsErrorNameFromEnum", "Sync", "SetBool", "SetInt32", "SetFloat", "SetString", "GetBool", "GetInt32", "GetFloat", "GetString", "RemoveSection", "RemoveKeyInSection"); + } + public VR_IVRSettings_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRSettings_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRSettings_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRSpatialAnchors_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRSpatialAnchors_FnTable.java new file mode 100644 index 0000000000..17d7892695 --- /dev/null +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRSpatialAnchors_FnTable.java @@ -0,0 +1,67 @@ +package com.jme3.system.jopenvr; +import com.sun.jna.Callback; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import com.sun.jna.ptr.IntByReference; +import java.util.Arrays; +import java.util.List; +/** + * native declaration : headers\openvr_capi.h:2373
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRSpatialAnchors_FnTable extends Structure { + /** C type : CreateSpatialAnchorFromDescriptor_callback* */ + public VR_IVRSpatialAnchors_FnTable.CreateSpatialAnchorFromDescriptor_callback CreateSpatialAnchorFromDescriptor; + /** C type : CreateSpatialAnchorFromPose_callback* */ + public VR_IVRSpatialAnchors_FnTable.CreateSpatialAnchorFromPose_callback CreateSpatialAnchorFromPose; + /** C type : GetSpatialAnchorPose_callback* */ + public VR_IVRSpatialAnchors_FnTable.GetSpatialAnchorPose_callback GetSpatialAnchorPose; + /** C type : GetSpatialAnchorDescriptor_callback* */ + public VR_IVRSpatialAnchors_FnTable.GetSpatialAnchorDescriptor_callback GetSpatialAnchorDescriptor; + /** native declaration : headers\openvr_capi.h:2369 */ + public interface CreateSpatialAnchorFromDescriptor_callback extends Callback { + int apply(Pointer pchDescriptor, IntByReference pHandleOut); + }; + /** native declaration : headers\openvr_capi.h:2370 */ + public interface CreateSpatialAnchorFromPose_callback extends Callback { + int apply(int unDeviceIndex, int eOrigin, SpatialAnchorPose_t pPose, IntByReference pHandleOut); + }; + /** native declaration : headers\openvr_capi.h:2371 */ + public interface GetSpatialAnchorPose_callback extends Callback { + int apply(int unHandle, int eOrigin, SpatialAnchorPose_t pPoseOut); + }; + /** native declaration : headers\openvr_capi.h:2372 */ + public interface GetSpatialAnchorDescriptor_callback extends Callback { + int apply(int unHandle, Pointer pchDescriptorOut, IntByReference punDescriptorBufferLenInOut); + }; + public VR_IVRSpatialAnchors_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("CreateSpatialAnchorFromDescriptor", "CreateSpatialAnchorFromPose", "GetSpatialAnchorPose", "GetSpatialAnchorDescriptor"); + } + /** + * @param CreateSpatialAnchorFromDescriptor C type : CreateSpatialAnchorFromDescriptor_callback*
+ * @param CreateSpatialAnchorFromPose C type : CreateSpatialAnchorFromPose_callback*
+ * @param GetSpatialAnchorPose C type : GetSpatialAnchorPose_callback*
+ * @param GetSpatialAnchorDescriptor C type : GetSpatialAnchorDescriptor_callback* + */ + public VR_IVRSpatialAnchors_FnTable(VR_IVRSpatialAnchors_FnTable.CreateSpatialAnchorFromDescriptor_callback CreateSpatialAnchorFromDescriptor, VR_IVRSpatialAnchors_FnTable.CreateSpatialAnchorFromPose_callback CreateSpatialAnchorFromPose, VR_IVRSpatialAnchors_FnTable.GetSpatialAnchorPose_callback GetSpatialAnchorPose, VR_IVRSpatialAnchors_FnTable.GetSpatialAnchorDescriptor_callback GetSpatialAnchorDescriptor) { + super(); + this.CreateSpatialAnchorFromDescriptor = CreateSpatialAnchorFromDescriptor; + this.CreateSpatialAnchorFromPose = CreateSpatialAnchorFromPose; + this.GetSpatialAnchorPose = GetSpatialAnchorPose; + this.GetSpatialAnchorDescriptor = GetSpatialAnchorDescriptor; + } + public VR_IVRSpatialAnchors_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRSpatialAnchors_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRSpatialAnchors_FnTable implements Structure.ByValue { + + }; +} diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRSystem_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRSystem_FnTable.java index 7b372d014f..315ca22cdc 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRSystem_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRSystem_FnTable.java @@ -1,352 +1,316 @@ package com.jme3.system.jopenvr; +import com.jme3.system.jopenvr.JOpenVRLibrary.VkInstance_T; import com.sun.jna.Callback; import com.sun.jna.Pointer; import com.sun.jna.Structure; import com.sun.jna.ptr.FloatByReference; import com.sun.jna.ptr.IntByReference; import com.sun.jna.ptr.LongByReference; - import java.util.Arrays; import java.util.List; /** - * OpenVR Function Pointer Tables
- * native declaration : headers\openvr_capi.h:1416
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRSystem_FnTable extends Structure { - - /** C type : GetRecommendedRenderTargetSize_callback* */ - public VR_IVRSystem_FnTable.GetRecommendedRenderTargetSize_callback GetRecommendedRenderTargetSize; - /** C type : GetProjectionMatrix_callback* */ - public VR_IVRSystem_FnTable.GetProjectionMatrix_callback GetProjectionMatrix; - /** C type : GetProjectionRaw_callback* */ - public VR_IVRSystem_FnTable.GetProjectionRaw_callback GetProjectionRaw; - /** C type : ComputeDistortion_callback* */ - public VR_IVRSystem_FnTable.ComputeDistortion_callback ComputeDistortion; - /** C type : GetEyeToHeadTransform_callback* */ - public VR_IVRSystem_FnTable.GetEyeToHeadTransform_callback GetEyeToHeadTransform; - /** C type : GetTimeSinceLastVsync_callback* */ - public VR_IVRSystem_FnTable.GetTimeSinceLastVsync_callback GetTimeSinceLastVsync; - /** C type : GetD3D9AdapterIndex_callback* */ - public VR_IVRSystem_FnTable.GetD3D9AdapterIndex_callback GetD3D9AdapterIndex; - /** C type : GetDXGIOutputInfo_callback* */ - public com.jme3.system.jopenvr.VR_IVRExtendedDisplay_FnTable.GetDXGIOutputInfo_callback GetDXGIOutputInfo; - /** C type : GetOutputDevice_callback* */ - public VR_IVRSystem_FnTable.GetOutputDevice_callback GetOutputDevice; - /** C type : IsDisplayOnDesktop_callback* */ - public VR_IVRSystem_FnTable.IsDisplayOnDesktop_callback IsDisplayOnDesktop; - /** C type : SetDisplayVisibility_callback* */ - public VR_IVRSystem_FnTable.SetDisplayVisibility_callback SetDisplayVisibility; - /** C type : GetDeviceToAbsoluteTrackingPose_callback* */ - public VR_IVRSystem_FnTable.GetDeviceToAbsoluteTrackingPose_callback GetDeviceToAbsoluteTrackingPose; - /** C type : ResetSeatedZeroPose_callback* */ - public VR_IVRSystem_FnTable.ResetSeatedZeroPose_callback ResetSeatedZeroPose; - /** C type : GetSeatedZeroPoseToStandingAbsoluteTrackingPose_callback* */ - public VR_IVRSystem_FnTable.GetSeatedZeroPoseToStandingAbsoluteTrackingPose_callback GetSeatedZeroPoseToStandingAbsoluteTrackingPose; - /** C type : GetRawZeroPoseToStandingAbsoluteTrackingPose_callback* */ - public VR_IVRSystem_FnTable.GetRawZeroPoseToStandingAbsoluteTrackingPose_callback GetRawZeroPoseToStandingAbsoluteTrackingPose; - /** C type : GetSortedTrackedDeviceIndicesOfClass_callback* */ - public VR_IVRSystem_FnTable.GetSortedTrackedDeviceIndicesOfClass_callback GetSortedTrackedDeviceIndicesOfClass; - /** C type : GetTrackedDeviceActivityLevel_callback* */ - public VR_IVRSystem_FnTable.GetTrackedDeviceActivityLevel_callback GetTrackedDeviceActivityLevel; - /** C type : ApplyTransform_callback* */ - public VR_IVRSystem_FnTable.ApplyTransform_callback ApplyTransform; - /** C type : GetTrackedDeviceIndexForControllerRole_callback* */ - public VR_IVRSystem_FnTable.GetTrackedDeviceIndexForControllerRole_callback GetTrackedDeviceIndexForControllerRole; - /** C type : GetControllerRoleForTrackedDeviceIndex_callback* */ - public VR_IVRSystem_FnTable.GetControllerRoleForTrackedDeviceIndex_callback GetControllerRoleForTrackedDeviceIndex; - /** C type : GetTrackedDeviceClass_callback* */ - public VR_IVRSystem_FnTable.GetTrackedDeviceClass_callback GetTrackedDeviceClass; - /** C type : IsTrackedDeviceConnected_callback* */ - public VR_IVRSystem_FnTable.IsTrackedDeviceConnected_callback IsTrackedDeviceConnected; - /** C type : GetBoolTrackedDeviceProperty_callback* */ - public VR_IVRSystem_FnTable.GetBoolTrackedDeviceProperty_callback GetBoolTrackedDeviceProperty; - /** C type : GetFloatTrackedDeviceProperty_callback* */ - public VR_IVRSystem_FnTable.GetFloatTrackedDeviceProperty_callback GetFloatTrackedDeviceProperty; - /** C type : GetInt32TrackedDeviceProperty_callback* */ - public VR_IVRSystem_FnTable.GetInt32TrackedDeviceProperty_callback GetInt32TrackedDeviceProperty; - /** C type : GetUint64TrackedDeviceProperty_callback* */ - public VR_IVRSystem_FnTable.GetUint64TrackedDeviceProperty_callback GetUint64TrackedDeviceProperty; - /** C type : GetMatrix34TrackedDeviceProperty_callback* */ - public VR_IVRSystem_FnTable.GetMatrix34TrackedDeviceProperty_callback GetMatrix34TrackedDeviceProperty; - /** C type : GetStringTrackedDeviceProperty_callback* */ - public VR_IVRSystem_FnTable.GetStringTrackedDeviceProperty_callback GetStringTrackedDeviceProperty; - /** C type : GetPropErrorNameFromEnum_callback* */ - public VR_IVRSystem_FnTable.GetPropErrorNameFromEnum_callback GetPropErrorNameFromEnum; - /** C type : PollNextEvent_callback* */ - public VR_IVRSystem_FnTable.PollNextEvent_callback PollNextEvent; - /** C type : PollNextEventWithPose_callback* */ - public VR_IVRSystem_FnTable.PollNextEventWithPose_callback PollNextEventWithPose; - /** C type : GetEventTypeNameFromEnum_callback* */ - public VR_IVRSystem_FnTable.GetEventTypeNameFromEnum_callback GetEventTypeNameFromEnum; - /** C type : GetHiddenAreaMesh_callback* */ - public VR_IVRSystem_FnTable.GetHiddenAreaMesh_callback GetHiddenAreaMesh; - /** C type : GetControllerState_callback* */ - public VR_IVRSystem_FnTable.GetControllerState_callback GetControllerState; - /** C type : GetControllerStateWithPose_callback* */ - public VR_IVRSystem_FnTable.GetControllerStateWithPose_callback GetControllerStateWithPose; - /** C type : TriggerHapticPulse_callback* */ - public VR_IVRSystem_FnTable.TriggerHapticPulse_callback TriggerHapticPulse; - /** C type : GetButtonIdNameFromEnum_callback* */ - public VR_IVRSystem_FnTable.GetButtonIdNameFromEnum_callback GetButtonIdNameFromEnum; - /** C type : GetControllerAxisTypeNameFromEnum_callback* */ - public VR_IVRSystem_FnTable.GetControllerAxisTypeNameFromEnum_callback GetControllerAxisTypeNameFromEnum; - /** C type : CaptureInputFocus_callback* */ - public VR_IVRSystem_FnTable.CaptureInputFocus_callback CaptureInputFocus; - /** C type : ReleaseInputFocus_callback* */ - public VR_IVRSystem_FnTable.ReleaseInputFocus_callback ReleaseInputFocus; - /** C type : IsInputFocusCapturedByAnotherProcess_callback* */ - public VR_IVRSystem_FnTable.IsInputFocusCapturedByAnotherProcess_callback IsInputFocusCapturedByAnotherProcess; - /** C type : DriverDebugRequest_callback* */ - public VR_IVRSystem_FnTable.DriverDebugRequest_callback DriverDebugRequest; - /** C type : PerformFirmwareUpdate_callback* */ - public VR_IVRSystem_FnTable.PerformFirmwareUpdate_callback PerformFirmwareUpdate; - /** C type : AcknowledgeQuit_Exiting_callback* */ - public VR_IVRSystem_FnTable.AcknowledgeQuit_Exiting_callback AcknowledgeQuit_Exiting; - /** C type : AcknowledgeQuit_UserPrompt_callback* */ - public VR_IVRSystem_FnTable.AcknowledgeQuit_UserPrompt_callback AcknowledgeQuit_UserPrompt; - /** native declaration : headers\openvr_capi.h:1371 */ - public interface GetRecommendedRenderTargetSize_callback extends Callback { - void apply(IntByReference pnWidth, IntByReference pnHeight); - }; - /** native declaration : headers\openvr_capi.h:1372 */ - public interface GetProjectionMatrix_callback extends Callback { - com.jme3.system.jopenvr.HmdMatrix44_t.ByValue apply(int eEye, float fNearZ, float fFarZ); - }; - /** native declaration : headers\openvr_capi.h:1373 */ - public interface GetProjectionRaw_callback extends Callback { - void apply(int eEye, FloatByReference pfLeft, FloatByReference pfRight, FloatByReference pfTop, FloatByReference pfBottom); - }; - /** native declaration : headers\openvr_capi.h:1374 */ - public interface ComputeDistortion_callback extends Callback { - byte apply(int eEye, float fU, float fV, DistortionCoordinates_t pDistortionCoordinates); - }; - - /** native declaration : headers\openvr_capi.h:1375 */ - public interface GetEyeToHeadTransform_callback extends Callback { - HmdMatrix34_t.ByValue apply(int eEye); - }; - /** native declaration : headers\openvr_capi.h:1376 */ - public interface GetTimeSinceLastVsync_callback extends Callback { - byte apply(FloatByReference pfSecondsSinceLastVsync, LongByReference pulFrameCounter); - }; - /** native declaration : headers\openvr_capi.h:1377 */ - public interface GetD3D9AdapterIndex_callback extends Callback { - int apply(); - }; - /** native declaration : headers\openvr_capi.h:1378 */ - public interface GetDXGIOutputInfo_callback extends Callback { - void apply(IntByReference pnAdapterIndex); - }; - /** native declaration : headers\openvr_capi.h:1379 */ - public interface GetOutputDevice_callback extends Callback { - void apply(LongByReference pnDevice, int textureType); - }; - /** native declaration : headers\openvr_capi.h:1380 */ - public interface IsDisplayOnDesktop_callback extends Callback { - byte apply(); - }; - /** native declaration : headers\openvr_capi.h:1381 */ - public interface SetDisplayVisibility_callback extends Callback { - byte apply(byte bIsVisibleOnDesktop); - }; - /** native declaration : headers\openvr_capi.h:1382 */ - public interface GetDeviceToAbsoluteTrackingPose_callback extends Callback { - void apply(int eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t pTrackedDevicePoseArray, int unTrackedDevicePoseArrayCount); - }; - /** native declaration : headers\openvr_capi.h:1383 */ - public interface ResetSeatedZeroPose_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1384 */ - public interface GetSeatedZeroPoseToStandingAbsoluteTrackingPose_callback extends Callback { - HmdMatrix34_t.ByValue apply(); - }; - /** native declaration : headers\openvr_capi.h:1385 */ - public interface GetRawZeroPoseToStandingAbsoluteTrackingPose_callback extends Callback { - HmdMatrix34_t.ByValue apply(); - }; - /** native declaration : headers\openvr_capi.h:1386 */ - public interface GetSortedTrackedDeviceIndicesOfClass_callback extends Callback { - int apply(int eTrackedDeviceClass, IntByReference punTrackedDeviceIndexArray, int unTrackedDeviceIndexArrayCount, int unRelativeToTrackedDeviceIndex); - }; - /** native declaration : headers\openvr_capi.h:1387 */ - public interface GetTrackedDeviceActivityLevel_callback extends Callback { - int apply(int unDeviceId); - }; - /** native declaration : headers\openvr_capi.h:1388 */ - public interface ApplyTransform_callback extends Callback { - void apply(TrackedDevicePose_t pOutputPose, TrackedDevicePose_t pTrackedDevicePose, HmdMatrix34_t pTransform); - }; - /** native declaration : headers\openvr_capi.h:1389 */ - public interface GetTrackedDeviceIndexForControllerRole_callback extends Callback { - int apply(int unDeviceType); - }; - /** native declaration : headers\openvr_capi.h:1390 */ - public interface GetControllerRoleForTrackedDeviceIndex_callback extends Callback { - int apply(int unDeviceIndex); - }; - /** native declaration : headers\openvr_capi.h:1391 */ - public interface GetTrackedDeviceClass_callback extends Callback { - int apply(int unDeviceIndex); - }; - /** native declaration : headers\openvr_capi.h:1392 */ - public interface IsTrackedDeviceConnected_callback extends Callback { - byte apply(int unDeviceIndex); - }; - /** native declaration : headers\openvr_capi.h:1393 */ - public interface GetBoolTrackedDeviceProperty_callback extends Callback { - byte apply(int unDeviceIndex, int prop, IntByReference pError); - }; - /** native declaration : headers\openvr_capi.h:1394 */ - public interface GetFloatTrackedDeviceProperty_callback extends Callback { - float apply(int unDeviceIndex, int prop, IntByReference pError); - }; - /** native declaration : headers\openvr_capi.h:1395 */ - public interface GetInt32TrackedDeviceProperty_callback extends Callback { - int apply(int unDeviceIndex, int prop, IntByReference pError); - }; - /** native declaration : headers\openvr_capi.h:1396 */ - public interface GetUint64TrackedDeviceProperty_callback extends Callback { - long apply(int unDeviceIndex, int prop, IntByReference pError); - }; - /** native declaration : headers\openvr_capi.h:1397 */ - public interface GetMatrix34TrackedDeviceProperty_callback extends Callback { - HmdMatrix34_t.ByValue apply(int unDeviceIndex, int prop, IntByReference pError); - }; - /** native declaration : headers\openvr_capi.h:1398 */ - public interface GetStringTrackedDeviceProperty_callback extends Callback { - int apply(int unDeviceIndex, int prop, Pointer pchValue, int unBufferSize, IntByReference pError); - }; - /** native declaration : headers\openvr_capi.h:1399 */ - public interface GetPropErrorNameFromEnum_callback extends Callback { - Pointer apply(int error); - }; - /** native declaration : headers\openvr_capi.h:1400 */ - public interface PollNextEvent_callback extends Callback { - byte apply(VREvent_t pEvent, int uncbVREvent); - }; - /** native declaration : headers\openvr_capi.h:1401 */ - public interface PollNextEventWithPose_callback extends Callback { - byte apply(int eOrigin, VREvent_t pEvent, int uncbVREvent, TrackedDevicePose_t pTrackedDevicePose); - }; - /** native declaration : headers\openvr_capi.h:1402 */ - public interface GetEventTypeNameFromEnum_callback extends Callback { - Pointer apply(int eType); - }; - /** native declaration : headers\openvr_capi.h:1403 */ - public interface GetHiddenAreaMesh_callback extends Callback { - com.jme3.system.jopenvr.HiddenAreaMesh_t.ByValue apply(int eEye, int type); - }; - /** native declaration : headers\openvr_capi.h:1404 */ - public interface GetControllerState_callback extends Callback { - byte apply(int unControllerDeviceIndex, VRControllerState_t pControllerState, int unControllerStateSize); - }; - /** native declaration : headers\openvr_capi.h:1405 */ - public interface GetControllerStateWithPose_callback extends Callback { - byte apply(int eOrigin, int unControllerDeviceIndex, VRControllerState_t pControllerState, int unControllerStateSize, TrackedDevicePose_t pTrackedDevicePose); - }; - /** native declaration : headers\openvr_capi.h:1406 */ - public interface TriggerHapticPulse_callback extends Callback { - void apply(int unControllerDeviceIndex, int unAxisId, short usDurationMicroSec); - }; - /** native declaration : headers\openvr_capi.h:1407 */ - public interface GetButtonIdNameFromEnum_callback extends Callback { - Pointer apply(int eButtonId); - }; - /** native declaration : headers\openvr_capi.h:1408 */ - public interface GetControllerAxisTypeNameFromEnum_callback extends Callback { - Pointer apply(int eAxisType); - }; - /** native declaration : headers\openvr_capi.h:1409 */ - public interface CaptureInputFocus_callback extends Callback { - byte apply(); - }; - /** native declaration : headers\openvr_capi.h:1410 */ - public interface ReleaseInputFocus_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1411 */ - public interface IsInputFocusCapturedByAnotherProcess_callback extends Callback { - byte apply(); - }; - /** native declaration : headers\openvr_capi.h:1412 */ - public interface DriverDebugRequest_callback extends Callback { - int apply(int unDeviceIndex, Pointer pchRequest, Pointer pchResponseBuffer, int unResponseBufferSize); - }; - /** native declaration : headers\openvr_capi.h:1413 */ - public interface PerformFirmwareUpdate_callback extends Callback { - int apply(int unDeviceIndex); - }; - /** native declaration : headers\openvr_capi.h:1414 */ - public interface AcknowledgeQuit_Exiting_callback extends Callback { - void apply(); - }; - /** native declaration : headers\openvr_capi.h:1415 */ - public interface AcknowledgeQuit_UserPrompt_callback extends Callback { - void apply(); - }; - public VR_IVRSystem_FnTable() { - super(); - } - protected List getFieldOrder() { - //return Arrays.asList("GetRecommendedRenderTargetSize", "GetProjectionMatrix", "GetProjectionRaw", "ComputeDistortion", "GetEyeToHeadTransform", "GetTimeSinceLastVsync", "GetD3D9AdapterIndex", "GetDXGIOutputInfo", "GetOutputDevice", "IsDisplayOnDesktop", "SetDisplayVisibility", "GetDeviceToAbsoluteTrackingPose", "ResetSeatedZeroPose", "GetSeatedZeroPoseToStandingAbsoluteTrackingPose", "GetRawZeroPoseToStandingAbsoluteTrackingPose", "GetSortedTrackedDeviceIndicesOfClass", "GetTrackedDeviceActivityLevel", "ApplyTransform", "GetTrackedDeviceIndexForControllerRole", "GetControllerRoleForTrackedDeviceIndex", "GetTrackedDeviceClass", "IsTrackedDeviceConnected", "GetBoolTrackedDeviceProperty", "GetFloatTrackedDeviceProperty", "GetInt32TrackedDeviceProperty", "GetUint64TrackedDeviceProperty", "GetMatrix34TrackedDeviceProperty", "GetStringTrackedDeviceProperty", "GetPropErrorNameFromEnum", "PollNextEvent", "PollNextEventWithPose", "GetEventTypeNameFromEnum", "GetHiddenAreaMesh", "GetControllerState", "GetControllerStateWithPose", "TriggerHapticPulse", "GetButtonIdNameFromEnum", "GetControllerAxisTypeNameFromEnum", "CaptureInputFocus", "ReleaseInputFocus", "IsInputFocusCapturedByAnotherProcess", "DriverDebugRequest", "PerformFirmwareUpdate", "AcknowledgeQuit_Exiting", "AcknowledgeQuit_UserPrompt"); - - return Arrays.asList("GetRecommendedRenderTargetSize", - "GetProjectionMatrix", - "GetProjectionRaw", - "ComputeDistortion", - "GetEyeToHeadTransform", - "GetTimeSinceLastVsync", - "GetD3D9AdapterIndex", - "GetDXGIOutputInfo", - "GetOutputDevice", - "IsDisplayOnDesktop", - "SetDisplayVisibility", - "GetDeviceToAbsoluteTrackingPose", - "ResetSeatedZeroPose", - "GetSeatedZeroPoseToStandingAbsoluteTrackingPose", - "GetRawZeroPoseToStandingAbsoluteTrackingPose", - "GetSortedTrackedDeviceIndicesOfClass", - "GetTrackedDeviceActivityLevel", - "ApplyTransform", - "GetTrackedDeviceIndexForControllerRole", - "GetControllerRoleForTrackedDeviceIndex", - "GetTrackedDeviceClass", - "IsTrackedDeviceConnected", - "GetBoolTrackedDeviceProperty", - "GetFloatTrackedDeviceProperty", - "GetInt32TrackedDeviceProperty", - "GetUint64TrackedDeviceProperty", - "GetMatrix34TrackedDeviceProperty", - "GetStringTrackedDeviceProperty", - "GetPropErrorNameFromEnum", - "PollNextEvent", - "PollNextEventWithPose", - "GetEventTypeNameFromEnum", - "GetHiddenAreaMesh", - "GetControllerState", - "GetControllerStateWithPose", - "TriggerHapticPulse", - "GetButtonIdNameFromEnum", - "GetControllerAxisTypeNameFromEnum", - "CaptureInputFocus", - "ReleaseInputFocus", - "IsInputFocusCapturedByAnotherProcess", - "DriverDebugRequest", - "PerformFirmwareUpdate", - "AcknowledgeQuit_Exiting", - "AcknowledgeQuit_UserPrompt"); - } - public VR_IVRSystem_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRSystem_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRSystem_FnTable implements Structure.ByValue { - - }; + * OpenVR Function Pointer Tables
+ * native declaration : headers\openvr_capi.h:1799
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRSystem_FnTable extends Structure { + /** C type : GetRecommendedRenderTargetSize_callback* */ + public VR_IVRSystem_FnTable.GetRecommendedRenderTargetSize_callback GetRecommendedRenderTargetSize; + /** C type : GetProjectionMatrix_callback* */ + public VR_IVRSystem_FnTable.GetProjectionMatrix_callback GetProjectionMatrix; + /** C type : GetProjectionRaw_callback* */ + public VR_IVRSystem_FnTable.GetProjectionRaw_callback GetProjectionRaw; + /** C type : ComputeDistortion_callback* */ + public VR_IVRSystem_FnTable.ComputeDistortion_callback ComputeDistortion; + /** C type : GetEyeToHeadTransform_callback* */ + public VR_IVRSystem_FnTable.GetEyeToHeadTransform_callback GetEyeToHeadTransform; + /** C type : GetTimeSinceLastVsync_callback* */ + public VR_IVRSystem_FnTable.GetTimeSinceLastVsync_callback GetTimeSinceLastVsync; + /** C type : GetD3D9AdapterIndex_callback* */ + public VR_IVRSystem_FnTable.GetD3D9AdapterIndex_callback GetD3D9AdapterIndex; + /** C type : GetDXGIOutputInfo_callback* */ + public com.jme3.system.jopenvr.VR_IVRExtendedDisplay_FnTable.GetDXGIOutputInfo_callback GetDXGIOutputInfo; + /** C type : GetOutputDevice_callback* */ + public VR_IVRSystem_FnTable.GetOutputDevice_callback GetOutputDevice; + /** C type : IsDisplayOnDesktop_callback* */ + public VR_IVRSystem_FnTable.IsDisplayOnDesktop_callback IsDisplayOnDesktop; + /** C type : SetDisplayVisibility_callback* */ + public VR_IVRSystem_FnTable.SetDisplayVisibility_callback SetDisplayVisibility; + /** C type : GetDeviceToAbsoluteTrackingPose_callback* */ + public VR_IVRSystem_FnTable.GetDeviceToAbsoluteTrackingPose_callback GetDeviceToAbsoluteTrackingPose; + /** C type : ResetSeatedZeroPose_callback* */ + public VR_IVRSystem_FnTable.ResetSeatedZeroPose_callback ResetSeatedZeroPose; + /** C type : GetSeatedZeroPoseToStandingAbsoluteTrackingPose_callback* */ + public VR_IVRSystem_FnTable.GetSeatedZeroPoseToStandingAbsoluteTrackingPose_callback GetSeatedZeroPoseToStandingAbsoluteTrackingPose; + /** C type : GetRawZeroPoseToStandingAbsoluteTrackingPose_callback* */ + public VR_IVRSystem_FnTable.GetRawZeroPoseToStandingAbsoluteTrackingPose_callback GetRawZeroPoseToStandingAbsoluteTrackingPose; + /** C type : GetSortedTrackedDeviceIndicesOfClass_callback* */ + public VR_IVRSystem_FnTable.GetSortedTrackedDeviceIndicesOfClass_callback GetSortedTrackedDeviceIndicesOfClass; + /** C type : GetTrackedDeviceActivityLevel_callback* */ + public VR_IVRSystem_FnTable.GetTrackedDeviceActivityLevel_callback GetTrackedDeviceActivityLevel; + /** C type : ApplyTransform_callback* */ + public VR_IVRSystem_FnTable.ApplyTransform_callback ApplyTransform; + /** C type : GetTrackedDeviceIndexForControllerRole_callback* */ + public VR_IVRSystem_FnTable.GetTrackedDeviceIndexForControllerRole_callback GetTrackedDeviceIndexForControllerRole; + /** C type : GetControllerRoleForTrackedDeviceIndex_callback* */ + public VR_IVRSystem_FnTable.GetControllerRoleForTrackedDeviceIndex_callback GetControllerRoleForTrackedDeviceIndex; + /** C type : GetTrackedDeviceClass_callback* */ + public VR_IVRSystem_FnTable.GetTrackedDeviceClass_callback GetTrackedDeviceClass; + /** C type : IsTrackedDeviceConnected_callback* */ + public VR_IVRSystem_FnTable.IsTrackedDeviceConnected_callback IsTrackedDeviceConnected; + /** C type : GetBoolTrackedDeviceProperty_callback* */ + public VR_IVRSystem_FnTable.GetBoolTrackedDeviceProperty_callback GetBoolTrackedDeviceProperty; + /** C type : GetFloatTrackedDeviceProperty_callback* */ + public VR_IVRSystem_FnTable.GetFloatTrackedDeviceProperty_callback GetFloatTrackedDeviceProperty; + /** C type : GetInt32TrackedDeviceProperty_callback* */ + public VR_IVRSystem_FnTable.GetInt32TrackedDeviceProperty_callback GetInt32TrackedDeviceProperty; + /** C type : GetUint64TrackedDeviceProperty_callback* */ + public VR_IVRSystem_FnTable.GetUint64TrackedDeviceProperty_callback GetUint64TrackedDeviceProperty; + /** C type : GetMatrix34TrackedDeviceProperty_callback* */ + public VR_IVRSystem_FnTable.GetMatrix34TrackedDeviceProperty_callback GetMatrix34TrackedDeviceProperty; + /** C type : GetArrayTrackedDeviceProperty_callback* */ + public VR_IVRSystem_FnTable.GetArrayTrackedDeviceProperty_callback GetArrayTrackedDeviceProperty; + /** C type : GetStringTrackedDeviceProperty_callback* */ + public VR_IVRSystem_FnTable.GetStringTrackedDeviceProperty_callback GetStringTrackedDeviceProperty; + /** C type : GetPropErrorNameFromEnum_callback* */ + public VR_IVRSystem_FnTable.GetPropErrorNameFromEnum_callback GetPropErrorNameFromEnum; + /** C type : PollNextEvent_callback* */ + public VR_IVRSystem_FnTable.PollNextEvent_callback PollNextEvent; + /** C type : PollNextEventWithPose_callback* */ + public VR_IVRSystem_FnTable.PollNextEventWithPose_callback PollNextEventWithPose; + /** C type : GetEventTypeNameFromEnum_callback* */ + public VR_IVRSystem_FnTable.GetEventTypeNameFromEnum_callback GetEventTypeNameFromEnum; + /** C type : GetHiddenAreaMesh_callback* */ + public VR_IVRSystem_FnTable.GetHiddenAreaMesh_callback GetHiddenAreaMesh; + /** C type : GetControllerState_callback* */ + public VR_IVRSystem_FnTable.GetControllerState_callback GetControllerState; + /** C type : GetControllerStateWithPose_callback* */ + public VR_IVRSystem_FnTable.GetControllerStateWithPose_callback GetControllerStateWithPose; + /** C type : TriggerHapticPulse_callback* */ + public VR_IVRSystem_FnTable.TriggerHapticPulse_callback TriggerHapticPulse; + /** C type : GetButtonIdNameFromEnum_callback* */ + public VR_IVRSystem_FnTable.GetButtonIdNameFromEnum_callback GetButtonIdNameFromEnum; + /** C type : GetControllerAxisTypeNameFromEnum_callback* */ + public VR_IVRSystem_FnTable.GetControllerAxisTypeNameFromEnum_callback GetControllerAxisTypeNameFromEnum; + /** C type : IsInputAvailable_callback* */ + public VR_IVRSystem_FnTable.IsInputAvailable_callback IsInputAvailable; + /** C type : IsSteamVRDrawingControllers_callback* */ + public VR_IVRSystem_FnTable.IsSteamVRDrawingControllers_callback IsSteamVRDrawingControllers; + /** C type : ShouldApplicationPause_callback* */ + public VR_IVRSystem_FnTable.ShouldApplicationPause_callback ShouldApplicationPause; + /** C type : ShouldApplicationReduceRenderingWork_callback* */ + public VR_IVRSystem_FnTable.ShouldApplicationReduceRenderingWork_callback ShouldApplicationReduceRenderingWork; + /** C type : DriverDebugRequest_callback* */ + public VR_IVRSystem_FnTable.DriverDebugRequest_callback DriverDebugRequest; + /** C type : PerformFirmwareUpdate_callback* */ + public VR_IVRSystem_FnTable.PerformFirmwareUpdate_callback PerformFirmwareUpdate; + /** C type : AcknowledgeQuit_Exiting_callback* */ + public VR_IVRSystem_FnTable.AcknowledgeQuit_Exiting_callback AcknowledgeQuit_Exiting; + /** C type : AcknowledgeQuit_UserPrompt_callback* */ + public VR_IVRSystem_FnTable.AcknowledgeQuit_UserPrompt_callback AcknowledgeQuit_UserPrompt; + /** native declaration : headers\openvr_capi.h:1752 */ + public interface GetRecommendedRenderTargetSize_callback extends Callback { + void apply(IntByReference pnWidth, IntByReference pnHeight); + }; + /** native declaration : headers\openvr_capi.h:1753 */ + public interface GetProjectionMatrix_callback extends Callback { + com.jme3.system.jopenvr.HmdMatrix44_t.ByValue apply(int eEye, float fNearZ, float fFarZ); + }; + /** native declaration : headers\openvr_capi.h:1754 */ + public interface GetProjectionRaw_callback extends Callback { + void apply(int eEye, FloatByReference pfLeft, FloatByReference pfRight, FloatByReference pfTop, FloatByReference pfBottom); + }; + /** native declaration : headers\openvr_capi.h:1755 */ + public interface ComputeDistortion_callback extends Callback { + byte apply(int eEye, float fU, float fV, DistortionCoordinates_t pDistortionCoordinates); + }; + /** native declaration : headers\openvr_capi.h:1756 */ + public interface GetEyeToHeadTransform_callback extends Callback { + HmdMatrix34_t.ByValue apply(int eEye); + }; + /** native declaration : headers\openvr_capi.h:1757 */ + public interface GetTimeSinceLastVsync_callback extends Callback { + byte apply(FloatByReference pfSecondsSinceLastVsync, LongByReference pulFrameCounter); + }; + /** native declaration : headers\openvr_capi.h:1758 */ + public interface GetD3D9AdapterIndex_callback extends Callback { + int apply(); + }; + /** native declaration : headers\openvr_capi.h:1759 */ + public interface GetDXGIOutputInfo_callback extends Callback { + void apply(IntByReference pnAdapterIndex); + }; + /** native declaration : headers\openvr_capi.h:1760 */ + public interface GetOutputDevice_callback extends Callback { + void apply(LongByReference pnDevice, int textureType, VkInstance_T pInstance); + }; + /** native declaration : headers\openvr_capi.h:1761 */ + public interface IsDisplayOnDesktop_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:1762 */ + public interface SetDisplayVisibility_callback extends Callback { + byte apply(byte bIsVisibleOnDesktop); + }; + /** native declaration : headers\openvr_capi.h:1763 */ + public interface GetDeviceToAbsoluteTrackingPose_callback extends Callback { + void apply(int eOrigin, float fPredictedSecondsToPhotonsFromNow, TrackedDevicePose_t pTrackedDevicePoseArray, int unTrackedDevicePoseArrayCount); + }; + /** native declaration : headers\openvr_capi.h:1764 */ + public interface ResetSeatedZeroPose_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:1765 */ + public interface GetSeatedZeroPoseToStandingAbsoluteTrackingPose_callback extends Callback { + HmdMatrix34_t.ByValue apply(); + }; + /** native declaration : headers\openvr_capi.h:1766 */ + public interface GetRawZeroPoseToStandingAbsoluteTrackingPose_callback extends Callback { + HmdMatrix34_t.ByValue apply(); + }; + /** native declaration : headers\openvr_capi.h:1767 */ + public interface GetSortedTrackedDeviceIndicesOfClass_callback extends Callback { + int apply(int eTrackedDeviceClass, IntByReference punTrackedDeviceIndexArray, int unTrackedDeviceIndexArrayCount, int unRelativeToTrackedDeviceIndex); + }; + /** native declaration : headers\openvr_capi.h:1768 */ + public interface GetTrackedDeviceActivityLevel_callback extends Callback { + int apply(int unDeviceId); + }; + /** native declaration : headers\openvr_capi.h:1769 */ + public interface ApplyTransform_callback extends Callback { + void apply(TrackedDevicePose_t pOutputPose, TrackedDevicePose_t pTrackedDevicePose, HmdMatrix34_t pTransform); + }; + /** native declaration : headers\openvr_capi.h:1770 */ + public interface GetTrackedDeviceIndexForControllerRole_callback extends Callback { + int apply(int unDeviceType); + }; + /** native declaration : headers\openvr_capi.h:1771 */ + public interface GetControllerRoleForTrackedDeviceIndex_callback extends Callback { + int apply(int unDeviceIndex); + }; + /** native declaration : headers\openvr_capi.h:1772 */ + public interface GetTrackedDeviceClass_callback extends Callback { + int apply(int unDeviceIndex); + }; + /** native declaration : headers\openvr_capi.h:1773 */ + public interface IsTrackedDeviceConnected_callback extends Callback { + byte apply(int unDeviceIndex); + }; + /** native declaration : headers\openvr_capi.h:1774 */ + public interface GetBoolTrackedDeviceProperty_callback extends Callback { + byte apply(int unDeviceIndex, int prop, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:1775 */ + public interface GetFloatTrackedDeviceProperty_callback extends Callback { + float apply(int unDeviceIndex, int prop, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:1776 */ + public interface GetInt32TrackedDeviceProperty_callback extends Callback { + int apply(int unDeviceIndex, int prop, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:1777 */ + public interface GetUint64TrackedDeviceProperty_callback extends Callback { + long apply(int unDeviceIndex, int prop, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:1778 */ + public interface GetMatrix34TrackedDeviceProperty_callback extends Callback { + HmdMatrix34_t.ByValue apply(int unDeviceIndex, int prop, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:1779 */ + public interface GetArrayTrackedDeviceProperty_callback extends Callback { + int apply(int unDeviceIndex, int prop, int propType, Pointer pBuffer, int unBufferSize, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:1780 */ + public interface GetStringTrackedDeviceProperty_callback extends Callback { + int apply(int unDeviceIndex, int prop, Pointer pchValue, int unBufferSize, IntByReference pError); + }; + /** native declaration : headers\openvr_capi.h:1781 */ + public interface GetPropErrorNameFromEnum_callback extends Callback { + Pointer apply(int error); + }; + /** native declaration : headers\openvr_capi.h:1782 */ + public interface PollNextEvent_callback extends Callback { + byte apply(VREvent_t pEvent, int uncbVREvent); + }; + /** native declaration : headers\openvr_capi.h:1783 */ + public interface PollNextEventWithPose_callback extends Callback { + byte apply(int eOrigin, VREvent_t pEvent, int uncbVREvent, TrackedDevicePose_t pTrackedDevicePose); + }; + /** native declaration : headers\openvr_capi.h:1784 */ + public interface GetEventTypeNameFromEnum_callback extends Callback { + Pointer apply(int eType); + }; + /** native declaration : headers\openvr_capi.h:1785 */ + public interface GetHiddenAreaMesh_callback extends Callback { + com.jme3.system.jopenvr.HiddenAreaMesh_t.ByValue apply(int eEye, int type); + }; + /** native declaration : headers\openvr_capi.h:1786 */ + public interface GetControllerState_callback extends Callback { + byte apply(int unControllerDeviceIndex, VRControllerState_t pControllerState, int unControllerStateSize); + }; + /** native declaration : headers\openvr_capi.h:1787 */ + public interface GetControllerStateWithPose_callback extends Callback { + byte apply(int eOrigin, int unControllerDeviceIndex, VRControllerState_t pControllerState, int unControllerStateSize, TrackedDevicePose_t pTrackedDevicePose); + }; + /** native declaration : headers\openvr_capi.h:1788 */ + public interface TriggerHapticPulse_callback extends Callback { + void apply(int unControllerDeviceIndex, int unAxisId, short usDurationMicroSec); + }; + /** native declaration : headers\openvr_capi.h:1789 */ + public interface GetButtonIdNameFromEnum_callback extends Callback { + Pointer apply(int eButtonId); + }; + /** native declaration : headers\openvr_capi.h:1790 */ + public interface GetControllerAxisTypeNameFromEnum_callback extends Callback { + Pointer apply(int eAxisType); + }; + /** native declaration : headers\openvr_capi.h:1791 */ + public interface IsInputAvailable_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:1792 */ + public interface IsSteamVRDrawingControllers_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:1793 */ + public interface ShouldApplicationPause_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:1794 */ + public interface ShouldApplicationReduceRenderingWork_callback extends Callback { + byte apply(); + }; + /** native declaration : headers\openvr_capi.h:1795 */ + public interface DriverDebugRequest_callback extends Callback { + int apply(int unDeviceIndex, Pointer pchRequest, Pointer pchResponseBuffer, int unResponseBufferSize); + }; + /** native declaration : headers\openvr_capi.h:1796 */ + public interface PerformFirmwareUpdate_callback extends Callback { + int apply(int unDeviceIndex); + }; + /** native declaration : headers\openvr_capi.h:1797 */ + public interface AcknowledgeQuit_Exiting_callback extends Callback { + void apply(); + }; + /** native declaration : headers\openvr_capi.h:1798 */ + public interface AcknowledgeQuit_UserPrompt_callback extends Callback { + void apply(); + }; + public VR_IVRSystem_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("GetRecommendedRenderTargetSize", "GetProjectionMatrix", "GetProjectionRaw", "ComputeDistortion", "GetEyeToHeadTransform", "GetTimeSinceLastVsync", "GetD3D9AdapterIndex", "GetDXGIOutputInfo", "GetOutputDevice", "IsDisplayOnDesktop", "SetDisplayVisibility", "GetDeviceToAbsoluteTrackingPose", "ResetSeatedZeroPose", "GetSeatedZeroPoseToStandingAbsoluteTrackingPose", "GetRawZeroPoseToStandingAbsoluteTrackingPose", "GetSortedTrackedDeviceIndicesOfClass", "GetTrackedDeviceActivityLevel", "ApplyTransform", "GetTrackedDeviceIndexForControllerRole", "GetControllerRoleForTrackedDeviceIndex", "GetTrackedDeviceClass", "IsTrackedDeviceConnected", "GetBoolTrackedDeviceProperty", "GetFloatTrackedDeviceProperty", "GetInt32TrackedDeviceProperty", "GetUint64TrackedDeviceProperty", "GetMatrix34TrackedDeviceProperty", "GetArrayTrackedDeviceProperty", "GetStringTrackedDeviceProperty", "GetPropErrorNameFromEnum", "PollNextEvent", "PollNextEventWithPose", "GetEventTypeNameFromEnum", "GetHiddenAreaMesh", "GetControllerState", "GetControllerStateWithPose", "TriggerHapticPulse", "GetButtonIdNameFromEnum", "GetControllerAxisTypeNameFromEnum", "IsInputAvailable", "IsSteamVRDrawingControllers", "ShouldApplicationPause", "ShouldApplicationReduceRenderingWork", "DriverDebugRequest", "PerformFirmwareUpdate", "AcknowledgeQuit_Exiting", "AcknowledgeQuit_UserPrompt"); + } + public VR_IVRSystem_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRSystem_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRSystem_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRTrackedCamera_FnTable.java b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRTrackedCamera_FnTable.java index 8b7cd78b23..1fc5d469a6 100644 --- a/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRTrackedCamera_FnTable.java +++ b/jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRTrackedCamera_FnTable.java @@ -8,97 +8,97 @@ import java.util.Arrays; import java.util.List; /** - * native declaration : headers\openvr_capi.h:1450
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class VR_IVRTrackedCamera_FnTable extends Structure { - /** C type : GetCameraErrorNameFromEnum_callback* */ - public VR_IVRTrackedCamera_FnTable.GetCameraErrorNameFromEnum_callback GetCameraErrorNameFromEnum; - /** C type : HasCamera_callback* */ - public VR_IVRTrackedCamera_FnTable.HasCamera_callback HasCamera; - /** C type : GetCameraFrameSize_callback* */ - public VR_IVRTrackedCamera_FnTable.GetCameraFrameSize_callback GetCameraFrameSize; - /** C type : GetCameraIntrinsics_callback* */ - public VR_IVRTrackedCamera_FnTable.GetCameraIntrinsics_callback GetCameraIntrinsics; - /** C type : GetCameraProjection_callback* */ - public VR_IVRTrackedCamera_FnTable.GetCameraProjection_callback GetCameraProjection; - /** C type : AcquireVideoStreamingService_callback* */ - public VR_IVRTrackedCamera_FnTable.AcquireVideoStreamingService_callback AcquireVideoStreamingService; - /** C type : ReleaseVideoStreamingService_callback* */ - public VR_IVRTrackedCamera_FnTable.ReleaseVideoStreamingService_callback ReleaseVideoStreamingService; - /** C type : GetVideoStreamFrameBuffer_callback* */ - public VR_IVRTrackedCamera_FnTable.GetVideoStreamFrameBuffer_callback GetVideoStreamFrameBuffer; - /** C type : GetVideoStreamTextureSize_callback* */ - public VR_IVRTrackedCamera_FnTable.GetVideoStreamTextureSize_callback GetVideoStreamTextureSize; - /** C type : GetVideoStreamTextureD3D11_callback* */ - public VR_IVRTrackedCamera_FnTable.GetVideoStreamTextureD3D11_callback GetVideoStreamTextureD3D11; - /** C type : GetVideoStreamTextureGL_callback* */ - public VR_IVRTrackedCamera_FnTable.GetVideoStreamTextureGL_callback GetVideoStreamTextureGL; - /** C type : ReleaseVideoStreamTextureGL_callback* */ - public VR_IVRTrackedCamera_FnTable.ReleaseVideoStreamTextureGL_callback ReleaseVideoStreamTextureGL; - /** native declaration : headers\openvr_capi.h:1438 */ - public interface GetCameraErrorNameFromEnum_callback extends Callback { - Pointer apply(int eCameraError); - }; - /** native declaration : headers\openvr_capi.h:1439 */ - public interface HasCamera_callback extends Callback { - int apply(int nDeviceIndex, Pointer pHasCamera); - }; - /** native declaration : headers\openvr_capi.h:1440 */ - public interface GetCameraFrameSize_callback extends Callback { - int apply(int nDeviceIndex, int eFrameType, IntByReference pnWidth, IntByReference pnHeight, IntByReference pnFrameBufferSize); - }; - /** native declaration : headers\openvr_capi.h:1441 */ - public interface GetCameraIntrinsics_callback extends Callback { - int apply(int nDeviceIndex, int eFrameType, HmdVector2_t pFocalLength, HmdVector2_t pCenter); - }; - /** native declaration : headers\openvr_capi.h:1442 */ - public interface GetCameraProjection_callback extends Callback { - int apply(int nDeviceIndex, int eFrameType, float flZNear, float flZFar, HmdMatrix44_t pProjection); - }; - /** native declaration : headers\openvr_capi.h:1443 */ - public interface AcquireVideoStreamingService_callback extends Callback { - int apply(int nDeviceIndex, LongByReference pHandle); - }; - /** native declaration : headers\openvr_capi.h:1444 */ - public interface ReleaseVideoStreamingService_callback extends Callback { - int apply(long hTrackedCamera); - }; - /** native declaration : headers\openvr_capi.h:1445 */ - public interface GetVideoStreamFrameBuffer_callback extends Callback { - int apply(long hTrackedCamera, int eFrameType, Pointer pFrameBuffer, int nFrameBufferSize, CameraVideoStreamFrameHeader_t pFrameHeader, int nFrameHeaderSize); - }; - /** native declaration : headers\openvr_capi.h:1446 */ - public interface GetVideoStreamTextureSize_callback extends Callback { - int apply(int nDeviceIndex, int eFrameType, VRTextureBounds_t pTextureBounds, IntByReference pnWidth, IntByReference pnHeight); - }; - /** native declaration : headers\openvr_capi.h:1447 */ - public interface GetVideoStreamTextureD3D11_callback extends Callback { - int apply(long hTrackedCamera, int eFrameType, Pointer pD3D11DeviceOrResource, PointerByReference ppD3D11ShaderResourceView, CameraVideoStreamFrameHeader_t pFrameHeader, int nFrameHeaderSize); - }; - /** native declaration : headers\openvr_capi.h:1448 */ - public interface GetVideoStreamTextureGL_callback extends Callback { - int apply(long hTrackedCamera, int eFrameType, IntByReference pglTextureId, CameraVideoStreamFrameHeader_t pFrameHeader, int nFrameHeaderSize); - }; - /** native declaration : headers\openvr_capi.h:1449 */ - public interface ReleaseVideoStreamTextureGL_callback extends Callback { - int apply(long hTrackedCamera, int glTextureId); - }; - public VR_IVRTrackedCamera_FnTable() { - super(); - } - protected List getFieldOrder() { - return Arrays.asList("GetCameraErrorNameFromEnum", "HasCamera", "GetCameraFrameSize", "GetCameraIntrinsics", "GetCameraProjection", "AcquireVideoStreamingService", "ReleaseVideoStreamingService", "GetVideoStreamFrameBuffer", "GetVideoStreamTextureSize", "GetVideoStreamTextureD3D11", "GetVideoStreamTextureGL", "ReleaseVideoStreamTextureGL"); - } - public VR_IVRTrackedCamera_FnTable(Pointer peer) { - super(peer); - } - public static class ByReference extends VR_IVRTrackedCamera_FnTable implements Structure.ByReference { - - }; - public static class ByValue extends VR_IVRTrackedCamera_FnTable implements Structure.ByValue { - - }; + * native declaration : headers\openvr_capi.h:1833
+ * This file was autogenerated by JNAerator,
+ * a tool written by Olivier Chafik that uses a few opensource projects..
+ * For help, please visit NativeLibs4Java , Rococoa, or JNA. + */ +public class VR_IVRTrackedCamera_FnTable extends Structure { + /** C type : GetCameraErrorNameFromEnum_callback* */ + public VR_IVRTrackedCamera_FnTable.GetCameraErrorNameFromEnum_callback GetCameraErrorNameFromEnum; + /** C type : HasCamera_callback* */ + public VR_IVRTrackedCamera_FnTable.HasCamera_callback HasCamera; + /** C type : GetCameraFrameSize_callback* */ + public VR_IVRTrackedCamera_FnTable.GetCameraFrameSize_callback GetCameraFrameSize; + /** C type : GetCameraIntrinsics_callback* */ + public VR_IVRTrackedCamera_FnTable.GetCameraIntrinsics_callback GetCameraIntrinsics; + /** C type : GetCameraProjection_callback* */ + public VR_IVRTrackedCamera_FnTable.GetCameraProjection_callback GetCameraProjection; + /** C type : AcquireVideoStreamingService_callback* */ + public VR_IVRTrackedCamera_FnTable.AcquireVideoStreamingService_callback AcquireVideoStreamingService; + /** C type : ReleaseVideoStreamingService_callback* */ + public VR_IVRTrackedCamera_FnTable.ReleaseVideoStreamingService_callback ReleaseVideoStreamingService; + /** C type : GetVideoStreamFrameBuffer_callback* */ + public VR_IVRTrackedCamera_FnTable.GetVideoStreamFrameBuffer_callback GetVideoStreamFrameBuffer; + /** C type : GetVideoStreamTextureSize_callback* */ + public VR_IVRTrackedCamera_FnTable.GetVideoStreamTextureSize_callback GetVideoStreamTextureSize; + /** C type : GetVideoStreamTextureD3D11_callback* */ + public VR_IVRTrackedCamera_FnTable.GetVideoStreamTextureD3D11_callback GetVideoStreamTextureD3D11; + /** C type : GetVideoStreamTextureGL_callback* */ + public VR_IVRTrackedCamera_FnTable.GetVideoStreamTextureGL_callback GetVideoStreamTextureGL; + /** C type : ReleaseVideoStreamTextureGL_callback* */ + public VR_IVRTrackedCamera_FnTable.ReleaseVideoStreamTextureGL_callback ReleaseVideoStreamTextureGL; + /** native declaration : headers\openvr_capi.h:1821 */ + public interface GetCameraErrorNameFromEnum_callback extends Callback { + Pointer apply(int eCameraError); + }; + /** native declaration : headers\openvr_capi.h:1822 */ + public interface HasCamera_callback extends Callback { + int apply(int nDeviceIndex, Pointer pHasCamera); + }; + /** native declaration : headers\openvr_capi.h:1823 */ + public interface GetCameraFrameSize_callback extends Callback { + int apply(int nDeviceIndex, int eFrameType, IntByReference pnWidth, IntByReference pnHeight, IntByReference pnFrameBufferSize); + }; + /** native declaration : headers\openvr_capi.h:1824 */ + public interface GetCameraIntrinsics_callback extends Callback { + int apply(int nDeviceIndex, int eFrameType, HmdVector2_t pFocalLength, HmdVector2_t pCenter); + }; + /** native declaration : headers\openvr_capi.h:1825 */ + public interface GetCameraProjection_callback extends Callback { + int apply(int nDeviceIndex, int eFrameType, float flZNear, float flZFar, HmdMatrix44_t pProjection); + }; + /** native declaration : headers\openvr_capi.h:1826 */ + public interface AcquireVideoStreamingService_callback extends Callback { + int apply(int nDeviceIndex, LongByReference pHandle); + }; + /** native declaration : headers\openvr_capi.h:1827 */ + public interface ReleaseVideoStreamingService_callback extends Callback { + int apply(long hTrackedCamera); + }; + /** native declaration : headers\openvr_capi.h:1828 */ + public interface GetVideoStreamFrameBuffer_callback extends Callback { + int apply(long hTrackedCamera, int eFrameType, Pointer pFrameBuffer, int nFrameBufferSize, CameraVideoStreamFrameHeader_t pFrameHeader, int nFrameHeaderSize); + }; + /** native declaration : headers\openvr_capi.h:1829 */ + public interface GetVideoStreamTextureSize_callback extends Callback { + int apply(int nDeviceIndex, int eFrameType, VRTextureBounds_t pTextureBounds, IntByReference pnWidth, IntByReference pnHeight); + }; + /** native declaration : headers\openvr_capi.h:1830 */ + public interface GetVideoStreamTextureD3D11_callback extends Callback { + int apply(long hTrackedCamera, int eFrameType, Pointer pD3D11DeviceOrResource, PointerByReference ppD3D11ShaderResourceView, CameraVideoStreamFrameHeader_t pFrameHeader, int nFrameHeaderSize); + }; + /** native declaration : headers\openvr_capi.h:1831 */ + public interface GetVideoStreamTextureGL_callback extends Callback { + int apply(long hTrackedCamera, int eFrameType, IntByReference pglTextureId, CameraVideoStreamFrameHeader_t pFrameHeader, int nFrameHeaderSize); + }; + /** native declaration : headers\openvr_capi.h:1832 */ + public interface ReleaseVideoStreamTextureGL_callback extends Callback { + int apply(long hTrackedCamera, int glTextureId); + }; + public VR_IVRTrackedCamera_FnTable() { + super(); + } + protected List getFieldOrder() { + return Arrays.asList("GetCameraErrorNameFromEnum", "HasCamera", "GetCameraFrameSize", "GetCameraIntrinsics", "GetCameraProjection", "AcquireVideoStreamingService", "ReleaseVideoStreamingService", "GetVideoStreamFrameBuffer", "GetVideoStreamTextureSize", "GetVideoStreamTextureD3D11", "GetVideoStreamTextureGL", "ReleaseVideoStreamTextureGL"); + } + public VR_IVRTrackedCamera_FnTable(Pointer peer) { + super(peer); + } + public static class ByReference extends VR_IVRTrackedCamera_FnTable implements Structure.ByReference { + + }; + public static class ByValue extends VR_IVRTrackedCamera_FnTable implements Structure.ByValue { + + }; } diff --git a/jme3-vr/src/main/java/com/jme3/util/VRUtil.java b/jme3-vr/src/main/java/com/jme3/util/VRUtil.java index 9111e340f9..abc8d3ca9e 100644 --- a/jme3-vr/src/main/java/com/jme3/util/VRUtil.java +++ b/jme3-vr/src/main/java/com/jme3/util/VRUtil.java @@ -7,8 +7,7 @@ import com.jme3.math.FastMath; import com.jme3.math.Matrix4f; import com.jme3.math.Quaternion; -import com.jme3.system.jopenvr.HmdMatrix34_t; -import com.jme3.system.jopenvr.HmdMatrix44_t; + import java.util.concurrent.TimeUnit; @@ -37,21 +36,8 @@ public static void sleepNanos(long nanoDuration) { } while (timeLeft > 0); } - public static Matrix4f convertSteamVRMatrix3ToMatrix4f(HmdMatrix34_t hmdMatrix, Matrix4f mat){ - mat.set(hmdMatrix.m[0], hmdMatrix.m[1], hmdMatrix.m[2], hmdMatrix.m[3], - hmdMatrix.m[4], hmdMatrix.m[5], hmdMatrix.m[6], hmdMatrix.m[7], - hmdMatrix.m[8], hmdMatrix.m[9], hmdMatrix.m[10], hmdMatrix.m[11], - 0f, 0f, 0f, 1f); - return mat; - } + - public static Matrix4f convertSteamVRMatrix4ToMatrix4f(HmdMatrix44_t hmdMatrix, Matrix4f mat){ - mat.set(hmdMatrix.m[0], hmdMatrix.m[1], hmdMatrix.m[2], hmdMatrix.m[3], - hmdMatrix.m[4], hmdMatrix.m[5], hmdMatrix.m[6], hmdMatrix.m[7], - hmdMatrix.m[8], hmdMatrix.m[9], hmdMatrix.m[10], hmdMatrix.m[11], - hmdMatrix.m[12], hmdMatrix.m[13], hmdMatrix.m[14], hmdMatrix.m[15]); - return mat; - } public static void convertMatrix4toQuat(Matrix4f in, Quaternion out) { // convert rotation matrix to quat diff --git a/jme3-vr/src/main/java/test/TestInitHmd.java b/jme3-vr/src/main/java/test/TestInitHmd.java new file mode 100644 index 0000000000..4869d4c11e --- /dev/null +++ b/jme3-vr/src/main/java/test/TestInitHmd.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2009-2018 jMonkeyEngine + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'jMonkeyEngine' nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package test; + +import com.jme3.app.VREnvironment; +import com.jme3.input.vr.openvr.OpenVR; +import com.jme3.system.AppSettings; + +/** + * Testing OpenVR environment. + * @author Rickard + */ +public class TestInitHmd { + + public static void main(String... args){ + testInitHmd(); + } + + public static void testInitHmd(){ + VREnvironment environment = new VREnvironment(new AppSettings(true)); + environment.initialize(); + OpenVR openVr = (OpenVR) environment.getVRHardware(); + System.out.println(openVr.getName()); + + openVr.updatePose(); + + openVr.destroy(); + + } +} \ No newline at end of file diff --git a/jme3-vr/src/main/resources/Common/ShaderLib/InstanceVR.glsllib b/jme3-vr/src/main/resources/Common/ShaderLib/InstanceVR.glsllib index 9294488af4..99629173f9 100644 --- a/jme3-vr/src/main/resources/Common/ShaderLib/InstanceVR.glsllib +++ b/jme3-vr/src/main/resources/Common/ShaderLib/InstanceVR.glsllib @@ -93,6 +93,7 @@ uniform mat4 g_WorldMatrix; uniform mat4 g_WorldViewMatrix; uniform mat4 g_WorldViewProjectionMatrix; uniform mat3 g_NormalMatrix; +uniform mat3 g_WorldNormalMatrix; vec4 TransformWorld(vec4 position) { @@ -118,4 +119,8 @@ vec3 TransformNormal(vec3 normal) { return g_NormalMatrix * normal; } -#endif +vec3 TransformWorldNormal(vec3 normal) { + return normalize(g_WorldNormalMatrix * normal); +} + +#endif \ No newline at end of file