Package jsim.collision
Class NarrowPhase
java.lang.Object
jsim.collision.NarrowPhase
Generates
ContactPoints from broadphase candidate pairs.
Supported shape pairs: Sphere-Sphere, Sphere-Plane, Box-Plane, Box-Sphere, Box-Box. Each test emits at most one contact (box-box emits the deepest corner contact).
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidgenerateContacts(List<CollisionPair> pairs, List<ContactPoint> contacts) Populatecontactsfrom eachCollisionPair.
-
Method Details
-
generateContacts
Populatecontactsfrom eachCollisionPair. Existing entries are cleared first. Only overlapping contacts (penetration > 0) are added.- Parameters:
pairs- broadphase candidate pairs to testcontacts- output list to populate (cleared before adding new contacts)
-