1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
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.
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"
27 * Utility class to query the weather at any time and position.
28 * \author Olivier Cado
29 * \author Nevrax France
32 class CWeatherEverywhere
37 CWeatherEverywhere() : _WeatherFunctionParamsSheet(NULL
) {}
40 ~CWeatherEverywhere();
42 /// Initialization (must be called after the initialization of static sheets)
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;
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 */