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
MWRender::SkyManager Class Reference

The SkyManager handles rendering of the sky domes, celestial bodies as well as other objects that need to be rendered relative to the camera (e.g. weather particle effects) More...

#include <sky.hpp>

Collaboration diagram for MWRender::SkyManager:

Public Member Functions

 SkyManager (osg::Group *parentNode, Resource::SceneManager *sceneManager)
 
 ~SkyManager ()
 
void update (float duration)
 
void setEnabled (bool enabled)
 
void setHour (double hour)
 will be called even when sky is disabled. More...
 
void setDate (int day, int month)
 will be called even when sky is disabled. More...
 
int getMasserPhase () const
 
int getSecundaPhase () const
 
void setMoonColour (bool red)
 change Secunda colour to red More...
 
void setWeather (const WeatherResult &weather)
 
void sunEnable ()
 
void sunDisable ()
 
void setRainSpeed (float speed)
 
void setStormDirection (const osg::Vec3f &direction)
 
void setSunDirection (const osg::Vec3f &direction)
 
void setMasserState (const MoonState &state)
 
void setSecundaState (const MoonState &state)
 
void setGlareTimeOfDayFade (float val)
 
void setWaterEnabled (bool enabled)
 Enable or disable the water plane (used to remove underwater weather particles) More...
 
void setWaterHeight (float height)
 Set height of water plane (used to remove underwater weather particles) More...
 
void listAssetsToPreload (std::vector< std::string > &models, std::vector< std::string > &textures)
 

Private Member Functions

void create ()
 no need to call this, automatically done on first enable() More...
 
void createRain ()
 
void destroyRain ()
 
void updateRainParameters ()
 

Private Attributes

Resource::SceneManagermSceneManager
 
osg::ref_ptr< osg::Group > mRootNode
 
osg::ref_ptr< osg::Group > mEarlyRenderBinRoot
 
osg::ref_ptr
< osg::PositionAttitudeTransform > 
mParticleNode
 
osg::ref_ptr< osg::Node > mParticleEffect
 
std::vector< osg::ref_ptr
< AlphaFader > > 
mParticleFaders
 
osg::ref_ptr
< UnderwaterSwitchCallback
mUnderwaterSwitch
 
osg::ref_ptr
< osg::PositionAttitudeTransform > 
mCloudNode
 
osg::ref_ptr< CloudUpdatermCloudUpdater
 
osg::ref_ptr< CloudUpdatermCloudUpdater2
 
osg::ref_ptr< osg::Node > mCloudMesh
 
osg::ref_ptr< osg::Node > mCloudMesh2
 
osg::ref_ptr< osg::Node > mAtmosphereDay
 
osg::ref_ptr
< osg::PositionAttitudeTransform > 
mAtmosphereNightNode
 
float mAtmosphereNightRoll
 
osg::ref_ptr
< AtmosphereNightUpdater
mAtmosphereNightUpdater
 
osg::ref_ptr< AtmosphereUpdatermAtmosphereUpdater
 
std::auto_ptr< SunmSun
 
std::auto_ptr< MoonmMasser
 
std::auto_ptr< MoonmSecunda
 
osg::ref_ptr< osg::Group > mRainNode
 
osg::ref_ptr
< osgParticle::ParticleSystem > 
mRainParticleSystem
 
osg::ref_ptr< RainShootermRainShooter
 
osg::ref_ptr< RainFadermRainFader
 
bool mCreated
 
bool mIsStorm
 
int mDay
 
int mMonth
 
float mCloudAnimationTimer
 
float mRainTimer
 
osg::Vec3f mStormDirection
 
std::string mClouds
 
std::string mNextClouds
 
float mCloudBlendFactor
 
float mCloudSpeed
 
float mStarsOpacity
 
osg::Vec4f mCloudColour
 
osg::Vec4f mSkyColour
 
osg::Vec4f mFogColour
 
std::string mCurrentParticleEffect
 
float mRemainingTransitionTime
 
bool mRainEnabled
 
std::string mRainEffect
 
float mRainSpeed
 
float mRainFrequency
 
float mWindSpeed
 
bool mEnabled
 
bool mSunEnabled
 
osg::Vec4f mMoonScriptColor
 

Detailed Description

The SkyManager handles rendering of the sky domes, celestial bodies as well as other objects that need to be rendered relative to the camera (e.g. weather particle effects)

Constructor & Destructor Documentation

MWRender::SkyManager::SkyManager ( osg::Group *  parentNode,
Resource::SceneManager sceneManager 
)
MWRender::SkyManager::~SkyManager ( )

Member Function Documentation

void MWRender::SkyManager::create ( )
private

no need to call this, automatically done on first enable()

Here is the call graph for this function:

Here is the caller graph for this function:

void MWRender::SkyManager::createRain ( )
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWRender::SkyManager::destroyRain ( )
private

Here is the caller graph for this function:

int MWRender::SkyManager::getMasserPhase ( ) const

0 new moon, 1 waxing or waning cresecent, 2 waxing or waning half, 3 waxing or waning gibbous, 4 full moon

int MWRender::SkyManager::getSecundaPhase ( ) const

0 new moon, 1 waxing or waning cresecent, 2 waxing or waning half, 3 waxing or waning gibbous, 4 full moon

void MWRender::SkyManager::listAssetsToPreload ( std::vector< std::string > &  models,
std::vector< std::string > &  textures 
)

Here is the call graph for this function:

void MWRender::SkyManager::setDate ( int  day,
int  month 
)

will be called even when sky is disabled.

void MWRender::SkyManager::setEnabled ( bool  enabled)

Here is the call graph for this function:

void MWRender::SkyManager::setGlareTimeOfDayFade ( float  val)

Here is the caller graph for this function:

void MWRender::SkyManager::setHour ( double  hour)

will be called even when sky is disabled.

void MWRender::SkyManager::setMasserState ( const MoonState state)

Here is the caller graph for this function:

void MWRender::SkyManager::setMoonColour ( bool  red)

change Secunda colour to red

void MWRender::SkyManager::setRainSpeed ( float  speed)
void MWRender::SkyManager::setSecundaState ( const MoonState state)

Here is the caller graph for this function:

void MWRender::SkyManager::setStormDirection ( const osg::Vec3f &  direction)

Here is the caller graph for this function:

void MWRender::SkyManager::setSunDirection ( const osg::Vec3f &  direction)
void MWRender::SkyManager::setWaterEnabled ( bool  enabled)

Enable or disable the water plane (used to remove underwater weather particles)

void MWRender::SkyManager::setWaterHeight ( float  height)

Set height of water plane (used to remove underwater weather particles)

void MWRender::SkyManager::setWeather ( const WeatherResult weather)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWRender::SkyManager::sunDisable ( )

Here is the caller graph for this function:

void MWRender::SkyManager::sunEnable ( )

Here is the caller graph for this function:

void MWRender::SkyManager::update ( float  duration)

Here is the call graph for this function:

void MWRender::SkyManager::updateRainParameters ( )
private

Here is the caller graph for this function:

Member Data Documentation

osg::ref_ptr<osg::Node> MWRender::SkyManager::mAtmosphereDay
private
osg::ref_ptr<osg::PositionAttitudeTransform> MWRender::SkyManager::mAtmosphereNightNode
private
float MWRender::SkyManager::mAtmosphereNightRoll
private
osg::ref_ptr<AtmosphereNightUpdater> MWRender::SkyManager::mAtmosphereNightUpdater
private
osg::ref_ptr<AtmosphereUpdater> MWRender::SkyManager::mAtmosphereUpdater
private
float MWRender::SkyManager::mCloudAnimationTimer
private
float MWRender::SkyManager::mCloudBlendFactor
private
osg::Vec4f MWRender::SkyManager::mCloudColour
private
osg::ref_ptr<osg::Node> MWRender::SkyManager::mCloudMesh
private
osg::ref_ptr<osg::Node> MWRender::SkyManager::mCloudMesh2
private
osg::ref_ptr<osg::PositionAttitudeTransform> MWRender::SkyManager::mCloudNode
private
std::string MWRender::SkyManager::mClouds
private
float MWRender::SkyManager::mCloudSpeed
private
osg::ref_ptr<CloudUpdater> MWRender::SkyManager::mCloudUpdater
private
osg::ref_ptr<CloudUpdater> MWRender::SkyManager::mCloudUpdater2
private
bool MWRender::SkyManager::mCreated
private
std::string MWRender::SkyManager::mCurrentParticleEffect
private
int MWRender::SkyManager::mDay
private
osg::ref_ptr<osg::Group> MWRender::SkyManager::mEarlyRenderBinRoot
private
bool MWRender::SkyManager::mEnabled
private
osg::Vec4f MWRender::SkyManager::mFogColour
private
bool MWRender::SkyManager::mIsStorm
private
std::auto_ptr<Moon> MWRender::SkyManager::mMasser
private
int MWRender::SkyManager::mMonth
private
osg::Vec4f MWRender::SkyManager::mMoonScriptColor
private
std::string MWRender::SkyManager::mNextClouds
private
osg::ref_ptr<osg::Node> MWRender::SkyManager::mParticleEffect
private
std::vector<osg::ref_ptr<AlphaFader> > MWRender::SkyManager::mParticleFaders
private
osg::ref_ptr<osg::PositionAttitudeTransform> MWRender::SkyManager::mParticleNode
private
std::string MWRender::SkyManager::mRainEffect
private
bool MWRender::SkyManager::mRainEnabled
private
osg::ref_ptr<RainFader> MWRender::SkyManager::mRainFader
private
float MWRender::SkyManager::mRainFrequency
private
osg::ref_ptr<osg::Group> MWRender::SkyManager::mRainNode
private
osg::ref_ptr<osgParticle::ParticleSystem> MWRender::SkyManager::mRainParticleSystem
private
osg::ref_ptr<RainShooter> MWRender::SkyManager::mRainShooter
private
float MWRender::SkyManager::mRainSpeed
private
float MWRender::SkyManager::mRainTimer
private
float MWRender::SkyManager::mRemainingTransitionTime
private
osg::ref_ptr<osg::Group> MWRender::SkyManager::mRootNode
private
Resource::SceneManager* MWRender::SkyManager::mSceneManager
private
std::auto_ptr<Moon> MWRender::SkyManager::mSecunda
private
osg::Vec4f MWRender::SkyManager::mSkyColour
private
float MWRender::SkyManager::mStarsOpacity
private
osg::Vec3f MWRender::SkyManager::mStormDirection
private
std::auto_ptr<Sun> MWRender::SkyManager::mSun
private
bool MWRender::SkyManager::mSunEnabled
private
osg::ref_ptr<UnderwaterSwitchCallback> MWRender::SkyManager::mUnderwaterSwitch
private
float MWRender::SkyManager::mWindSpeed
private

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