Page 1 of 1

about instructions to create a bounding volume from a mesh

Posted: Sun Oct 08, 2017 7:00 pm
by strongLight
Hello !
With which instruction can we create, for example, a bounding box by passing as a parameter the vertices of a mesh ?
I really don't manage to find it.
Can you help me ?

Re: about instructions to create a bounding volume from a me

Posted: Mon Oct 09, 2017 3:38 pm
by drleviathan
The btAABB class, (AABB = Axis Aligned Bounding Box) has a method: btAABB::merge_point(btVector3) which will grow the bounding box to contain the point. You should be able to create a btAABB instance then loop over all the points and merge each one.

Re: about instructions to create a bounding volume from a me

Posted: Mon Oct 09, 2017 6:36 pm
by strongLight
Thank you !