|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsim.physics2D.util.PhysicalObjectPair
sim.physics2D.collisionDetection.CollisionPair
public class CollisionPair
CollisionPair represents a pair of objects that are currently colliding
Field Summary |
---|
Fields inherited from class sim.physics2D.util.PhysicalObjectPair |
---|
c1, c2, hashcode |
Constructor Summary | |
---|---|
CollisionPair(PhysicalObject2D c1,
PhysicalObject2D c2)
|
Method Summary | |
---|---|
void |
clear()
|
Double2D |
getColPoint1()
Returns a vector pointing from the center of object 1 to the collision point |
Double2D |
getColPoint2()
Returns a vector pointing from the center of object 2 to the collision point |
Double2D |
getNormal()
Returns the collision normal. |
double |
getRelativeVelocity()
Returns the relative velocity of the objects along the collision normal |
boolean |
getSticky()
Returns a value indicated whether this is a sticky collision or not. |
void |
setSticky()
Indicates that this collision should be perfectly inelastic (so the objects lose all energy along the collision normal). |
Methods inherited from class sim.physics2D.util.PhysicalObjectPair |
---|
equals, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollisionPair(PhysicalObject2D c1, PhysicalObject2D c2)
Method Detail |
---|
public Double2D getColPoint1()
public Double2D getColPoint2()
public Double2D getNormal()
public double getRelativeVelocity()
public void setSticky()
public boolean getSticky()
public void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |