Physics Simulation Forum
http://bulletphysics.org/Bullet/phpBB3/

Breakable convex decomposition demo (with source code)
http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=17&t=4498
Page 1 of 1

Author:  Flix [ Thu Dec 24, 2009 12:54 pm ]
Post subject:  Breakable convex decomposition demo (with source code)

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).

Attachments:
ConvexDecompositionDemoEx.7z [245.08 KiB]
Downloaded 283 times

Author:  Flix [ Thu Dec 24, 2009 12:58 pm ]
Post subject:  Re: Breakable convex decomposition demo (with source code)

This is just an ugly image of the demo I posted:

Attachment:
ConvexDecompositionEx.JPG
ConvexDecompositionEx.JPG [ 22.91 KiB | Viewed 1180 times ]


Happy Xmas to everybody!

Author:  edl [ Fri Dec 25, 2009 3:38 am ]
Post subject:  Re: Breakable convex decomposition demo (with source code)

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

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/