casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
casa::Star Class Reference

Simple class which represents a star as a point mass. More...

#include <Galaxy.h>

List of all members.

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< DoubleitsPosition
 Position of the Star.
Vector< IntoldPosition
 The last drawn position of the Star.
Vector< IntitsOffset
 Last offset applied to itsPosition.
Vector< IntitsPlotPosition
 Last offset applied to itsPosition.
Vector< DoubleitsVelocity
 Velocity of the Star.
Int itsXSize
Int itsYSize
uInt itsDrawList
 Number of the draw list for the current PixelCanvas.
PixelCanvasitsPixelCanvas
 Temp to check if we are drawing on a new PixelCanvas.
Galaxy::PLOT_MODE plotMode
Bool changedPlotMode

Detailed Description

Simple class which represents a star as a point mass.

Definition at line 146 of file Galaxy.h.


Constructor & Destructor Documentation

casa::Star::Star ( Vector< Double > &  position,
Vector< Double > &  velocity,
Int  xSize,
Int  ySize 
)

Constructor.

Destructor.


Member Function Documentation

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.

Set the plot mode.

void casa::Star::setScale ( Int  xSize,
Int  ySize 
)

Member Data Documentation

Definition at line 197 of file Galaxy.h.

Number of the draw list for the current PixelCanvas.

Definition at line 190 of file Galaxy.h.

Last offset applied to itsPosition.

Definition at line 179 of file Galaxy.h.

Temp to check if we are drawing on a new PixelCanvas.

Definition at line 193 of file Galaxy.h.

Last offset applied to itsPosition.

Definition at line 181 of file Galaxy.h.

Position of the Star.

Definition at line 175 of file Galaxy.h.

Velocity of the Star.

Definition at line 184 of file Galaxy.h.

Definition at line 186 of file Galaxy.h.

Definition at line 187 of file Galaxy.h.

The last drawn position of the Star.

Definition at line 177 of file Galaxy.h.

Definition at line 195 of file Galaxy.h.


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