Add infos into target window
[ryzomcore.git] / ryzom / server / src / entities_game_service / weather_everywhere.h
blob36eb09952f158593a454ab0f68f55e974267016c
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // 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 Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef NL_WEATHER_EVERYWHERE_H
20 #define NL_WEATHER_EVERYWHERE_H
22 #include "game_share/time_weather_season/weather_function.h"
23 #include "game_share/time_weather_season/time_and_season.h"
26 /**
27 * Utility class to query the weather at any time and position.
28 * \author Olivier Cado
29 * \author Nevrax France
30 * \date 2004
32 class CWeatherEverywhere
34 public:
36 /// Constructor
37 CWeatherEverywhere() : _WeatherFunctionParamsSheet(NULL) {}
39 /// Destructor
40 ~CWeatherEverywhere();
42 /// Initialization (must be called after the initialization of static sheets)
43 void init();
45 /**
46 * Return the weather at the specified position & time.
47 * In case of failure (such as a position outside a continent), return unknownWeather.
49 CRyzomTime::EWeather getWeather( const NLMISC::CVector& pos, const CRyzomTime& ryzomTime ) const;
51 private:
53 /// All weather functions (the vector contains a pointer to EGSPD::CSeason::Invalid values)
54 std::vector< CWeatherFunction * > _WeatherFunctionsBySeasonByContinent;
56 /// Pointer to the weather function parameter sheet
57 const class CWeatherFunctionParamsSheetBase *_WeatherFunctionParamsSheet;
61 /// Singleton instance
62 extern CWeatherEverywhere WeatherEverywhere;
65 #endif // NL_WEATHER_EVERYWHERE_H
67 /* End of weather_everywhere.h */