Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure
Public Types | Public Slots | Public Member Functions

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, FrameGalactic
}
enum  ProjectionType {
  ProjectionPerspective, ProjectionEqualArea, ProjectionStereographic, ProjectionFisheye,
  ProjectionHammer, ProjectionCylinder, ProjectionMercator, ProjectionOrthographic
}

Public Slots

void setCurrentProjectionType (ProjectionType type)
ProjectionType getCurrentProjectionType () const
QString getCurrentProjectionTypeKey (void) const
void setCurrentProjectionTypeKey (QString type)
QStringList getAllProjectionTypeKeys () const
void setMaskType (StelProjector::StelProjectorMaskType m)
void setFlagGravityLabels (bool gravity)
void setDefautAngleForGravityText (float a)
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 (float x, float y, float width, float height)
void preDraw ()
void postDraw ()
StelProjectorP getProjection2d () const
StelProjectorP getProjection (FrameType frameType, ProjectionType projType=(ProjectionType) 1000) const
StelProjectorP getProjection (const Mat4d &modelViewMat, ProjectionType projType=(ProjectionType) 1000) const
StelNavigatorgetNavigator ()
const StelNavigatorgetNavigator () const
StelToneReproducergetToneReproducer ()
const StelToneReproducergetToneReproducer () const
StelSkyDrawergetSkyDrawer ()
const StelSkyDrawergetSkyDrawer () const
const StelGeodesicGridgetGeodesicGrid (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 follows 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.

FrameGalactic 

Galactic reference frame centered on observer.

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

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.
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.

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.

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

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).
void StelCore::update ( double  deltaTime  ) 

Update all the objects with respect to the time.

Parameters:
deltaTime the time increment in sec.