hermes
Class Collider<A extends Being,B extends Being>

java.lang.Object
  extended by hermes.Interactor<A,B>
      extended by hermes.Collider<A,B>

public abstract class Collider<A extends Being,B extends Being>
extends Interactor<A,B>

An Interactor that detects collisions between Beings based on their shape. A collision will be detected if the HShapes of the Beings overlap. Implementation of handle() (which gets called if a collision is detected) is left to the child class.


Constructor Summary
Collider()
           
 
Method Summary
 boolean detect(A being1, B being2)
          Determines whether an interaction between two objects has occurred.
 
Methods inherited from class hermes.Interactor
appliedImmediately, handle, multisampled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Collider

public Collider()
Method Detail

detect

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

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