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 »

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: 849
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 »

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 »

Thank you !
Post Reply