28 #ifndef TRIALDISPLAY_GALAXY_H
29 #define TRIALDISPLAY_GALAXY_H
casacore::Vector< casacore::Int > itsOffset
Last offset applied to itsPosition.
void applyForce(std::list< void * > &galaxyList, casacore::Double timeStep, casacore::Double dampingFactor)
Compute new position by applying the forces of the Galaxies in the List.
PixelCanvas * itsPixelCanvas
Simple class which represents a star as a point mass.
casacore::Vector< casacore::Double > & getVelocity()
Return the Velocity of the Galaxy.
casacore::Double force(casacore::Double distance)
magnitude of the force for this galaxy
Simple class to represent a Galaxy as a collection of Stars.
casacore::Double itsSize
its size
Galaxy::PLOT_MODE plotMode
void setScale(casacore::Int xSize, casacore::Int ySize)
Galaxy::PLOT_MODE plotMode
casacore::uInt itsDrawList
Number of the draw list for the current PixelCanvas.
void update()
update position and velocity to new value
void setPlotMode(Galaxy::PLOT_MODE newPlotMode)
Set the plot mode.
casacore::Vector< casacore::Int > itsPlotPosition
Last offset applied to itsPosition.
std::list< void * > itsStarList
The list of Stars in this Galaxy.
casacore::Vector< casacore::Double > itsVelocity
The velocity of the Galaxy.
void rotate(casacore::Matrix< casacore::Double > &rotMatrix)
Rotate position and velocity.
casacore::Vector< casacore::Double > itsVelocity
Velocity of the Star.
void computeStep(std::list< void * > &galaxyList, casacore::Double timeStep, casacore::Double dampingFactor=1.0)
Compute a new position, applying the force of the Galaxies in the List but do not update current posi...
Star(casacore::Vector< casacore::Double > &position, casacore::Vector< casacore::Double > &velocity, casacore::Int xSize, casacore::Int ySize)
Constructor.
Base class defining interface to pixel-based output devices.
void rotate(casacore::Matrix< casacore::Double > &rotMatrix)
Rotate position and velocity.
casacore::Vector< casacore::Int > oldPosition
The last drawn position of the Star.
casacore::Vector< casacore::Double > itsPosition
The position of the Galaxy.
casacore::uInt itsDrawList
Number of the draw list for the current PixelCanvas.
casacore::Vector< casacore::Double > & getPosition()
Return the position of the Galaxy.
void setScale(casacore::Int xSize, casacore::Int ySize)
casacore::Bool changedPlotMode
bool Bool
Define the standard types used by Casacore.
Galaxy(casacore::Vector< casacore::Double > &position, casacore::Vector< casacore::Double > &velocity, casacore::Double mass, casacore::Double size, casacore::uInt numStars, casacore::uInt numRings, casacore::Double inclination, casacore::Double positionAngle, casacore::Int xSize, casacore::Int ySize)
Constructor.
void applyForceToStars(std::list< void * > &galaxyList, casacore::Double timeStep, casacore::Double dampingFactor)
Compute a new position for the Stars in this Galaxy.
casacore::Vector< casacore::Int > oldPosition
and an iterator for this List
casacore::Vector< casacore::Double > newVelocity
The new computed velocity of the Galaxy.
casacore::Vector< casacore::Double > itsPosition
Position of the Star.
casacore::Bool changedPlotMode
casacore::Vector< casacore::Int > itsPlotPosition
Last offset applied to itsPosition.
casacore::Double getMass()
Return the Mass of the Galaxy.
casacore::Double itsMass
The mass of the Galaxy.
casacore::Vector< casacore::Double > newPosition
The new computed position of the Galaxy.
void draw(PixelCanvas *pixelCanvas)
Draw the Galaxy on the PixelCanvas.
casacore::Vector< casacore::Int > itsOffset
Last offset applied to itsPosition.
void setPlotMode(Galaxy::PLOT_MODE plotMode)
Set the plot mode.
PixelCanvas * itsPixelCanvas
Temp to check if we are drawing on a new PixelCanvas.
void draw(PixelCanvas *pixelCanvas)
Draw the current position on the PixelCanvas.