ADD: Bounding, Some error

This commit is contained in:
2025-11-18 13:53:02 +09:00
parent 94ba704f99
commit 6e0e86b683
9 changed files with 204 additions and 423 deletions

View File

@@ -592,12 +592,14 @@ std::optional<std::shared_ptr<LoadedGLTF> > loadGltf(VulkanEngine *engine, std::
newSurface.bounds.origin = (maxpos + minpos) / 2.f;
newSurface.bounds.extents = (maxpos - minpos) / 2.f;
newSurface.bounds.sphereRadius = glm::length(newSurface.bounds.extents);
newSurface.bounds.type = BoundsType::Box;
}
else
{
newSurface.bounds.origin = glm::vec3(0.0f);
newSurface.bounds.extents = glm::vec3(0.5f);
newSurface.bounds.sphereRadius = glm::length(newSurface.bounds.extents);
newSurface.bounds.type = BoundsType::Box;
}
newmesh->surfaces.push_back(newSurface);
}