apps.realgravity
Class Universe

java.lang.Object
  extended by apps.realgravity.Universe

public class Universe
extends java.lang.Object

The Class Universe.


Field Summary
static double G
          The g.
 
Constructor Summary
Universe()
           
 
Method Summary
 void add(MassEntity p)
          Adds the.
 void cullFarAway(double viewableUniverseWidth)
          Cull far away.
 int getEntityCount()
          Gets the entity count.
static double getForce(MassEntity e, MassEntity x)
          Gets the force.
 void render(java.awt.Graphics2D g2d, int screenWidth, int screenHeight, double metersPerPixel)
          Render.
 void updateMotion(double elapsedTime)
          Update motion.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

G

public static double G
The g.

Constructor Detail

Universe

public Universe()
Method Detail

getForce

public static double getForce(MassEntity e,
                              MassEntity x)
Gets the force.

Parameters:
e - the e
x - the x
Returns:
the force

add

public void add(MassEntity p)
Adds the.

Parameters:
p - the p

cullFarAway

public void cullFarAway(double viewableUniverseWidth)
Cull far away.

Parameters:
viewableUniverseWidth - the viewable universe width

getEntityCount

public int getEntityCount()
Gets the entity count.

Returns:
the entity count

render

public void render(java.awt.Graphics2D g2d,
                   int screenWidth,
                   int screenHeight,
                   double metersPerPixel)
Render.

Parameters:
g2d - the g2d
screenWidth - the screen width
screenHeight - the screen height
metersPerPixel - the meters per pixel

updateMotion

public void updateMotion(double elapsedTime)
Update motion.

Parameters:
elapsedTime - the elapsed time