00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GROUNDFOG_H
00022 #define GROUNDFOG_H
00023
00024 #include "CaelumPrerequisites.h"
00025 #include "CameraBoundElement.h"
00026
00027 namespace caelum {
00028
00042 class CAELUM_EXPORT GroundFog: public CameraBoundElement {
00043 public:
00044 static const Ogre::String DEFAULT_PASS_NAME;
00045
00048 GroundFog (Ogre::SceneManager *scene,
00049 Ogre::SceneNode *caelumRootNode,
00050 const Ogre::String &domeMaterialName = "CaelumGroundFogDome",
00051 const Ogre::String &domeEntityName = "CaelumGroundFogDome");
00052
00055 virtual ~GroundFog ();
00056
00059 typedef std::set<Ogre::Pass *> PassSet;
00060
00065 PassSet& getPasses();
00066
00071 const PassSet& getPasses () const;
00072
00077 void findFogPassesByName (const Ogre::String& passName = DEFAULT_PASS_NAME);
00078
00080 void setDensity (Ogre::Real density);
00081
00083 Ogre::Real getDensity ();
00084
00086 void setColour (const Ogre::ColourValue &colour);
00087
00089 Ogre::ColourValue getColour ();
00090
00092 void setVerticalDecay (Ogre::Real verticalDecay);
00093
00095 Ogre::Real getVerticalDecay ();
00096
00100 void setGroundLevel (Ogre::Real GroundLevela);
00101
00104 Ogre::Real getGroundLevel ();
00105
00109 void forceUpdate ();
00110
00111 private:
00113 Ogre::Real mDensity;
00114
00116 Ogre::Real mVerticalDecay;
00117
00119 Ogre::Real mGroundLevel;
00120
00122 Ogre::ColourValue mFogColour;
00123
00125 PassSet mPasses;
00126
00128 Ogre::MaterialPtr mDomeMaterial;
00129
00131 Ogre::SceneNode *mDomeNode;
00132
00134 Ogre::Entity *mDomeEntity;
00135
00137 Ogre::SceneManager* mScene;
00138
00139
00140 void updateSkyFogging();
00141
00142 public:
00144 virtual void notifyCameraChanged (Ogre::Camera *cam);
00145
00146 protected:
00148 virtual void setFarRadius (Ogre::Real radius);
00149 };
00150
00151 }
00152
00153 #endif //GROUNDFOG_H