~ubuntu-branches/debian/squeeze/stellarium/squeeze

« back to all changes in this revision

Viewing changes to src/StelCore.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Cédric Delfosse
  • Date: 2008-05-19 21:28:23 UTC
  • mfrom: (3.1.5 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080519212823-m5nfiuntxstxzxj7
Tags: 0.9.1-4
Add libxcursor-dev, libxfixes-dev, libxinerama-dev, libqt4-opengl-dev to
build-deps (Closes: #479906)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2003 Fabien Chereau
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU General Public License
 
6
 * as published by the Free Software Foundation; either version 2
 
7
 * of the License, or (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
17
 */
 
18
 
 
19
#ifndef _STEL_CORE_H_
 
20
#define _STEL_CORE_H_
 
21
 
 
22
#include <QString>
 
23
 
 
24
class Navigator;
 
25
class Projector;
 
26
class ToneReproducer;
 
27
class InitParser;
 
28
class LoadingBar;
 
29
class Observer;
 
30
class GeodesicGrid;
 
31
 
 
32
//! @class StelCore 
 
33
//! Main class for Stellarium core processing.
 
34
//! This class provides services like management of sky projections,
 
35
//! tone conversion, or reference frame conversion. It is used by the
 
36
//! various StelModules to update and display themself.
 
37
//! There is currently only one StelCore instance in Stellarium, but
 
38
//! in the future they may be more, allowing for example to display 
 
39
//! several independent views of the sky at the same time.
 
40
//! @author Fabien Chereau
 
41
class StelCore
 
42
{
 
43
public:
 
44
        StelCore();
 
45
        virtual ~StelCore();
 
46
 
 
47
        //! Init and load all main core components from the passed config file.
 
48
        void init(const InitParser& conf);
 
49
 
 
50
        //! Init projection temp TODO remove.
 
51
        void initProj(const InitParser& conf);
 
52
 
 
53
        //! Update all the objects with respect to the time.
 
54
        //! @param deltaTime the time increment in ms.
 
55
        void update(int deltaTime);
 
56
 
 
57
        //! Update core state before drawing modules.
 
58
        void preDraw();
 
59
 
 
60
        //! Update core state after drawing modules.
 
61
        void postDraw();
 
62
 
 
63
        //! Get the current projector used in the core.
 
64
        Projector* getProjection() {return projection;}
 
65
        //! Get the current projector used in the core.
 
66
        const Projector* getProjection() const {return projection;}
 
67
 
 
68
        //! Get the current navigation (manages frame transformation) used in the core.
 
69
        Navigator* getNavigation() {return navigation;}
 
70
        //! Get the current navigation (manages frame transformation) used in the core.
 
71
        const Navigator* getNavigation() const {return navigation;}
 
72
 
 
73
        //! Get the current tone reproducer used in the core.
 
74
        ToneReproducer* getToneReproducer() {return tone_converter;}
 
75
        //! Get the current tone reproducer used in the core.
 
76
        const ToneReproducer* getToneReproducer() const {return tone_converter;}
 
77
 
 
78
        //! Get the current observer description.
 
79
        Observer* getObservatory() {return observatory;}
 
80
        //! Get the current observer description.
 
81
        const Observer* getObservatory() const {return observatory;}
 
82
 
 
83
        //! Get the shared instance of GeodesicGrid
 
84
        GeodesicGrid* getGeodesicGrid() {return geodesic_grid;}
 
85
        //! Get the shared instance of GeodesicGrid
 
86
        const GeodesicGrid* getGeodesicGrid() const {return geodesic_grid;}
 
87
        
 
88
private:
 
89
        Navigator* navigation;                  // Manage all navigation parameters, coordinate transformations etc..
 
90
        Observer* observatory;                  // Manage observer position
 
91
        Projector* projection;                  // Manage the projection mode and matrix
 
92
        ToneReproducer* tone_converter;         // Tones conversion between stellarium world and display device
 
93
        class MovementMgr* movementMgr;         // Manage vision movements
 
94
        
 
95
        // Manage geodesic grid
 
96
        GeodesicGrid* geodesic_grid;
 
97
};
 
98
 
 
99
#endif // _STEL_CORE_H_