|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jinx.physics.collision.SphereCollisionDetector
public class SphereCollisionDetector
| Constructor Summary | |
|---|---|
SphereCollisionDetector()
|
|
| Method Summary | |
|---|---|
void |
added(PhysicalObject obj)
Called by Universe to notify that a PhysicalObject has been added to the simulation. |
Contact |
firstContact(PhysicalObject o1,
PhysicalObject o2,
float initial,
float deltaTime,
Universe u)
|
java.util.Set |
firstContacts(PhysicalObject obj,
float initial,
float deltaTime,
Universe u)
Checks for collisions between PhysicalObject instances previously added via the added(PhysicalObject) method and obj. |
static float |
getRadius(PhysicalObject obj)
Provides the radius of a PhysicalObject that's been tagged as a sphere for collision detection purposes. |
static boolean |
isSphere(PhysicalObject obj)
|
void |
removed(PhysicalObject obj)
Called by Universe to notify that a PhysicalObject has been removed from the simulation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SphereCollisionDetector()
| Method Detail |
|---|
public static boolean isSphere(PhysicalObject obj)
public static float getRadius(PhysicalObject obj)
obj - the PhysicalObject.
java.lang.IllegalArgumentException - if sphere isn't tagged with a
SphereCollisionTag.public void added(PhysicalObject obj)
CollisionDetector
added in interface CollisionDetectorobj - the PhysicalObject that was added.public void removed(PhysicalObject obj)
CollisionDetector
removed in interface CollisionDetectorobj - the PhysicalObject that was removed.
public java.util.Set firstContacts(PhysicalObject obj,
float initial,
float deltaTime,
Universe u)
CollisionDetector
firstContacts in interface CollisionDetectorobj - the object that collisions are being detected for.u - the Universe that collisions are being detected in.
public Contact firstContact(PhysicalObject o1,
PhysicalObject o2,
float initial,
float deltaTime,
Universe u)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||