|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.physica.RigidBody
public class RigidBody
WRITEME: Document this type.
Constructor Summary | |
---|---|
RigidBody()
|
Method Summary | |
---|---|
static void |
collide(Collidable obj1,
Collidable obj2,
long timeIndex)
Collides two objects. |
static Vector2D[] |
conserveMomentum(Vector2D myVelocity,
Vector2D otherVelocity,
double myMass,
double otherMass,
double cor)
Velocity change equation for conserving momentum between two objects |
static Vector2D |
findComponent(Vector2D incident,
Vector2D normal)
Finds the vector component of the incident vector in the normal vector |
static Collection<Point2D> |
getCollisionPoints(GeneralPath path1,
GeneralPath path2)
|
static boolean |
hasCollision(GeneralPath path1,
GeneralPath path2)
Gets a set of all current collision points between two objects |
static Vector2D |
Reflect(Vector2D incident,
Vector2D normal)
Reflects a vector around a normal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RigidBody()
Method Detail |
---|
public static void collide(Collidable obj1, Collidable obj2, long timeIndex) throws GameLogicException
obj1
- First object in the collisionobj2
- Second object in the collisiontimeIndex
- Time index of the collision
GameLogicException
- WRITEMEpublic static final Vector2D[] conserveMomentum(Vector2D myVelocity, Vector2D otherVelocity, double myMass, double otherMass, double cor)
myVelocity
- Main object's velocityotherVelocity
- Other object's velocitymyMass
- Main object's massotherMass
- Other object's masscor
- Coefficient of Restitution
public static Vector2D findComponent(Vector2D incident, Vector2D normal)
incident
- Incident Vectornormal
- Normal Vector
public static Collection<Point2D> getCollisionPoints(GeneralPath path1, GeneralPath path2)
path1
- WRITEMEpath2
- WRITEME
public static boolean hasCollision(GeneralPath path1, GeneralPath path2)
path1
- Path of object one's collision boundariespath2
- Path of object two's collision boundaries
public static Vector2D Reflect(Vector2D incident, Vector2D normal)
incident
- Incident vectornormal
- Normal vector
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |