mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
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:
@@ -243,7 +243,7 @@ void RenderableGrid::update(const UpdateData&) {
|
||||
_varray[nr++] = { halfSize.x, y1, 0.f };
|
||||
}
|
||||
|
||||
setBoundingSphere(static_cast<double>(glm::length(halfSize)));
|
||||
setBoundingSphere(glm::length(glm::dvec2(halfSize)));
|
||||
|
||||
glBindVertexArray(_vaoID);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _vBufferID);
|
||||
|
||||
Reference in New Issue
Block a user