Add bounding spheres to a bunch of renderable types (#1957)

*  RenderabeDUMeshes (And reimplement reading of vertex info from speck, to make it easier to compute sphere. The plan is to phase out this renderable anyways)

* RenderablePoints

* Grids: RenderableGrid, RenderableBoxGrid, RenderableRadialGrid & RenderableSphericalGrid

* RenderableGalaxy
This commit is contained in:
Emma Broman
2022-03-28 16:10:56 +02:00
committed by GitHub
parent 303fd2bd24
commit 3c4f13c650
7 changed files with 98 additions and 44 deletions
@@ -243,6 +243,8 @@ void RenderableGrid::update(const UpdateData&) {
_varray[nr++] = { halfSize.x, y1, 0.f };
}
setBoundingSphere(static_cast<double>(glm::length(halfSize)));
glBindVertexArray(_vaoID);
glBindBuffer(GL_ARRAY_BUFFER, _vBufferID);
glBufferData(