apps.realgravity
Class MassEntity

java.lang.Object
  extended by apps.realgravity.MassEntity
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class MassEntity
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

The Class MassEntity.

See Also:
Serialized Form

Field Summary
static MassEntity EARTH
          The Constant EARTH.
static MassEntity JUPITER
          The Constant JUPITER.
static MassEntity LUNA
          The Constant LUNA.
static MassEntity MARS
          The Constant MARS.
static MassEntity MERCURY
          The Constant MERCURY.
static MassEntity NEPTUNE
          The Constant NEPTUNE.
static MassEntity PLUTO
          The Constant PLUTO.
static MassEntity SATURN
          The Constant SATURN.
static MassEntity SUN
          The Constant SUN.
static MassEntity URANUS
          The Constant URANUS.
static MassEntity VENUS
          The Constant VENUS.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 double getMass()
          Gets the mass.
 java.lang.String getName()
          Gets the name.
 java.awt.geom.Point2D.Double getPos()
          Gets the pos.
 double getRadius()
          Gets the radius.
 java.awt.geom.Point2D.Double getVel()
          Gets the vel.
 void render(java.awt.Graphics2D g2d, int xOffset, int yOffset, double metersPerPixel)
          Render.
 void setName(java.lang.String name)
          Sets the name.
 void setPos(java.awt.geom.Point2D.Double pos)
          Sets the pos.
 void setRadius(double r)
          Sets the radius.
 void setVel(java.awt.geom.Point2D.Double vel)
          Sets the vel.
 double surfaceGravity()
          Surface gravity.
 double surfaceWeight(double otherMass)
          Surface weight.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EARTH

public static final MassEntity EARTH
The Constant EARTH.


JUPITER

public static final MassEntity JUPITER
The Constant JUPITER.


LUNA

public static final MassEntity LUNA
The Constant LUNA.


MARS

public static final MassEntity MARS
The Constant MARS.


MERCURY

public static final MassEntity MERCURY
The Constant MERCURY.


NEPTUNE

public static final MassEntity NEPTUNE
The Constant NEPTUNE.


PLUTO

public static final MassEntity PLUTO
The Constant PLUTO.


SATURN

public static final MassEntity SATURN
The Constant SATURN.


SUN

public static final MassEntity SUN
The Constant SUN.


URANUS

public static final MassEntity URANUS
The Constant URANUS.


VENUS

public static final MassEntity VENUS
The Constant VENUS.

Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getMass

public double getMass()
Gets the mass.

Returns:
the mass

getName

public java.lang.String getName()
Gets the name.

Returns:
the name

getPos

public java.awt.geom.Point2D.Double getPos()
Gets the pos.

Returns:
the pos

getRadius

public double getRadius()
Gets the radius.

Returns:
the radius

getVel

public java.awt.geom.Point2D.Double getVel()
Gets the vel.

Returns:
the vel

render

public void render(java.awt.Graphics2D g2d,
                   int xOffset,
                   int yOffset,
                   double metersPerPixel)
Render.

Parameters:
g2d - the g2d
xOffset - the x offset
yOffset - the y offset
metersPerPixel - the meters per pixel

setName

public void setName(java.lang.String name)
Sets the name.

Parameters:
name - the new name

setPos

public void setPos(java.awt.geom.Point2D.Double pos)
Sets the pos.

Parameters:
pos - the new pos

setRadius

public void setRadius(double r)
Sets the radius.

Parameters:
r - the new radius

setVel

public void setVel(java.awt.geom.Point2D.Double vel)
Sets the vel.

Parameters:
vel - the new vel

surfaceGravity

public double surfaceGravity()
Surface gravity.

Returns:
the double

surfaceWeight

public double surfaceWeight(double otherMass)
Surface weight.

Parameters:
otherMass - the other mass
Returns:
the double

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object