Re: [Algorithms] N-body processing
Brought to you by:
vexxed72
From: David B. <db...@bt...> - 2000-08-19 00:12:32
|
> Now, my concern is this: how do I track the possible colliding pairs? How do > I store them? How do I handle them? For the moment Adam seems to be the only > one who actually understood the problem: that's why he introduced the sparse > matrices. I just use a hash table, and a simple modulus hash key(with the polyhedra indexes), no performance problems with this and very easy to implement(especially when you use STL:-). Objects are stored in an unsorted linked list off each hash entry. I don't use the pair table for anything other than caching closest feature pairs to improve performance. When you actually detect that there has been a collision, i.e. the closest distance algo returns something smaller than your epsilon. You need to look at the features(verts, edges or faces) surrounding the closest points and determine if they are as close to each other as the closest points. This is determining the contact manifold, which can be two points, point and edge, edge and edge, point and face or face and face. The contact manifold is then used to determine the collision response. David http://www.dblack.btinternet.co.uk ICQ #: 24402391 Mobile: (UK) 0778 7836188 |