/** * Compute the bounding box of the given {@link GltfModel}. The result * will be an array <code>[minX, minY, minZ, maxX, maxY, maxZ]</code>. * * @param gltfModel The {@link GltfModel} * @return The bounding box */ public static float[] computeBoundingBoxMinMax(GltfModel gltfModel) { Objects.requireNonNull(gltfModel, "The gltfModel may not be null"); BoundingBoxComputer boundingBoxComputer = new BoundingBoxComputer(gltfModel); BoundingBox boundingBox = boundingBoxComputer.compute(); float result[] = { boundingBox.getMinX(), boundingBox.getMinY(), boundingBox.getMinZ(), boundingBox.getMaxX(), boundingBox.getMaxY(), boundingBox.getMaxZ() }; return result; }