gltfio: Move the API for recomputeBoundingBoxes.
Prior to this change, `recomputeBoundingBoxes` was an opt-in config parameter in ResourceLoader. It is now a method on FilamentInstance. The old API did not work for dynamically created instances. Since this is a relatively obscure feature, we considered removing it completely, especially since the computation requires the presence of CPU-side vertex data combined with the transform hierarchy. Instead of removing the feature, we decided to move it to a better place. This paves the way for some upcoming improvements, which include reducing the memory footprint for assets. It also improves overall code organization and separation of concerns.
This commit is contained in:
@@ -36,11 +36,9 @@ static void destroy(void*, size_t, void *userData) {
|
||||
|
||||
extern "C" JNIEXPORT jlong JNICALL
|
||||
Java_com_google_android_filament_gltfio_ResourceLoader_nCreateResourceLoader(JNIEnv*, jclass,
|
||||
jlong nativeEngine, jboolean normalizeSkinningWeights, jboolean recomputeBoundingBoxes,
|
||||
jboolean ignoreBindTransform) {
|
||||
jlong nativeEngine, jboolean normalizeSkinningWeights) {
|
||||
Engine* engine = (Engine*) nativeEngine;
|
||||
return (jlong) new ResourceLoader({ engine, {}, (bool) normalizeSkinningWeights,
|
||||
(bool) recomputeBoundingBoxes, (bool) ignoreBindTransform});
|
||||
return (jlong) new ResourceLoader({ engine, {}, (bool) normalizeSkinningWeights});
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
|
||||
Reference in New Issue
Block a user