• Advertisement
Sign in to follow this  

Volume of the clipped shapes

This topic is 1659 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Now i'm working on implementing buoyancy in my engine and having an issue with determining underwater volume for body collision shapes. I need to find volume of primitives such as sphere, capsule, cone and box clipped by a plane. I can't derive formulas myself so i'm looking for ready-made ones if they're even exsist. I tried google it first, but it doesn't provided me with satisfying results.

Thanks for help.

Edited by Agr

Share this post


Link to post
Share on other sites
Advertisement

DId you see Erin Catto's article in GPG 6? It comes with source code as well which can be downloaded from the Box2d site. From the shapes you mention capsules are pretty hard. You might consider to approximate this with a simple box.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement