Rigs of Rods 2023.09
Soft-body Physics Simulation
Loading...
Searching...
No Matches
SkyManager.h
Go to the documentation of this file.
1/*
2 This source file is part of Rigs of Rods
3 Copyright 2005-2012 Pierre-Michel Ricordel
4 Copyright 2007-2012 Thomas Fischer
5 Copyright 2017-2018 Petr Ohlidal
6
7 For more information, see http://www.rigsofrods.org/
8
9 Rigs of Rods is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License version 3, as
11 published by the Free Software Foundation.
12
13 Rigs of Rods is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#ifdef USE_CAELUM
23
24#pragma once
25
26#include "Application.h"
27
28#include "CaelumPrerequisites.h"
29
30#include <Caelum.h>
31
32namespace RoR {
33
36
37class SkyManager
38{
39public:
40
41 SkyManager();
42 ~SkyManager();
43
44 void LoadCaelumScript(Ogre::String script, int fogStart = -1, int fogEnd = -1);
45 void SetSkyTimeFactor(Ogre::Real f);
46 Ogre::Light* GetSkyMainLight();
47 float GetSkyTimeFactor();
48 std::string GetPrettyTime();
49 double GetTime() { return m_caelum_system->getJulianDay(); };
50 void SetTime(double time) { m_caelum_system->setJulianDay(time); };
51 bool UpdateSky(float dt);
52 void NotifySkyCameraChanged(Ogre::Camera* cam);
53 void DetectSkyUpdate();
54 Caelum::CaelumSystem* GetCaelumSys() { return m_caelum_system; }
55
56private:
57 Caelum::LongReal m_last_clock;
58 Caelum::CaelumSystem* m_caelum_system;
59};
60
62
63} // namespace RoR
64
65#endif // USE_CAELUM
Central state/object manager and communications hub.
float GetTime()