OpenMW
|
#include <weather.hpp>
Public Member Functions | |
WeatherManager (MWRender::RenderingManager *, MWWorld::Fallback *fallback) | |
~WeatherManager () | |
void | changeWeather (const std::string ®ion, const unsigned int id) |
void | switchToNextWeather (bool instantly=true) |
void | update (float duration) |
void | stopSounds (bool stopAll) |
void | setHour (const float hour) |
float | getWindSpeed () const |
void | setDate (const int day, const int month) |
void | advanceTime (double hours) |
unsigned int | getWeatherID () const |
void | modRegion (const std::string ®ionid, const std::vector< char > &chances) |
bool | isDark () const |
Private Types | |
typedef std::map< std::string, std::vector< char > > | RegionModMap |
Private Member Functions | |
void | setFallbackWeather (Weather &weather, const std::string &name) |
void | transition (const float factor) |
void | setResult (const Ogre::String &weatherType) |
float | calculateHourFade (const std::string &moonName) const |
float | calculateAngleFade (const std::string &moonName, float angle) const |
void | setWeather (const Ogre::String &weatherType, bool instant=false) |
Ogre::String | nextWeather (const ESM::Region *region) const |
Private Attributes | |
float | mHour |
int | mDay |
int | mMonth |
float | mWindSpeed |
MWWorld::Fallback * | mFallback |
MWRender::RenderingManager * | mRendering |
std::map< Ogre::String, Weather > | mWeatherSettings |
std::map< std::string, std::string > | mRegionOverrides |
std::vector< std::string > | mSoundsPlaying |
Ogre::String | mCurrentWeather |
Ogre::String | mNextWeather |
std::string | mCurrentRegion |
bool | mFirstUpdate |
float | mRemainingTransitionTime |
float | mThunderFlash |
float | mThunderChance |
float | mThunderChanceNeeded |
double | mTimePassed |
WeatherResult | mResult |
RegionModMap | mRegionMods |
float | mSunriseTime |
float | mSunsetTime |
float | mSunriseDuration |
float | mSunsetDuration |
float | mWeatherUpdateTime |
float | mHoursBetweenWeatherChanges |
float | mThunderFrequency |
float | mThunderThreshold |
float | mThunderSoundDelay |
float | mNightStart |
float | mNightEnd |
float | mDayStart |
float | mDayEnd |
std::string | mThunderSoundID0 |
std::string | mThunderSoundID1 |
std::string | mThunderSoundID2 |
std::string | mThunderSoundID3 |
Interface for weather settings
typedef std::map<std::string,std::vector<char> > MWWorld::WeatherManager::RegionModMap [private] |
WeatherManager::WeatherManager | ( | MWRender::RenderingManager * | rendering, |
MWWorld::Fallback * | fallback | ||
) |
void MWWorld::WeatherManager::advanceTime | ( | double | hours | ) | [inline] |
float WeatherManager::calculateAngleFade | ( | const std::string & | moonName, |
float | angle | ||
) | const [private] |
float WeatherManager::calculateHourFade | ( | const std::string & | moonName | ) | const [private] |
void WeatherManager::changeWeather | ( | const std::string & | region, |
const unsigned int | id | ||
) |
Change the weather in the specified region
region | that should be changed |
ID | of the weather setting to shift to |
unsigned int WeatherManager::getWeatherID | ( | ) | const |
float WeatherManager::getWindSpeed | ( | ) | const |
bool WeatherManager::isDark | ( | ) | const |
void WeatherManager::modRegion | ( | const std::string & | regionid, |
const std::vector< char > & | chances | ||
) |
Ogre::String WeatherManager::nextWeather | ( | const ESM::Region * | region | ) | const [private] |
void WeatherManager::setDate | ( | const int | day, |
const int | month | ||
) |
void WeatherManager::setFallbackWeather | ( | Weather & | weather, |
const std::string & | name | ||
) | [private] |
void WeatherManager::setHour | ( | const float | hour | ) |
void WeatherManager::setResult | ( | const Ogre::String & | weatherType | ) | [private] |
void WeatherManager::setWeather | ( | const Ogre::String & | weatherType, |
bool | instant = false |
||
) | [private] |
void WeatherManager::stopSounds | ( | bool | stopAll | ) |
void WeatherManager::switchToNextWeather | ( | bool | instantly = true | ) |
void WeatherManager::transition | ( | const float | factor | ) | [private] |
void WeatherManager::update | ( | float | duration | ) |
Per-frame update
duration |
std::string MWWorld::WeatherManager::mCurrentRegion [private] |
Ogre::String MWWorld::WeatherManager::mCurrentWeather [private] |
int MWWorld::WeatherManager::mDay [private] |
float MWWorld::WeatherManager::mDayEnd [private] |
float MWWorld::WeatherManager::mDayStart [private] |
bool MWWorld::WeatherManager::mFirstUpdate [private] |
float MWWorld::WeatherManager::mHour [private] |
float MWWorld::WeatherManager::mHoursBetweenWeatherChanges [private] |
int MWWorld::WeatherManager::mMonth [private] |
Ogre::String MWWorld::WeatherManager::mNextWeather [private] |
float MWWorld::WeatherManager::mNightEnd [private] |
float MWWorld::WeatherManager::mNightStart [private] |
std::map<std::string, std::string> MWWorld::WeatherManager::mRegionOverrides [private] |
float MWWorld::WeatherManager::mRemainingTransitionTime [private] |
std::vector<std::string> MWWorld::WeatherManager::mSoundsPlaying [private] |
float MWWorld::WeatherManager::mSunriseDuration [private] |
float MWWorld::WeatherManager::mSunriseTime [private] |
float MWWorld::WeatherManager::mSunsetDuration [private] |
float MWWorld::WeatherManager::mSunsetTime [private] |
float MWWorld::WeatherManager::mThunderChance [private] |
float MWWorld::WeatherManager::mThunderChanceNeeded [private] |
float MWWorld::WeatherManager::mThunderFlash [private] |
float MWWorld::WeatherManager::mThunderFrequency [private] |
float MWWorld::WeatherManager::mThunderSoundDelay [private] |
std::string MWWorld::WeatherManager::mThunderSoundID0 [private] |
std::string MWWorld::WeatherManager::mThunderSoundID1 [private] |
std::string MWWorld::WeatherManager::mThunderSoundID2 [private] |
std::string MWWorld::WeatherManager::mThunderSoundID3 [private] |
float MWWorld::WeatherManager::mThunderThreshold [private] |
double MWWorld::WeatherManager::mTimePassed [private] |
std::map<Ogre::String, Weather> MWWorld::WeatherManager::mWeatherSettings [private] |
float MWWorld::WeatherManager::mWeatherUpdateTime [private] |
float MWWorld::WeatherManager::mWindSpeed [private] |