Class SpaceObject

java.lang.Object
  extended bySpaceObject

public class SpaceObject
extends java.lang.Object

This class represents a space object i.e. a planet, moon or asteroid. Contains initial position, velocity and mass and a bunch other usefull parameters which I might need to either store or access during the project.


Constructor Summary
SpaceObject(PointN i, double m)
          Constructs a SolarObject which will hold inital and current information about this object.
 
Method Summary
 PointN getC()
          Method for accessing the current coordinates of this space object.
 boolean getDisplay()
          Method for accessing the boolean variable display.
 PointN getI()
          Method for accessing the initial conditions of this space object.
 double getM()
          Method for accessing the mass of this space object.
 int getTime()
          Method to get the number of calculated time steps so far.
 void plusOneTime()
          Method for increasing the stored time steps by one time step.
 void setC(PointN c)
          Method for updating the current coordinates of this space object.
 void setDisplay(boolean b)
          Method for setting the boolean variable display.
 void setM(double m)
          Method for updating the mass of this space object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpaceObject

public SpaceObject(PointN i,
                   double m)
Constructs a SolarObject which will hold inital and current information about this object.

Parameters:
i - the initial conditions. i.e. Positions and velocities in cartesian coordinates.
m - the mass of the object.
Method Detail

getDisplay

public boolean getDisplay()
Method for accessing the boolean variable display. A value of TRUE means that the trajectory of the object is displayed.

Returns:
boolean representing the status of the display boolean in this object.

setDisplay

public void setDisplay(boolean b)
Method for setting the boolean variable display. A value of TRUE means that the trajectory of the object is displayed.

Parameters:
b - boolean representing the status of the display boolean in this object.

getI

public PointN getI()
Method for accessing the initial conditions of this space object.

Returns:
PointN holding the initial conditions of this object.

getC

public PointN getC()
Method for accessing the current coordinates of this space object.

Returns:
PointN holding the current coordinates and velocities.

getM

public double getM()
Method for accessing the mass of this space object.

Returns:
double.

setM

public void setM(double m)
Method for updating the mass of this space object.

Parameters:
m - double the new mass of the space object.

setC

public void setC(PointN c)
Method for updating the current coordinates of this space object.

Parameters:
c - PointN holding the current coordinates and velocities.

plusOneTime

public void plusOneTime()
Method for increasing the stored time steps by one time step.


getTime

public int getTime()
Method to get the number of calculated time steps so far.

Returns:
int.