com.bulletphysics.collision.narrowphase
Class PersistentManifold
java.lang.Object
com.bulletphysics.collision.narrowphase.PersistentManifold
public class PersistentManifold
- extends java.lang.Object
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping in the broadphase.
Those contact points are created by the collision narrow phase.
The cache can be empty, or hold 1,2,3 or 4 points. Some collision algorithms (GJK) might only add one point at a time.
updates/refreshes old contact points, and throw them away if necessary (distance becomes too large)
reduces the cache to 4 points, when more then 4 points are added, using following rules:
the contact point with deepest penetration is always kept, and it tries to maximuze the area covered by the points
note that some pairs of objects might have more then one contact manifold.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MANIFOLD_CACHE_SIZE
public static final int MANIFOLD_CACHE_SIZE
- See Also:
- Constant Field Values
index1a
public int index1a
PersistentManifold
public PersistentManifold()
PersistentManifold
public PersistentManifold(java.lang.Object body0,
java.lang.Object body1,
int bla)
init
public void init(java.lang.Object body0,
java.lang.Object body1,
int bla)
getBody0
public java.lang.Object getBody0()
getBody1
public java.lang.Object getBody1()
setBodies
public void setBodies(java.lang.Object body0,
java.lang.Object body1)
clearUserCache
public void clearUserCache(ManifoldPoint pt)
getNumContacts
public int getNumContacts()
getContactPoint
public ManifoldPoint getContactPoint(int index)
getContactBreakingThreshold
public float getContactBreakingThreshold()
getCacheEntry
public int getCacheEntry(ManifoldPoint newPoint)
addManifoldPoint
public int addManifoldPoint(ManifoldPoint newPoint)
removeContactPoint
public void removeContactPoint(int index)
replaceContactPoint
public void replaceContactPoint(ManifoldPoint newPoint,
int insertIndex)
refreshContactPoints
public void refreshContactPoints(Transform trA,
Transform trB)
clearManifold
public void clearManifold()