net.jinx.physics.collision
Class CollisionTag

java.lang.Object
  extended by net.jinx.physics.collision.CollisionTag
All Implemented Interfaces:
Tag
Direct Known Subclasses:
SphereCollisionTag

public abstract class CollisionTag
extends java.lang.Object
implements Tag


Field Summary
static java.lang.String TAG_NAME
           
 
Constructor Summary
CollisionTag()
           
 
Method Summary
 float getCoefficient()
          Provides the coefficient of restitution.
static float getCoefficient(PhysicalObject obj)
           
 java.lang.String getName()
           
 void setCoefficient(float e)
          Sets the coefficient of restitution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
See Also:
Constant Field Values
Constructor Detail

CollisionTag

public CollisionTag()
Method Detail

getName

public final java.lang.String getName()
Specified by:
getName in interface Tag

getCoefficient

public float getCoefficient()
Provides the coefficient of restitution.

Returns:
a value from zero to one under normal circumstances, but this will never be less than zero. Zero indicates that in a collision, all energy of motion will be lost. One indicates that all energy of motion will be preserved. Numbers greater than zero indicate that collisions will increase the energy of motion (things bounce higher each time, like flubber).

setCoefficient

public void setCoefficient(float e)
Sets the coefficient of restitution.

Parameters:
e - the desired coefficient.
Throws:
java.lang.IllegalArgumentException - if e is less than zero.

getCoefficient

public static float getCoefficient(PhysicalObject obj)