OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MWWorld::WeatherManager Class Reference

Interface for weather settings. More...

#include <weather.hpp>

Collaboration diagram for MWWorld::WeatherManager:

Public Member Functions

 WeatherManager (MWRender::RenderingManager &rendering, const Fallback::Map &fallback, MWWorld::ESMStore &store)
 
 ~WeatherManager ()
 
void changeWeather (const std::string &regionID, const unsigned int weatherID)
 
void modRegion (const std::string &regionID, const std::vector< char > &chances)
 
void playerTeleported (const std::string &playerRegion, bool isExterior)
 
void update (float duration, bool paused, const TimeStamp &time, bool isExterior)
 
void stopSounds ()
 
float getWindSpeed () const
 
bool isInStorm () const
 Are we in an ash or blight storm? More...
 
osg::Vec3f getStormDirection () const
 
void advanceTime (double hours, bool incremental)
 
unsigned int getWeatherID () const
 
bool useTorches (float hour) const
 
void write (ESM::ESMWriter &writer, Loading::Listener &progress)
 
bool readRecord (ESM::ESMReader &reader, uint32_t type)
 
void clear ()
 

Private Member Functions

void addWeather (const std::string &name, const Fallback::Map &fallback, float dlFactor, float dlOffset, const std::string &particleEffect="")
 
void importRegions ()
 
void regionalWeatherChanged (const std::string &regionID, RegionWeather &region)
 
bool updateWeatherTime ()
 
bool updateWeatherRegion (const std::string &playerRegion)
 
void updateWeatherTransitions (const float elapsedRealSeconds)
 
void forceWeather (const int weatherID)
 
bool inTransition ()
 
void addWeatherTransition (const int weatherID)
 
void calculateWeatherResult (const float gameHour, const float elapsedSeconds, const bool isPaused)
 
void calculateResult (const int weatherID, const float gameHour)
 
void calculateTransitionResult (const float factor, const float gameHour)
 

Private Attributes

MWWorld::ESMStoremStore
 
MWRender::RenderingManagermRendering
 
float mSunriseTime
 
float mSunsetTime
 
float mSunriseDuration
 
float mSunsetDuration
 
float mSunPreSunsetTime
 
TimeOfDaySettings mTimeSettings
 
TimeOfDayInterpolator< float > mNightFade
 
float mHoursBetweenWeatherChanges
 
float mRainSpeed
 
TimeOfDayInterpolator< float > mUnderwaterFog
 
std::vector< WeathermWeatherSettings
 
MoonModel mMasser
 
MoonModel mSecunda
 
float mWindSpeed
 
bool mIsStorm
 
bool mPrecipitation
 
osg::Vec3f mStormDirection
 
std::string mCurrentRegion
 
float mTimePassed
 
bool mFastForward
 
float mWeatherUpdateTime
 
float mTransitionFactor
 
int mCurrentWeather
 
int mNextWeather
 
int mQueuedWeather
 
std::map< std::string,
RegionWeather
mRegions
 
MWRender::WeatherResult mResult
 
MWBase::SoundmAmbientSound
 
std::string mPlayingSoundID
 

Detailed Description

Interface for weather settings.

Constructor & Destructor Documentation

WeatherManager::WeatherManager ( MWRender::RenderingManager rendering,
const Fallback::Map fallback,
MWWorld::ESMStore store 
)

Here is the call graph for this function:

WeatherManager::~WeatherManager ( )

Here is the call graph for this function:

Member Function Documentation

void WeatherManager::addWeather ( const std::string &  name,
const Fallback::Map fallback,
float  dlFactor,
float  dlOffset,
const std::string &  particleEffect = "" 
)
inlineprivate

Here is the call graph for this function:

Here is the caller graph for this function:

void WeatherManager::addWeatherTransition ( const int  weatherID)
inlineprivate

Here is the call graph for this function:

Here is the caller graph for this function:

void WeatherManager::advanceTime ( double  hours,
bool  incremental 
)
void WeatherManager::calculateResult ( const int  weatherID,
const float  gameHour 
)
inlineprivate

Here is the call graph for this function:

Here is the caller graph for this function:

void WeatherManager::calculateTransitionResult ( const float  factor,
const float  gameHour 
)
inlineprivate

Here is the call graph for this function:

Here is the caller graph for this function:

void WeatherManager::calculateWeatherResult ( const float  gameHour,
const float  elapsedSeconds,
const bool  isPaused 
)
inlineprivate

Here is the call graph for this function:

Here is the caller graph for this function:

void WeatherManager::changeWeather ( const std::string &  regionID,
const unsigned int  weatherID 
)

Change the weather in the specified region

Parameters
regionthat should be changed
IDof the weather setting to shift to

Here is the call graph for this function:

void WeatherManager::clear ( )

Here is the call graph for this function:

void WeatherManager::forceWeather ( const int  weatherID)
inlineprivate

Here is the caller graph for this function:

osg::Vec3f WeatherManager::getStormDirection ( ) const
unsigned int WeatherManager::getWeatherID ( ) const
float WeatherManager::getWindSpeed ( ) const
void WeatherManager::importRegions ( )
inlineprivate

Here is the call graph for this function:

Here is the caller graph for this function:

bool WeatherManager::inTransition ( )
inlineprivate

Here is the caller graph for this function:

bool WeatherManager::isInStorm ( ) const

Are we in an ash or blight storm?

void WeatherManager::modRegion ( const std::string &  regionID,
const std::vector< char > &  chances 
)

Here is the call graph for this function:

void WeatherManager::playerTeleported ( const std::string &  playerRegion,
bool  isExterior 
)

Here is the call graph for this function:

bool WeatherManager::readRecord ( ESM::ESMReader reader,
uint32_t  type 
)

Here is the call graph for this function:

void WeatherManager::regionalWeatherChanged ( const std::string &  regionID,
RegionWeather region 
)
inlineprivate

Here is the call graph for this function:

Here is the caller graph for this function:

void WeatherManager::stopSounds ( )

Here is the call graph for this function:

Here is the caller graph for this function:

void WeatherManager::update ( float  duration,
bool  paused,
const TimeStamp time,
bool  isExterior 
)

Per-frame update

Parameters
duration
paused

Here is the call graph for this function:

bool WeatherManager::updateWeatherRegion ( const std::string &  playerRegion)
inlineprivate

Here is the caller graph for this function:

bool WeatherManager::updateWeatherTime ( )
inlineprivate

Here is the caller graph for this function:

void WeatherManager::updateWeatherTransitions ( const float  elapsedRealSeconds)
inlineprivate

Here is the call graph for this function:

Here is the caller graph for this function:

bool WeatherManager::useTorches ( float  hour) const
void WeatherManager::write ( ESM::ESMWriter writer,
Loading::Listener progress 
)

Here is the call graph for this function:

Member Data Documentation

MWBase::Sound* MWWorld::WeatherManager::mAmbientSound
private
std::string MWWorld::WeatherManager::mCurrentRegion
private
int MWWorld::WeatherManager::mCurrentWeather
private
bool MWWorld::WeatherManager::mFastForward
private
float MWWorld::WeatherManager::mHoursBetweenWeatherChanges
private
bool MWWorld::WeatherManager::mIsStorm
private
MoonModel MWWorld::WeatherManager::mMasser
private
int MWWorld::WeatherManager::mNextWeather
private
TimeOfDayInterpolator<float> MWWorld::WeatherManager::mNightFade
private
std::string MWWorld::WeatherManager::mPlayingSoundID
private
bool MWWorld::WeatherManager::mPrecipitation
private
int MWWorld::WeatherManager::mQueuedWeather
private
float MWWorld::WeatherManager::mRainSpeed
private
std::map<std::string, RegionWeather> MWWorld::WeatherManager::mRegions
private
MWRender::RenderingManager& MWWorld::WeatherManager::mRendering
private
MWRender::WeatherResult MWWorld::WeatherManager::mResult
private
MoonModel MWWorld::WeatherManager::mSecunda
private
MWWorld::ESMStore& MWWorld::WeatherManager::mStore
private
osg::Vec3f MWWorld::WeatherManager::mStormDirection
private
float MWWorld::WeatherManager::mSunPreSunsetTime
private
float MWWorld::WeatherManager::mSunriseDuration
private
float MWWorld::WeatherManager::mSunriseTime
private
float MWWorld::WeatherManager::mSunsetDuration
private
float MWWorld::WeatherManager::mSunsetTime
private
float MWWorld::WeatherManager::mTimePassed
private
TimeOfDaySettings MWWorld::WeatherManager::mTimeSettings
private
float MWWorld::WeatherManager::mTransitionFactor
private
TimeOfDayInterpolator<float> MWWorld::WeatherManager::mUnderwaterFog
private
std::vector<Weather> MWWorld::WeatherManager::mWeatherSettings
private
float MWWorld::WeatherManager::mWeatherUpdateTime
private
float MWWorld::WeatherManager::mWindSpeed
private

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