Since last release of RigidParticle, I've been working on it's restructuring.
And now there's finally some new progress I can share with you.
These are major updates:
- Hit point detection has been moved to CollisionDetector. I think that makes more sense to me.
- Collision resolve of rigid body have been moved to a new class -- RigidCollisionResolver. And the collision resolve and rotation calculation has been completely rewrote. In last demo, The RigidParticle is just "looks like" a rigid body, but now, it is a real rigid body.
- RigidParticle has been removed. And there's 3 new classes -- RigidItem, RigidRectangle and RigidCircle -- taking its place. RigidItem is the root of all rigid bodies in this new framework, It provides common operations for all kinds of rigid bodies. RigidRectangle is just like the original RigidParticle, It simulates a rigid body in rectangle shape. RigidCircle is new, It simulates a circular rigid body. Maybe you think a circular object doesn't need to be a rigid body, You will see from this demo, a particle can never do that...
The new framework has weaknesses, rigid body can not interact with particles rightnow, and friction still has problems.
Press UP key to drop more objects.
source download
You may also find the source code at http://ape.googlecode.com/svn/branches/rigidape/
It's always up to date there.