I have a data structure for convex polyhedrons containing a set of planes, a set of points and a set of polygons with indices to the points for representing level geometry. When the points are no longer planar enough from 64-bit rounding errors, I regenerate the polygons from the plane equation by creating a convex polyhedron from the bounding box and cutting it with each surface plane.
But now I want to save the shapes into a file without redundancy for maximum version compatibility so that there will be only by a set of planes for each convex polyhedron.
Is there an efficient algorithm to get a bounding box from only a set of surface planes defining the convex polyhedron?
It may include more volume than actually used but not so much that it loses significant precision for the polygons.
Plan B is to generate the shape twice starting with an insanely large box and then redo using the given points but that is a waste of computations.
Plan C is to just save the whole level's bounding box in the file but that is not a clean format.