OpenMW
Public Member Functions | Private Member Functions | Private Attributes
MWRender::SkyManager Class Reference

#include <sky.hpp>

List of all members.

Public Member Functions

 SkyManager (Ogre::SceneNode *root, Ogre::Camera *pCamera)
 ~SkyManager ()
void update (float duration)
void enable ()
void disable ()
void setHour (double hour)
 will be called even when sky is disabled.
void setDate (int day, int month)
 will be called even when sky is disabled.
int getMasserPhase () const
int getSecundaPhase () const
void setMoonColour (bool red)
 change Secunda colour to red
void setWeather (const MWWorld::WeatherResult &weather)
Ogre::SceneNode * getSunNode ()
void sunEnable ()
void sunDisable ()
void setSunDirection (const Ogre::Vector3 &direction)
void setMasserDirection (const Ogre::Vector3 &direction)
void setSecundaDirection (const Ogre::Vector3 &direction)
void setMasserFade (const float fade)
void setSecundaFade (const float fade)
void masserEnable ()
void masserDisable ()
void secundaEnable ()
void secundaDisable ()
void setLightningStrength (const float factor)
void setLightningDirection (const Ogre::Vector3 &dir)
void setLightningEnabled (bool enabled)
 disable prior to map render
void setGlare (const float glare)
void setGlareEnabled (bool enabled)
Ogre::Vector3 getRealSunPos ()

Private Member Functions

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

Private Attributes

bool mCreated
bool mMoonRed
float mHour
int mDay
int mMonth
float mCloudAnimationTimer
BillboardObjectmSun
BillboardObjectmSunGlare
MoonmMasser
MoonmSecunda
Ogre::Camera * mCamera
Ogre::SceneNode * mRootNode
Ogre::SceneManager * mSceneMgr
Ogre::SceneNode * mAtmosphereDay
Ogre::SceneNode * mAtmosphereNight
std::vector
< NifOgre::ObjectScenePtr
mObjects
Ogre::String mClouds
Ogre::String mNextClouds
float mCloudBlendFactor
float mCloudOpacity
float mCloudSpeed
float mStarsOpacity
Ogre::ColourValue mCloudColour
Ogre::ColourValue mSkyColour
Ogre::ColourValue mFogColour
Ogre::Light * mLightning
float mRemainingTransitionTime
float mGlare
float mGlareFade
bool mEnabled
bool mSunEnabled
bool mMasserEnabled
bool mSecundaEnabled

Constructor & Destructor Documentation

SkyManager::SkyManager ( Ogre::SceneNode *  root,
Ogre::Camera *  pCamera 
)

Member Function Documentation

void SkyManager::create ( ) [private]

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

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

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

Ogre::SceneNode * SkyManager::getSunNode ( )
void SkyManager::setDate ( int  day,
int  month 
)

will be called even when sky is disabled.

void SkyManager::setGlare ( const float  glare)
void SkyManager::setGlareEnabled ( bool  enabled)
void SkyManager::setHour ( double  hour)

will be called even when sky is disabled.

void SkyManager::setLightningDirection ( const Ogre::Vector3 &  dir)
void SkyManager::setLightningEnabled ( bool  enabled)

disable prior to map render

Todo:
void SkyManager::setLightningStrength ( const float  factor)
void SkyManager::setMasserDirection ( const Ogre::Vector3 &  direction)
void SkyManager::setMasserFade ( const float  fade)
void SkyManager::setMoonColour ( bool  red)

change Secunda colour to red

void SkyManager::setSecundaDirection ( const Ogre::Vector3 &  direction)
void SkyManager::setSecundaFade ( const float  fade)
void SkyManager::setSunDirection ( const Ogre::Vector3 &  direction)
void SkyManager::update ( float  duration)
Todo:
improve this

Member Data Documentation

Ogre::SceneNode* MWRender::SkyManager::mAtmosphereDay [private]
Ogre::SceneNode* MWRender::SkyManager::mAtmosphereNight [private]
Ogre::Camera* MWRender::SkyManager::mCamera [private]
Ogre::ColourValue MWRender::SkyManager::mCloudColour [private]
Ogre::String MWRender::SkyManager::mClouds [private]
Ogre::ColourValue MWRender::SkyManager::mFogColour [private]
float MWRender::SkyManager::mHour [private]
Ogre::Light* MWRender::SkyManager::mLightning [private]
Ogre::String MWRender::SkyManager::mNextClouds [private]
Ogre::SceneNode* MWRender::SkyManager::mRootNode [private]
Ogre::SceneManager* MWRender::SkyManager::mSceneMgr [private]
Ogre::ColourValue MWRender::SkyManager::mSkyColour [private]

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