Skip to content

Commit

Permalink
BoxShapeSettings: re-order native methods
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Jun 28, 2024
1 parent 6deb4d1 commit 70ff744
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<jlong> (pResult);
}

/*
* Class: com_github_stephengold_joltjni_BoxShapeSettings
* Method: createBoxShape
Expand All @@ -57,3 +45,15 @@ JNIEXPORT jlong JNICALL Java_com_github_stephengold_joltjni_BoxShapeSettings_cre
}
return reinterpret_cast<jlong> (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<jlong> (pResult);
}

0 comments on commit 70ff744

Please sign in to comment.