Advertisement

Volume of the clipped shapes

Started by August 03, 2013 12:48 PM
0 comments, last by Dirk Gregorius 11 years, 6 months ago

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.

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.

This topic is closed to new replies.

Advertisement