about instructions to create a bounding volume from a mesh

Post Reply
strongLight
Posts: 2
Joined: Sun Oct 08, 2017 6:52 pm

about instructions to create a bounding volume from a mesh

Post by strongLight » Sun Oct 08, 2017 7:00 pm

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 ?

User avatar
drleviathan
Posts: 371
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

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

Post by drleviathan » Mon Oct 09, 2017 3:38 pm

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.

strongLight
Posts: 2
Joined: Sun Oct 08, 2017 6:52 pm

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

Post by strongLight » Mon Oct 09, 2017 6:36 pm

Thank you !

Post Reply