Simple class which represents a star as a point mass. More...
#include <Galaxy.h>
Public Member Functions | |
| Star (Vector< Double > &position, Vector< Double > &velocity, Int xSize, Int ySize) | |
| Constructor. | |
| ~Star () | |
| Destructor. | |
| void | draw (PixelCanvas *pixelCanvas) |
| Draw the current position on the PixelCanvas. | |
| void | applyForce (List< void * > &galaxyList, Double timeStep, Double dampingFactor) |
| Compute new position by applying the forces of the Galaxies in the List. | |
| void | rotate (Matrix< Double > &rotMatrix) |
| Rotate position and velocity. | |
| void | setPlotMode (Galaxy::PLOT_MODE newPlotMode) |
| Set the plot mode. | |
| void | setScale (Int xSize, Int ySize) |
Private Attributes | |
| Vector< Double > | itsPosition |
| Position of the Star. | |
| Vector< Int > | oldPosition |
| The last drawn position of the Star. | |
| Vector< Int > | itsOffset |
| Last offset applied to itsPosition. | |
| Vector< Int > | itsPlotPosition |
| Last offset applied to itsPosition. | |
| Vector< Double > | itsVelocity |
| Velocity of the Star. | |
| Int | itsXSize |
| Int | itsYSize |
| uInt | itsDrawList |
| Number of the draw list for the current PixelCanvas. | |
| PixelCanvas * | itsPixelCanvas |
| Temp to check if we are drawing on a new PixelCanvas. | |
| Galaxy::PLOT_MODE | plotMode |
| Bool | changedPlotMode |
Simple class which represents a star as a point mass.
Definition at line 146 of file Galaxy.h.
| casa::Star::Star | ( | Vector< Double > & | position, | |
| Vector< Double > & | velocity, | |||
| Int | xSize, | |||
| Int | ySize | |||
| ) |
Constructor.
| casa::Star::~Star | ( | ) |
Destructor.
| void casa::Star::applyForce | ( | List< void * > & | galaxyList, | |
| Double | timeStep, | |||
| Double | dampingFactor | |||
| ) |
Compute new position by applying the forces of the Galaxies in the List.
| void casa::Star::draw | ( | PixelCanvas * | pixelCanvas | ) |
Draw the current position on the PixelCanvas.
| void casa::Star::rotate | ( | Matrix< Double > & | rotMatrix | ) |
Rotate position and velocity.
| void casa::Star::setPlotMode | ( | Galaxy::PLOT_MODE | newPlotMode | ) |
Set the plot mode.
| void casa::Star::setScale | ( | Int | xSize, | |
| Int | ySize | |||
| ) |
Bool casa::Star::changedPlotMode [private] |
uInt casa::Star::itsDrawList [private] |
Number of the draw list for the current PixelCanvas.
Vector<Int> casa::Star::itsOffset [private] |
PixelCanvas* casa::Star::itsPixelCanvas [private] |
Temp to check if we are drawing on a new PixelCanvas.
Vector<Int> casa::Star::itsPlotPosition [private] |
Vector<Double> casa::Star::itsPosition [private] |
Vector<Double> casa::Star::itsVelocity [private] |
Int casa::Star::itsXSize [private] |
Int casa::Star::itsYSize [private] |
Vector<Int> casa::Star::oldPosition [private] |
Galaxy::PLOT_MODE casa::Star::plotMode [private] |
1.6.1