OpenMW
Public Member Functions | Private Types | Private Member Functions | Private Attributes
MWWorld::WeatherManager Class Reference

#include <weather.hpp>

List of all members.

Public Member Functions

 WeatherManager (MWRender::RenderingManager *, MWWorld::Fallback *fallback)
 ~WeatherManager ()
void changeWeather (const std::string &region, 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 &regionid, 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::FallbackmFallback
MWRender::RenderingManagermRendering
std::map< Ogre::String, WeathermWeatherSettings
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

Detailed Description

Interface for weather settings


Member Typedef Documentation

typedef std::map<std::string,std::vector<char> > MWWorld::WeatherManager::RegionModMap [private]

Constructor & Destructor Documentation


Member Function Documentation

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

Parameters:
regionthat should be changed
IDof the weather setting to shift to
unsigned int WeatherManager::getWeatherID ( ) const
bool WeatherManager::isDark ( ) const
See also:
World::isDark
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

Parameters:
duration

Member Data Documentation

Ogre::String MWWorld::WeatherManager::mNextWeather [private]
std::map<std::string, std::string> MWWorld::WeatherManager::mRegionOverrides [private]
std::vector<std::string> MWWorld::WeatherManager::mSoundsPlaying [private]
std::map<Ogre::String, Weather> MWWorld::WeatherManager::mWeatherSettings [private]

The documentation for this class was generated from the following files: