hermes.physics
Class InsideMassedCollider

java.lang.Object
  extended by hermes.Interactor<MassedBeing,MassedBeing>
      extended by hermes.physics.InsideMassedCollider

public class InsideMassedCollider
extends Interactor<MassedBeing,MassedBeing>

A Collider that keeps a being's bounding box contained inside of another by projection and impulse collision. If the smaller of the beings in the interaction travels hits the inside edge of the larger it will bounce back inside.

This is a multisampled interaction and it is not applied immediately. (See Interactor documentation.)


Constructor Summary
InsideMassedCollider()
           
 
Method Summary
 boolean detect(MassedBeing being1, MassedBeing being2)
          Determines whether an interaction between two objects has occurred.
 void handle(MassedBeing being1, MassedBeing being2)
          Handles the result of an interaction that has been detected (by detect return true) for a pair of objects.
 
Methods inherited from class hermes.Interactor
appliedImmediately, multisampled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsideMassedCollider

public InsideMassedCollider()
Method Detail

detect

public boolean detect(MassedBeing being1,
                      MassedBeing being2)
Description copied from class: Interactor
Determines whether an interaction between two objects has occurred.

Specified by:
detect in class Interactor<MassedBeing,MassedBeing>
Parameters:
being1 - the first interacting object
being2 - the second interacting object
Returns:
Whether or not an interaction has occurred.

handle

public void handle(MassedBeing being1,
                   MassedBeing being2)
Description copied from class: Interactor
Handles the result of an interaction that has been detected (by detect return true) for a pair of objects.

Specified by:
handle in class Interactor<MassedBeing,MassedBeing>
Parameters:
being1 - the first object
being2 - the second object