21 #ifndef _SCENERY3D_HPP_ 22 #define _SCENERY3D_HPP_ 25 #include <QStringList> 27 #include <QtConcurrent> 29 #include "StelCore.hpp" 30 #include "StelPluginInterface.hpp" 31 #include "StelModule.hpp" 32 #include "StelUtils.hpp" 33 #include "StelFader.hpp" 34 #include "StelActionMgr.hpp" 35 #include "StelProgressController.hpp" 37 #include "SceneInfo.hpp" 38 #include "S3DEnum.hpp" 47 Q_DECLARE_LOGGING_CATEGORY(scenery3d)
56 Q_PROPERTY(
bool enableScene READ getEnableScene WRITE setEnableScene NOTIFY enableSceneChanged)
57 Q_PROPERTY(
bool enablePixelLighting READ getEnablePixelLighting WRITE setEnablePixelLighting NOTIFY enablePixelLightingChanged)
58 Q_PROPERTY(
bool enableShadows READ getEnableShadows WRITE setEnableShadows NOTIFY enableShadowsChanged)
59 Q_PROPERTY(
bool useSimpleShadows READ getUseSimpleShadows WRITE setUseSimpleShadows NOTIFY useSimpleShadowsChanged)
60 Q_PROPERTY(
bool enableBumps READ getEnableBumps WRITE setEnableBumps NOTIFY enableBumpsChanged)
61 Q_PROPERTY(
S3DEnum::ShadowFilterQuality shadowFilterQuality READ getShadowFilterQuality WRITE setShadowFilterQuality NOTIFY shadowFilterQualityChanged)
62 Q_PROPERTY(
bool enablePCSS READ getEnablePCSS WRITE setEnablePCSS NOTIFY enablePCSSChanged)
63 Q_PROPERTY(
S3DEnum::CubemappingMode cubemappingMode READ getCubemappingMode WRITE setCubemappingMode NOTIFY cubemappingModeChanged)
64 Q_PROPERTY(
bool useFullCubemapShadows READ getUseFullCubemapShadows WRITE setUseFullCubemapShadows NOTIFY useFullCubemapShadowsChanged)
65 Q_PROPERTY(
bool enableDebugInfo READ getEnableDebugInfo WRITE setEnableDebugInfo NOTIFY enableDebugInfoChanged)
66 Q_PROPERTY(
bool enableLocationInfo READ getEnableLocationInfo WRITE setEnableLocationInfo NOTIFY enableLocationInfoChanged)
67 Q_PROPERTY(
bool enableTorchLight READ getEnableTorchLight WRITE setEnableTorchLight NOTIFY enableTorchLightChanged)
68 Q_PROPERTY(
float torchStrength READ getTorchStrength WRITE setTorchStrength NOTIFY torchStrengthChanged)
69 Q_PROPERTY(
float torchRange READ getTorchRange WRITE setTorchRange NOTIFY torchRangeChanged)
70 Q_PROPERTY(
bool enableLazyDrawing READ getEnableLazyDrawing WRITE setEnableLazyDrawing NOTIFY enableLazyDrawingChanged)
71 Q_PROPERTY(
double lazyDrawingInterval READ getLazyDrawingInterval WRITE setLazyDrawingInterval NOTIFY lazyDrawingIntervalChanged)
72 Q_PROPERTY(
bool onlyDominantFaceWhenMoving READ getOnlyDominantFaceWhenMoving WRITE setOnlyDominantFaceWhenMoving NOTIFY onlyDominantFaceWhenMovingChanged)
73 Q_PROPERTY(
bool secondDominantFaceWhenMoving READ getSecondDominantFaceWhenMoving WRITE setSecondDominantFaceWhenMoving NOTIFY secondDominantFaceWhenMovingChanged)
74 Q_PROPERTY(uint cubemapSize READ getCubemapSize WRITE setCubemapSize NOTIFY cubemapSizeChanged)
75 Q_PROPERTY(uint shadowmapSize READ getShadowmapSize WRITE setShadowmapSize NOTIFY shadowmapSizeChanged)
76 Q_PROPERTY(QString currentSceneID READ getCurrentSceneID NOTIFY currentSceneIDChanged STORED
false)
77 Q_PROPERTY(QString loadingSceneID READ getLoadingSceneID NOTIFY loadingSceneIDChanged STORED
false)
80 Q_PROPERTY(
bool isGeometryShaderSupported READ getIsGeometryShaderSupported)
81 Q_PROPERTY(
bool areShadowsSupported READ getAreShadowsSupported)
82 Q_PROPERTY(
bool isShadowFilteringSupported READ getIsShadowFilteringSupported)
83 Q_PROPERTY(
bool isANGLE READ getIsANGLE)
84 Q_PROPERTY(uint maximumFramebufferSize READ getMaximumFramebufferSize)
92 virtual void deinit();
94 virtual void update(
double deltaTime);
95 virtual double getCallOrder(StelModuleActionName actionName)
const;
96 virtual bool configureGui(
bool show);
101 virtual void handleKeys(QKeyEvent* e);
104 void updateProgress(
const QString& str,
int val,
int min,
int max)
const;
106 void enableSceneChanged(
const bool val);
107 void enablePixelLightingChanged(
const bool val);
108 void enableShadowsChanged(
const bool val);
109 void useSimpleShadowsChanged(
const bool val);
110 void enableBumpsChanged(
const bool val);
112 void enablePCSSChanged(
const bool val);
114 void useFullCubemapShadowsChanged(
const bool val);
115 void enableDebugInfoChanged(
const bool val);
116 void enableLocationInfoChanged(
const bool val);
117 void enableTorchLightChanged(
const bool val);
118 void torchStrengthChanged(
const float val);
119 void torchRangeChanged(
const float val);
120 void enableLazyDrawingChanged(
const bool val);
121 void lazyDrawingIntervalChanged(
const double val);
122 void onlyDominantFaceWhenMovingChanged(
const bool val);
123 void secondDominantFaceWhenMovingChanged(
const bool val);
124 void cubemapSizeChanged(
const uint val);
125 void shadowmapSizeChanged(
const uint val);
127 void currentSceneChanged(
const SceneInfo& sceneInfo);
128 void currentSceneIDChanged(
const QString& sceneID);
129 void loadingSceneIDChanged(
const QString& sceneID);
132 void progressReport(
const QString& str,
int val,
int min,
int max)
const;
143 void relativeMove(
const Vec3d& move);
146 void reloadShaders();
149 void showMessage(
const QString& message);
152 void showStoredViewDialog();
155 void setEnableScene(
const bool val);
156 bool getEnableScene()
const {
return flagEnabled; }
158 void setEnablePixelLighting(
const bool val);
159 bool getEnablePixelLighting(
void)
const;
163 void setEnableShadows(
const bool enableShadows);
164 bool getEnableShadows(
void)
const;
167 void setUseSimpleShadows(
const bool simpleShadows);
168 bool getUseSimpleShadows()
const;
172 void setEnableBumps(
const bool enableBumps);
173 bool getEnableBumps(
void)
const;
180 void setEnablePCSS(
const bool val);
181 bool getEnablePCSS()
const;
188 bool getUseFullCubemapShadows()
const;
189 void setUseFullCubemapShadows(
const bool useFullCubemapShadows);
192 void setEnableDebugInfo(
const bool debugEnabled);
193 bool getEnableDebugInfo()
const;
196 void setEnableLocationInfo(
const bool enableLocationInfo);
197 bool getEnableLocationInfo()
const;
200 void setEnableTorchLight(
const bool enableTorchLight);
201 bool getEnableTorchLight()
const;
204 void setTorchStrength(
const float torchStrength);
205 float getTorchStrength()
const;
208 void setTorchRange(
const float torchRange);
209 float getTorchRange()
const;
212 void setEnableLazyDrawing(
const bool val);
213 bool getEnableLazyDrawing()
const;
216 void setOnlyDominantFaceWhenMoving(
const bool val);
217 bool getOnlyDominantFaceWhenMoving()
const;
219 void setSecondDominantFaceWhenMoving(
const bool val);
220 bool getSecondDominantFaceWhenMoving()
const;
223 void forceCubemapRedraw();
226 void setLazyDrawingInterval(
const double val);
227 double getLazyDrawingInterval()
const;
231 void setCubemapSize(
const uint val);
232 uint getCubemapSize()
const;
236 void setShadowmapSize(
const uint val);
237 uint getShadowmapSize()
const;
240 bool getIsGeometryShaderSupported()
const;
241 bool getAreShadowsSupported()
const;
242 bool getIsShadowFilteringSupported()
const;
243 bool getIsANGLE()
const;
244 uint getMaximumFramebufferSize()
const;
251 QString getCurrentSceneID()
const;
254 QString getLoadingSceneID()
const;
263 SceneInfo loadScenery3dByName(
const QString& name);
267 SceneInfo loadScenery3dByID(
const QString&
id);
269 QString getDefaultScenery3dID()
const {
return defaultScenery3dID; }
270 void setDefaultScenery3dID(
const QString&
id);
273 void setView(
const StoredView& view,
const bool setDate);
280 void loadSceneCompleted();
281 void progressReceive(
const QString& str,
int val,
int min,
int max);
288 void createActions();
290 void createToolbarButtons()
const;
301 QString defaultScenery3dID;
305 Vec3d movementKeyInput;
313 QTimer* messageTimer;
316 QString currentMessage;
318 volatile bool loadCancel;
322 QFutureWatcher<S3DScene*> currentLoadFuture;
327 #include "StelPluginInterface.hpp" 333 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
342 #endif // _SCENERY3D_HPP_ Define the interface to implement when creating a plugin.
virtual QObjectList getExtensionList() const
A mechanism to provide abitrary QObjects to the StelModuleMgr.
Contains all the metadata necessary for a Scenery3d scene, and can be loaded from special ...
virtual StelModule * getStelModule() const
Get the instance of StelModule to include in the list of standard StelModule.
Implementation of StelFader which implements a linear transition.
Main class for Stellarium core processing.
Manages the head movements and zoom operations.
Main class of the module, inherits from StelModule.
Scenery3d renderer class.
ShadowFilterQuality
Contains different shadow filter settings.
ProjectionType
Available projection types.
CubemappingMode
Determines the method used for cubemap creation.
virtual StelPluginInfo getPluginInfo() const
Get information about the plugin.
Maintain the state of a progress bar.
A templatized 3d vector compatible with openGL.
A structure which stores a specific view position, view direction and FOV, together with a textual de...
SceneInfo getLoadingScene() const
Gets the SceneInfo of the scene that is currently in the process of being loaded. ...
This class is used by Qt to manage a plug-in interface.
This is the common base class for all the main components of stellarium.
Contains information about a Stellarium plugin.