Fix problems with precision of new bounding spheres

glm::length => squared computation => we need the double precision in the computation. Got bounding sphere values of "inf" for a few large renderables (the DU grids)...
This commit is contained in:
Emma Broman
2022-03-28 19:53:14 +02:00
parent 3c4f13c650
commit f7d3d3bad1
3 changed files with 3 additions and 3 deletions
@@ -235,7 +235,7 @@ void RenderableBoxGrid::update(const UpdateData&) {
_varray.push_back({ v7.x, v7.y, v7.z });
_varray.push_back({ v3.x, v3.y, v3.z });
setBoundingSphere(static_cast<double>(glm::length(urb)));
setBoundingSphere(glm::length(glm::dvec3(urb)));
glBindVertexArray(_vaoID);
glBindBuffer(GL_ARRAY_BUFFER, _vBufferID);