Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure

StelCore Class Reference

Main class for Stellarium core processing. More...

#include <StelCore.hpp>

List of all members.

Public Types

enum  FrameType {
  FrameAltAz, FrameHeliocentricEcliptic, FrameObservercentricEcliptic, FrameEquinoxEqu,
  FrameJ2000
}
enum  ProjectionType {
  ProjectionPerspective, ProjectionEqualArea, ProjectionStereographic, ProjectionFisheye,
  ProjectionHammer, ProjectionCylinder, ProjectionMercator, ProjectionOrthographic
}

Public Slots

void setCurrentProjectionType (ProjectionType type)
QString getCurrentProjectionTypeKey (void) const
void setCurrentProjectionTypeKey (QString type)
QStringList getAllProjectionTypeKeys () const
void setMaskType (StelProjector::StelProjectorMaskType m)
void setFlagGravityLabels (bool gravity)
void setFlipHorz (bool flip)
void setFlipVert (bool flip)
bool getFlipHorz (void) const
bool getFlipVert (void) const

Public Member Functions

void init ()
void update (double deltaTime)
void windowHasBeenResized (int width, int height)
void preDraw ()
void postDraw ()
const StelProjectorP getProjection2d () const
const StelProjectorP getProjection (FrameType frameType, ProjectionType projType=(ProjectionType) 1000) const
const StelProjectorP getProjection (const Mat4d &modelViewMat, ProjectionType projType=(ProjectionType) 1000) const
StelNavigatorgetNavigator ()
const StelNavigatorgetNavigator () const
StelToneReproducergetToneReproducer ()
const StelToneReproducergetToneReproducer () const
StelSkyDrawergetSkyDrawer ()
const StelSkyDrawergetSkyDrawer () const
const StelGeodesicGrid * getGeodesicGrid (int maxLevel) const
StelMovementMgrgetMovementMgr ()
const StelMovementMgrgetMovementMgr () const
void setClippingPlanes (double znear, double zfar)
void getClippingPlanes (double *zn, double *zf) const
QString projectionTypeKeyToNameI18n (const QString &key) const
QString projectionNameI18nToTypeKey (const QString &nameI18n) const
StelProjector::StelProjectorParams getCurrentStelProjectorParams () const
void setCurrentStelProjectorParams (const StelProjector::StelProjectorParams &newParams)


Detailed Description

Main class for Stellarium core processing.

This class provides services like management of sky projections, tone conversion, or reference frame conversion. It is used by the various StelModules to update and display themself. There is currently only one StelCore instance in Stellarium, but in the future they may be more, allowing for example to display several independent views of the sky at the same time.

Author:
Fabien Chereau

Member Enumeration Documentation

Supported reference frame types.

Enumerator:
FrameAltAz  Altazimuthal reference frame centered on observer.
FrameHeliocentricEcliptic  Ecliptic reference frame centered on the Sun.
FrameObservercentricEcliptic  Ecliptic reference frame centered on the Observer.
FrameEquinoxEqu  Equatorial reference frame at the current equinox centered on the observer. The north pole follow the precession of the planet on which the observer is located.
FrameJ2000  Equatorial reference frame at the J2000 equinox centered on the observer. This is also the ICRS reference frame.

Available projection types. A value of 1000 indicate the default projection.

Enumerator:
ProjectionPerspective  Perspective projection.
ProjectionEqualArea  Equal Area projection.
ProjectionStereographic  Stereograhic projection.
ProjectionFisheye  Fisheye projection.
ProjectionHammer  Hammer-Aitoff projection.
ProjectionCylinder  Cylinder projection.
ProjectionMercator  Mercator projection.
ProjectionOrthographic  Orthographic projection.


Member Function Documentation

void StelCore::init (  ) 

Init and load all main core components.

void StelCore::update ( double  deltaTime  ) 

Update all the objects with respect to the time.

Parameters:
deltaTime the time increment in sec.

void StelCore::windowHasBeenResized ( int  width,
int  height 
)

Handle the resizing of the window.

void StelCore::preDraw (  ) 

Update core state before drawing modules.

void StelCore::postDraw (  ) 

Update core state after drawing modules.

const StelProjectorP StelCore::getProjection2d (  )  const

Get a new instance of a simple 2d projection.

This projection cannot be used to project or unproject but only for 2d painting

const StelProjectorP StelCore::getProjection ( FrameType  frameType,
ProjectionType  projType = (ProjectionType) 1000 
) const

Get a new instance of projector using the current display parameters from Navigation, StelMovementMgr, etc.

.. If not specified the projection type is the default one set in the core. This is a smart pointer, you don't need to delete it.

const StelProjectorP StelCore::getProjection ( const Mat4d modelViewMat,
ProjectionType  projType = (ProjectionType) 1000 
) const

Get an instance of projector using the current display parameters from Navigation, StelMovementMgr and using the given modelview matrix.

If not specified default the projection type is the default one set in the core.

StelNavigator* StelCore::getNavigator (  )  [inline]

Get the current navigation (manages frame transformation) used in the core.

const StelNavigator* StelCore::getNavigator (  )  const [inline]

Get the current navigation (manages frame transformation) used in the core.

StelToneReproducer* StelCore::getToneReproducer (  )  [inline]

Get the current tone reproducer used in the core.

const StelToneReproducer* StelCore::getToneReproducer (  )  const [inline]

Get the current tone reproducer used in the core.

StelSkyDrawer* StelCore::getSkyDrawer (  )  [inline]

Get the current StelSkyDrawer used in the core.

const StelSkyDrawer* StelCore::getSkyDrawer (  )  const [inline]

Get the current StelSkyDrawer used in the core.

const StelGeodesicGrid* StelCore::getGeodesicGrid ( int  maxLevel  )  const

Get an instance of StelGeodesicGrid which is garanteed to allow for at least maxLevel levels.

StelMovementMgr* StelCore::getMovementMgr (  )  [inline]

Get the instance of movement manager.

const StelMovementMgr* StelCore::getMovementMgr (  )  const [inline]

Get the const instance of movement manager.

void StelCore::setClippingPlanes ( double  znear,
double  zfar 
) [inline]

Set the near and far clipping planes.

void StelCore::getClippingPlanes ( double *  zn,
double *  zf 
) const [inline]

Get the near and far clipping planes.

QString StelCore::projectionTypeKeyToNameI18n ( const QString &  key  )  const

Get the translated projection name from its TypeKey for the current locale.

QString StelCore::projectionNameI18nToTypeKey ( const QString &  nameI18n  )  const

Get the projection TypeKey from its translated name for the current locale.

StelProjector::StelProjectorParams StelCore::getCurrentStelProjectorParams (  )  const [inline]

Get the current set of parameters to use when creating a new StelProjector.

void StelCore::setCurrentStelProjectorParams ( const StelProjector::StelProjectorParams newParams  )  [inline]

Set the set of parameters to use when creating a new StelProjector.

void StelCore::setCurrentProjectionType ( ProjectionType  type  )  [inline, slot]

Set the current ProjectionType to use.

QString StelCore::getCurrentProjectionTypeKey ( void   )  const [slot]

Get the current Mapping used by the Projection.

void StelCore::setCurrentProjectionTypeKey ( QString  type  )  [slot]

Set the current ProjectionType to use from its key.

QStringList StelCore::getAllProjectionTypeKeys (  )  const [slot]

Get the list of all the available projections.

void StelCore::setMaskType ( StelProjector::StelProjectorMaskType  m  )  [inline, slot]

Set the mask type.

void StelCore::setFlagGravityLabels ( bool  gravity  )  [inline, slot]

Set the flag with decides whether to arrage labels so that they are aligned with the bottom of a 2d screen, or a 3d dome.

void StelCore::setFlipHorz ( bool  flip  )  [inline, slot]

Set the horizontal flip status.

Parameters:
flip The new value (true = flipped, false = unflipped).

void StelCore::setFlipVert ( bool  flip  )  [inline, slot]

Set the vertical flip status.

Parameters:
flip The new value (true = flipped, false = unflipped).

bool StelCore::getFlipHorz ( void   )  const [inline, slot]

Get the state of the horizontal flip.

Returns:
True if flipped horizontally, else false.

bool StelCore::getFlipVert ( void   )  const [inline, slot]

Get the state of the vertical flip.

Returns:
True if flipped vertically, else false.


Generated on Mon Mar 9 16:16:16 2009 for Stellarium by  doxygen 1.5.5