From 70ff74430aff529ad7714c41616e5fadf6539ab8 Mon Sep 17 00:00:00 2001 From: stephengold Date: Fri, 28 Jun 2024 13:56:09 -0700 Subject: [PATCH] BoxShapeSettings: re-order native methods --- .../stephengold/joltjni/BoxShapeSettings.java | 4 ++-- ...b_stephengold_joltjni_BoxShapeSettings.cpp | 24 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/github/stephengold/joltjni/BoxShapeSettings.java b/src/main/java/com/github/stephengold/joltjni/BoxShapeSettings.java index 7b363254..d2e2fd37 100644 --- a/src/main/java/com/github/stephengold/joltjni/BoxShapeSettings.java +++ b/src/main/java/com/github/stephengold/joltjni/BoxShapeSettings.java @@ -62,8 +62,8 @@ public Shape createShape() { // ************************************************************************* // native private methods + native private static long createBoxShape(long settingsVa); + native private static long createBoxShapeSettings( float xHalfExtent, float yHalfExtent, float zHalfExtent); - - native private static long createBoxShape(long settingsVa); } diff --git a/src/main/native/glue/com_github_stephengold_joltjni_BoxShapeSettings.cpp b/src/main/native/glue/com_github_stephengold_joltjni_BoxShapeSettings.cpp index 29a5bc6a..d2d8235b 100644 --- a/src/main/native/glue/com_github_stephengold_joltjni_BoxShapeSettings.cpp +++ b/src/main/native/glue/com_github_stephengold_joltjni_BoxShapeSettings.cpp @@ -29,18 +29,6 @@ SOFTWARE. using namespace JPH; -/* - * Class: com_github_stephengold_joltjni_BoxShapeSettings - * Method: createBoxShapeSettings - * Signature: (FFF)J - */ -JNIEXPORT jlong JNICALL Java_com_github_stephengold_joltjni_BoxShapeSettings_createBoxShapeSettings - (JNIEnv *, jclass, jfloat xHalfExtent, jfloat yHalfExtent, jfloat zHalfExtent) { - Vec3 halfExtents(xHalfExtent, yHalfExtent, zHalfExtent); - BoxShapeSettings * const pResult = new BoxShapeSettings(halfExtents); - return reinterpret_cast (pResult); -} - /* * Class: com_github_stephengold_joltjni_BoxShapeSettings * Method: createBoxShape @@ -57,3 +45,15 @@ JNIEXPORT jlong JNICALL Java_com_github_stephengold_joltjni_BoxShapeSettings_cre } return reinterpret_cast (pShape); } + +/* + * Class: com_github_stephengold_joltjni_BoxShapeSettings + * Method: createBoxShapeSettings + * Signature: (FFF)J + */ +JNIEXPORT jlong JNICALL Java_com_github_stephengold_joltjni_BoxShapeSettings_createBoxShapeSettings + (JNIEnv *, jclass, jfloat xHalfExtent, jfloat yHalfExtent, jfloat zHalfExtent) { + Vec3 halfExtents(xHalfExtent, yHalfExtent, zHalfExtent); + BoxShapeSettings * const pResult = new BoxShapeSettings(halfExtents); + return reinterpret_cast (pResult); +}