casa::Galaxy Class Reference
Simple class to represent a Galaxy as a collection of Stars.
More...
#include <Galaxy.h>
List of all members.
Public Types |
enum | PLOT_MODE {
POSITION,
VELOCITY
} |
Public Member Functions |
| Galaxy (Vector< Double > &position, Vector< Double > &velocity, Double mass, Double size, uInt numStars, uInt numRings, Double inclination, Double positionAngle, Int xSize, Int ySize) |
| Constructor.
|
| ~Galaxy () |
| Destructor.
|
void | computeStep (List< void * > &galaxyList, Double timeStep, Double dampingFactor=1.0) |
| Compute a new position, applying the force of the Galaxies in the List but do not update current position and velocity.
|
void | update () |
| update position and velocity to new value
|
void | applyForceToStars (List< void * > &galaxyList, Double timeStep, Double dampingFactor) |
| Compute a new position for the Stars in this Galaxy.
|
void | rotate (Matrix< Double > &rotMatrix) |
| Rotate position and velocity.
|
void | draw (PixelCanvas *pixelCanvas) |
| Draw the Galaxy on the PixelCanvas.
|
Double | force (Double distance) |
| magnitude of the force for this galaxy
|
Double | getMass () |
| Return the Mass of the Galaxy.
|
Vector< Double > & | getPosition () |
| Return the position of the Galaxy.
|
Vector< Double > & | getVelocity () |
| Return the Velocity of the Galaxy.
|
void | setPlotMode (Galaxy::PLOT_MODE plotMode) |
| Set the plot mode.
|
void | setScale (Int xSize, Int ySize) |
Private Attributes |
Double | itsMass |
| The mass of the Galaxy.
|
Double | itsSize |
| its size
|
Vector< Double > | itsPosition |
| The position of the Galaxy.
|
Vector< Double > | itsVelocity |
| The velocity of the Galaxy.
|
Vector< Double > | newPosition |
| The new computed position of the Galaxy.
|
Vector< Double > | newVelocity |
| The new computed velocity of the Galaxy.
|
List< void * > | itsStarList |
| The list of Stars in this Galaxy.
|
ListIter< void * > * | itsStarListIter |
| and an iterator for this List
|
Vector< Int > | oldPosition |
Vector< Int > | itsOffset |
| Last offset applied to itsPosition.
|
Vector< Int > | itsPlotPosition |
| Last offset applied to itsPosition.
|
Int | itsXSize |
Int | itsYSize |
uInt | itsDrawList |
| Number of the draw list for the current PixelCanvas.
|
PixelCanvas * | itsPixelCanvas |
Galaxy::PLOT_MODE | plotMode |
Bool | changedPlotMode |
Detailed Description
Simple class to represent a Galaxy as a collection of Stars.
Definition at line 44 of file Galaxy.h.
Member Enumeration Documentation
- Enumerator:
-
Definition at line 48 of file Galaxy.h.
Constructor & Destructor Documentation
casa::Galaxy::Galaxy |
( |
Vector< Double > & |
position, |
|
|
Vector< Double > & |
velocity, |
|
|
Double |
mass, |
|
|
Double |
size, |
|
|
uInt |
numStars, |
|
|
uInt |
numRings, |
|
|
Double |
inclination, |
|
|
Double |
positionAngle, |
|
|
Int |
xSize, |
|
|
Int |
ySize | |
|
) |
| | |
casa::Galaxy::~Galaxy |
( |
|
) |
|
Member Function Documentation
void casa::Galaxy::applyForceToStars |
( |
List< void * > & |
galaxyList, |
|
|
Double |
timeStep, |
|
|
Double |
dampingFactor | |
|
) |
| | |
Compute a new position for the Stars in this Galaxy.
void casa::Galaxy::computeStep |
( |
List< void * > & |
galaxyList, |
|
|
Double |
timeStep, |
|
|
Double |
dampingFactor = 1.0 | |
|
) |
| | |
Compute a new position, applying the force of the Galaxies in the List but do not update current position and velocity.
Double casa::Galaxy::force |
( |
Double |
distance |
) |
|
magnitude of the force for this galaxy
Double casa::Galaxy::getMass |
( |
|
) |
|
Return the Mass of the Galaxy.
Vector<Double>& casa::Galaxy::getPosition |
( |
|
) |
|
Return the position of the Galaxy.
Vector<Double>& casa::Galaxy::getVelocity |
( |
|
) |
|
Return the Velocity of the Galaxy.
void casa::Galaxy::rotate |
( |
Matrix< Double > & |
rotMatrix |
) |
|
Rotate position and velocity.
void casa::Galaxy::setScale |
( |
Int |
xSize, |
|
|
Int |
ySize | |
|
) |
| | |
void casa::Galaxy::update |
( |
|
) |
|
update position and velocity to new value
Member Data Documentation
Last offset applied to itsPosition.
Definition at line 125 of file Galaxy.h.
Last offset applied to itsPosition.
Definition at line 127 of file Galaxy.h.
and an iterator for this List
Definition at line 121 of file Galaxy.h.
The documentation for this class was generated from the following file: