org.xith3d.physics.collision
Class CollisionResolver

java.lang.Object
  extended by org.xith3d.physics.collision.CollisionResolver
All Implemented Interfaces:
CollisionListener

public class CollisionResolver
extends java.lang.Object
implements CollisionListener

The CollisionResolver checks for collisions and forwards them to the SimulationWorld to resolve them.


Constructor Summary
CollisionResolver(Body[] bodies1, Body[] bodies2)
          Creates a new CollisionResolver.
CollisionResolver(Body body1, Body body2)
          Creates a new CollisionResolver.
CollisionResolver(Body body1, Body[] bodies2)
          Creates a new CollisionResolver.
CollisionResolver(Body body1, Collideable collideable2)
          Creates a new CollisionResolver.
CollisionResolver(Body body1, java.util.List<Body> bodies2)
          Creates a new CollisionResolver.
CollisionResolver(Collideable collideable1, Collideable collideable2)
          Creates a new CollisionResolver.
CollisionResolver(CollideableGroup collideableGroup)
          Creates a new collision match.
CollisionResolver(java.util.List<Body> bodies1, java.util.List<Body> bodies2)
          Creates a new CollisionResolver.
 
Method Summary
 boolean getIgnoreStatic()
           
 void onCollision(Collision collision)
          A collision has happened !
 void setIgnoreStaticCollisions(boolean ignoreStatic)
           
protected  void setManager(CollisionResolversManager manager)
           
 void update()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollisionResolver

public CollisionResolver(Body body1,
                         Body body2)
Creates a new CollisionResolver.

Parameters:
body1 - the first Body
body2 - the second Body

CollisionResolver

public CollisionResolver(Body body1,
                         java.util.List<Body> bodies2)
Creates a new CollisionResolver.

Parameters:
body1 - the first Body
bodies2 - the List of Bodies

CollisionResolver

public CollisionResolver(Body body1,
                         Body[] bodies2)
Creates a new CollisionResolver.

Parameters:
body1 - the first Body
bodies2 - the List of Bodies

CollisionResolver

public CollisionResolver(java.util.List<Body> bodies1,
                         java.util.List<Body> bodies2)
Creates a new CollisionResolver.

Parameters:
bodies1 - the first List of Bodies
bodies2 - the second List of Bodies

CollisionResolver

public CollisionResolver(Body[] bodies1,
                         Body[] bodies2)
Creates a new CollisionResolver.

Parameters:
bodies1 - the first List of Bodies
bodies2 - the second List of Bodies

CollisionResolver

public CollisionResolver(Body body1,
                         Collideable collideable2)
Creates a new CollisionResolver.

Parameters:
body1 - the first Body
collideable2 - the second Collideable

CollisionResolver

public CollisionResolver(Collideable collideable1,
                         Collideable collideable2)
Creates a new CollisionResolver.

Parameters:
collideable1 - the first Collideable
collideable2 - the second Collideable

CollisionResolver

public CollisionResolver(CollideableGroup collideableGroup)
Creates a new collision match.

Parameters:
collideableGroup - the CollideableGroup
Method Detail

setIgnoreStaticCollisions

public final void setIgnoreStaticCollisions(boolean ignoreStatic)

getIgnoreStatic

public final boolean getIgnoreStatic()

onCollision

public void onCollision(Collision collision)
A collision has happened !

Specified by:
onCollision in interface CollisionListener
Parameters:
collision - Information about this collision, say, contact position and normal, depth, geoms involved.

update

public void update()

setManager

protected void setManager(CollisionResolversManager manager)