caelum::SkyColourModel Class Reference

#include <SkyColourModel.h>

List of all members.

Public Member Functions

 SkyColourModel (const Ogre::String &skyGradients="EarthClearSky2.png", const Ogre::String &sunColours="SunGradient.png")
virtual ~SkyColourModel ()
Ogre::ColourValue getFogColour (float time, const Ogre::Vector3 &sunDir)
float getFogDensity (float time, const Ogre::Vector3 &sunDir)
Ogre::ColourValue getSunSphereColour (float time, const Ogre::Vector3 &sunDir)
Ogre::ColourValue getSunLightColour (float time, const Ogre::Vector3 &sunDir)
Ogre::ColourValue getMoonBodyColour (const Ogre::Vector3 &moonDir)
 Gets the colour of moon's body.
Ogre::ColourValue getMoonLightColour (const Ogre::Vector3 &moonDir)
 Gets the colour of moon's light.
void setSkyGradientsImage (const Ogre::String &filename)
void setSunColoursImage (const Ogre::String &filename)


Detailed Description

Class which returns various sky colours. This is based on the same gradients as the skydome. It would be nice to split it into multiple components. Functions take a "time" parameter but only elevation is actually used.

Definition at line 33 of file SkyColourModel.h.


Constructor & Destructor Documentation

caelum::SkyColourModel::SkyColourModel ( const Ogre::String &  skyGradients = "EarthClearSky2.png",
const Ogre::String &  sunColours = "SunGradient.png" 
)

Constructor method.

Definition at line 28 of file SkyColourModel.cpp.

caelum::SkyColourModel::~SkyColourModel (  )  [virtual]

Destructor.

Definition at line 41 of file SkyColourModel.cpp.


Member Function Documentation

Ogre::ColourValue caelum::SkyColourModel::getFogColour ( float  time,
const Ogre::Vector3 &  sunDir 
)

Gets the fog colour for a certain daytime.

Parameters:
time The current time.
sunDir The sun direction.
Returns:
The fog colour.

Definition at line 72 of file SkyColourModel.cpp.

float caelum::SkyColourModel::getFogDensity ( float  time,
const Ogre::Vector3 &  sunDir 
)

Gets the fog density for a certain daytime.

Parameters:
time The current time.
sunDir The sun direction.
Returns:
The fog density.

Definition at line 78 of file SkyColourModel.cpp.

Referenced by caelum::CaelumSystem::updateSubcomponents().

Ogre::ColourValue caelum::SkyColourModel::getSunSphereColour ( float  time,
const Ogre::Vector3 &  sunDir 
)

Get the colour of the sun sphere. This colour is used to draw the sun sphere in the sky.

Returns:
The colour of the sun.

Definition at line 84 of file SkyColourModel.cpp.

Referenced by caelum::CaelumSystem::updateSubcomponents().

Ogre::ColourValue caelum::SkyColourModel::getSunLightColour ( float  time,
const Ogre::Vector3 &  sunDir 
)

Gets the colour of sun light. This color is used to illuminate the scene.

Returns:
The colour of the sun's light

Definition at line 95 of file SkyColourModel.cpp.

Referenced by caelum::CaelumSystem::updateSubcomponents().

void caelum::SkyColourModel::setSkyGradientsImage ( const Ogre::String &  filename  ) 

Set the sun gradients image. resources/EarthClearSky2.png is the default image; but you can supply another

Definition at line 52 of file SkyColourModel.cpp.

void caelum::SkyColourModel::setSunColoursImage ( const Ogre::String &  filename  ) 

Set the sun colours image. Sun colour is taken from this image. 'resources/SunGradient.png' is the default image; but you can supply another

Definition at line 62 of file SkyColourModel.cpp.


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

Generated on Fri Jul 11 09:24:53 2008 for Caelum by  doxygen 1.5.6