Jolt JNI double precision coordinates

@sgold looking through Jolt JNI’s position-related code, it appears that only 32-bit floats are supported right now. I see that Jolt supports 64-bit positions, and that the Jolt JNI builds you provide are available in double-precision variants (which I’m using). Do you have plans to support 64-bit coordinates on the Java side? These would be extremely useful for large worlds, as they would allow avoiding zone splitting and origin shifting techniques.

2 Likes

Jolt-jni has supported 64-bit locations since July. All its Java libraries since v0.1.10 support both 32-bit and 64-bit locations.

The support is most visible in the RVec3 class, which is used to represent locations. Each component is stored as a double, and the getX()/getY()/getZ() methods round off the returned values if Jolt.isDoublePrecision() returns false.

1 Like

Whoops! My bad - now that you mention that, I had seen it before. I got thrown off by interpreting RVec3 as “reference to Vec3” (thinking C++ references) so I didn’t realize that it was a separate vector type with double precision components. Thank you!

1 Like

When you get a moment, please upgrade to jolt-jni v0.9.3

2 Likes

Done. Will let you know if I hit any issues.

1 Like

In this context, “R” stands for Real, a Jolt datatype that is double in double-precision builds and float in single-precision builds.

Someday there will be a tutorial that explains these sorts of things …

2 Likes