casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
casa::Galaxy Class Reference

Simple class to represent a Galaxy as a collection of Stars. More...

#include <Galaxy.h>

Public Types

enum  PLOT_MODE {
  POSITION,
  VELOCITY
}
 

Public Member Functions

 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. More...
 
 ~Galaxy ()
 Destructor. More...
 
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 position and velocity. More...
 
void update ()
 update position and velocity to new value More...
 
void applyForceToStars (std::list< void * > &galaxyList, casacore::Double timeStep, casacore::Double dampingFactor)
 Compute a new position for the Stars in this Galaxy. More...
 
void rotate (casacore::Matrix< casacore::Double > &rotMatrix)
 Rotate position and velocity. More...
 
void draw (PixelCanvas *pixelCanvas)
 Draw the Galaxy on the PixelCanvas. More...
 
casacore::Double force (casacore::Double distance)
 magnitude of the force for this galaxy More...
 
casacore::Double getMass ()
 Return the Mass of the Galaxy. More...
 
casacore::Vector
< casacore::Double > & 
getPosition ()
 Return the position of the Galaxy. More...
 
casacore::Vector
< casacore::Double > & 
getVelocity ()
 Return the Velocity of the Galaxy. More...
 
void setPlotMode (Galaxy::PLOT_MODE plotMode)
 Set the plot mode. More...
 
void setScale (casacore::Int xSize, casacore::Int ySize)
 

Private Attributes

casacore::Double itsMass
 The mass of the Galaxy. More...
 
casacore::Double itsSize
 its size More...
 
casacore::Vector
< casacore::Double
itsPosition
 The position of the Galaxy. More...
 
casacore::Vector
< casacore::Double
itsVelocity
 The velocity of the Galaxy. More...
 
casacore::Vector
< casacore::Double
newPosition
 The new computed position of the Galaxy. More...
 
casacore::Vector
< casacore::Double
newVelocity
 The new computed velocity of the Galaxy. More...
 
std::list< void * > itsStarList
 The list of Stars in this Galaxy. More...
 
casacore::Vector< casacore::IntoldPosition
 and an iterator for this List More...
 
casacore::Vector< casacore::IntitsOffset
 Last offset applied to itsPosition. More...
 
casacore::Vector< casacore::IntitsPlotPosition
 Last offset applied to itsPosition. More...
 
casacore::Int itsXSize
 
casacore::Int itsYSize
 
casacore::uInt itsDrawList
 Number of the draw list for the current PixelCanvas. More...
 
PixelCanvasitsPixelCanvas
 
Galaxy::PLOT_MODE plotMode
 
casacore::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
POSITION 
VELOCITY 

Definition at line 48 of file Galaxy.h.

Constructor & Destructor Documentation

casa::Galaxy::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.

casa::Galaxy::~Galaxy ( )

Destructor.

Member Function Documentation

void casa::Galaxy::applyForceToStars ( std::list< void * > &  galaxyList,
casacore::Double  timeStep,
casacore::Double  dampingFactor 
)

Compute a new position for the Stars in this Galaxy.

void casa::Galaxy::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 position and velocity.

void casa::Galaxy::draw ( PixelCanvas pixelCanvas)

Draw the Galaxy on the PixelCanvas.

casacore::Double casa::Galaxy::force ( casacore::Double  distance)

magnitude of the force for this galaxy

casacore::Double casa::Galaxy::getMass ( )

Return the Mass of the Galaxy.

casacore::Vector<casacore::Double>& casa::Galaxy::getPosition ( )

Return the position of the Galaxy.

casacore::Vector<casacore::Double>& casa::Galaxy::getVelocity ( )

Return the Velocity of the Galaxy.

void casa::Galaxy::rotate ( casacore::Matrix< casacore::Double > &  rotMatrix)

Rotate position and velocity.

void casa::Galaxy::setPlotMode ( Galaxy::PLOT_MODE  plotMode)

Set the plot mode.

void casa::Galaxy::setScale ( casacore::Int  xSize,
casacore::Int  ySize 
)
void casa::Galaxy::update ( )

update position and velocity to new value

Member Data Documentation

casacore::Bool casa::Galaxy::changedPlotMode
private

Definition at line 137 of file Galaxy.h.

casacore::uInt casa::Galaxy::itsDrawList
private

Number of the draw list for the current PixelCanvas.

Definition at line 131 of file Galaxy.h.

casacore::Double casa::Galaxy::itsMass
private

The mass of the Galaxy.

Definition at line 99 of file Galaxy.h.

casacore::Vector<casacore::Int> casa::Galaxy::itsOffset
private

Last offset applied to itsPosition.

Definition at line 123 of file Galaxy.h.

PixelCanvas* casa::Galaxy::itsPixelCanvas
private

Definition at line 133 of file Galaxy.h.

casacore::Vector<casacore::Int> casa::Galaxy::itsPlotPosition
private

Last offset applied to itsPosition.

Definition at line 125 of file Galaxy.h.

casacore::Vector<casacore::Double> casa::Galaxy::itsPosition
private

The position of the Galaxy.

Definition at line 105 of file Galaxy.h.

casacore::Double casa::Galaxy::itsSize
private

its size

Definition at line 102 of file Galaxy.h.

std::list<void *> casa::Galaxy::itsStarList
private

The list of Stars in this Galaxy.

Definition at line 118 of file Galaxy.h.

casacore::Vector<casacore::Double> casa::Galaxy::itsVelocity
private

The velocity of the Galaxy.

Definition at line 108 of file Galaxy.h.

casacore::Int casa::Galaxy::itsXSize
private

Definition at line 127 of file Galaxy.h.

casacore::Int casa::Galaxy::itsYSize
private

Definition at line 128 of file Galaxy.h.

casacore::Vector<casacore::Double> casa::Galaxy::newPosition
private

The new computed position of the Galaxy.

Definition at line 112 of file Galaxy.h.

casacore::Vector<casacore::Double> casa::Galaxy::newVelocity
private

The new computed velocity of the Galaxy.

Definition at line 115 of file Galaxy.h.

casacore::Vector<casacore::Int> casa::Galaxy::oldPosition
private

and an iterator for this List

Definition at line 121 of file Galaxy.h.

Galaxy::PLOT_MODE casa::Galaxy::plotMode
private

Definition at line 135 of file Galaxy.h.


The documentation for this class was generated from the following file: