2
This file is part of Caelum.
3
See http://www.ogre3d.org/wiki/index.php/Caelum
5
Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details.
7
Caelum is free software: you can redistribute it and/or modify
8
it under the terms of the GNU Lesser General Public License as published
9
by the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
12
Caelum is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU Lesser General Public License for more details.
17
You should have received a copy of the GNU Lesser General Public License
18
along with Caelum. If not, see <http://www.gnu.org/licenses/>.
24
#include "CaelumPrerequisites.h"
25
#include "CameraBoundElement.h"
29
/** A sky dome element.
30
@author Jes˙s Alonso Abad
32
class CAELUM_EXPORT SkyDome : public CameraBoundElement {
33
// Attributes -----------------------------------------------------------------
35
/** Control scene node.
37
Ogre::SceneNode *mNode;
39
/** Name of the spheric dome resource.
41
static const Ogre::String SPHERIC_DOME_NAME;
43
/** Name of the dome material.
45
static const Ogre::String SKY_DOME_MATERIAL_NAME;
47
/// Reference to the sky dome material.
48
Ogre::MaterialPtr mMaterial;
50
/// True if selected technique has shaders.
53
/// If haze is enabled.
56
// Methods --------------------------------------------------------------------
59
* This will setup some nice defaults.
60
* @param sceneMgr The scene manager where this sky dome will be created.
62
SkyDome (Ogre::SceneManager *sceneMgr, Ogre::SceneNode *caelumRootNode);
68
/** Sets the sun direction.
69
@param dir The sun light direction.
71
void setSunDirection (Ogre::Vector3 dir);
73
/// Explicit haze colour.
74
void setHazeColour (Ogre::ColourValue hazeColour);
76
/** Sets the new light absorption factor.
77
@param absorption The light absorption factor; a number in the range [0, 1], the lower, the less light the atmosphere will absorb.
79
void setLightAbsorption (float absorption) const;
81
/** Sets the light scattering factor.
82
@param scattering The light scattering factor; a number major than zero.
84
void setLightScattering (float scattering) const;
86
/** Sets the atmosphere height factor.
87
@param height The atmosphere height factor; a number in the range (0, 1].
89
void setAtmosphereHeight (float height) const;
91
/// Set the sky color gradients image.
92
void setSkyGradientsImage (const Ogre::String& gradients);
94
/// Set the atmosphere depthh gradient image.
95
void setAtmosphereDepthImage (const Ogre::String& gradients);
97
/// If skydome haze is enabled.
98
bool getHazeEnabled () const;
100
/** Enable or disable skydome haze. This makes the sky darker.
101
* By default haze is disabled.
103
void setHazeEnabled (bool value);
106
/// Handle camera change.
107
virtual void notifyCameraChanged (Ogre::Camera *cam);
110
/// Handle far radius.
111
virtual void setFarRadius (Ogre::Real radius);
114
} // namespace caelum