Assimp Hacks 2: Get the bounding boxes from your meshes
Nov 8, 2022
What is the problem?
After importing a model you want to get teh bounding boxes from your meshes. This is important for picking, rendering, partitioning or just for doing some basic frustum culling
How to solve it!
There is a post-processing step for that. After importing your model you can get an axis-aligned bounding box for each mesh for itself. Just try the following code:
#include <assimp/Importer.hpp>
::Assimp::Importer importer…