Volume calculation and clipping

Thrakbad

23-02-2010 19:07:08

Is there a way to clip a Shape against a plane and then calculate the volume of the resulting shape? The plane is infinite with Normal (0, 1, 0), I don't need to clip against other planes if that helps somehow.

Also is there a way at all to get the volume of a shape? I looked through the PhysX SDK and nothing seemed to look right.

betajaen

23-02-2010 21:17:18

If it would be it would be in the NxUtilLib.h header - I quickly looked and probably not.

You may have to work it out by hand, which is going to be a big pain. :?

Thrakbad

24-02-2010 23:12:45

Thanks, I manged to implement this quite easily now using an adapted version of Erin Catto's algorhithm from “Exact Buoyancy for Polyhedra”, published in Game Programming Gems 6.