cs5643.rigidbody
Class CollisionProcessor

java.lang.Object
  extended by cs5643.rigidbody.CollisionProcessor

public class CollisionProcessor
extends java.lang.Object

Class to detect and resolve collisions (e.g., using penalty forces) between rigid bodies. Implement both broad and narrow phase checks here.


Constructor Summary
CollisionProcessor(java.util.Set<RigidBody> bodies)
          Index bodies, and BUILD YOUR FAVORITE DATA STRUCTURES!
 
Method Summary
(package private)  void broadPhase()
          Insert your implementation here of whatever broad phase test you choose.
(package private)  void narrowPhase()
          Insert your implementation of narrow phase collision detection and penalty force response here.
(package private)  void processBodyPair(BodyPair pair)
          Narrow phase BodyPair collision resolution.
 void processCollisions()
          Performs broad and narrow phase collision detection, and applies penalty forces at contacts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollisionProcessor

CollisionProcessor(java.util.Set<RigidBody> bodies)
Index bodies, and BUILD YOUR FAVORITE DATA STRUCTURES!

Method Detail

processCollisions

public void processCollisions()
Performs broad and narrow phase collision detection, and applies penalty forces at contacts.


broadPhase

void broadPhase()
Insert your implementation here of whatever broad phase test you choose.


narrowPhase

void narrowPhase()
Insert your implementation of narrow phase collision detection and penalty force response here.


processBodyPair

void processBodyPair(BodyPair pair)
Narrow phase BodyPair collision resolution. You'll want to borrow ideas from this function for your narrow phase code.