This patch adds a new function to librt to calculate the bounding box for a struct rt_db_internal. Currently the function only works with primitives but I am working to improve it so it works with groups and combinations. Therefore it exits gracefully if it encounters a region/comb as of now. Moreover the missing primitives are printed out along with a warning from rt_gettrees() and a error message, so the user has some indication that a region/comb was passed. The functions resides in bbox.c with declaration in raytrace.h. It was tested with some of the primitives and regions in the sample databases such as galileo.g, shuttle.g and castle.g.
Log in to post a comment.