Breakable convex decomposition demo (with source code)

Show what you made with Bullet Physics SDK: Games, Demos, Integrations with a graphics engine, modeler or any other application
Flix
Posts: 456
Joined: Tue Dec 25, 2007 1:06 pm

Breakable convex decomposition demo (with source code)

Post by Flix »

WHAT'S THIS?

This is just an extension to the Bullet Convex Decomposition Demo I made several months ago (probably half 2009), to add VERY BASIC support for breakable compound shapes.

Hope newbies will find it useful.

INSTALLATION

The attached compressed archive contains one redundant file (ConvexDecompositionDemo2.cpp).
The file "ConvexDecompositionDemo2.cpp" is just an optional replacement for "ConvexDecompositionDemo3.cpp" in case std::map in not available on some system (with some limitations: just one compound object is breakable).

So please don't add "ConvexDecompositionDemo2.cpp" and "ConvexDecompositionDemo3.cpp" together in your project!

NOTES

Each time a body comes out from a compound shape, the compound shape local inertia is recalculated. I found this can lead to a better behavior (and in some cases prevent possible crashes too).

Breakable compound shapes can be dynamic or static (in the demo one table is static, two other tables are dynamic and the tower is dynamic: drag them and see).
You do not have the required permissions to view the files attached to this post.
Flix
Posts: 456
Joined: Tue Dec 25, 2007 1:06 pm

Re: Breakable convex decomposition demo (with source code)

Post by Flix »

This is just an ugly image of the demo I posted:
ConvexDecompositionEx.JPG
Happy Xmas to everybody!
You do not have the required permissions to view the files attached to this post.
edl
Posts: 16
Joined: Tue Jul 08, 2008 7:28 am

Re: Breakable convex decomposition demo (with source code)

Post by edl »

:P i was searching how to do this tomorrow....then i you post it today...
you are so great!
:o