refactoring

This commit is contained in:
Nick Fisher
2025-03-19 12:27:13 +08:00
parent d5bffd5ad2
commit 627447f8b0
65 changed files with 2304 additions and 3005 deletions

View File

@@ -67,8 +67,8 @@ extern "C"
return;
}
auto center = aabb.center();
auto halfExtent = aabb.extent();
auto center = filament::math::float3 { boundingBox.centerX, boundingBox.centerY, boundingBox.centerZ };
auto halfExtent = filament::math::float3 { boundingBox.halfExtentX, boundingBox.halfExtentY, boundingBox.halfExtentZ };
auto maxExtent = max(halfExtent) * 2;
auto scaleFactor = 2.0f / maxExtent;
auto transform = math::mat4f::scaling(scaleFactor) * math::mat4f::translation(-center);