00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SUN_H
00022 #define SUN_H
00023
00024 #include "CaelumPrerequisites.h"
00025 #include "CameraBoundElement.h"
00026 #include "SkyLight.h"
00027
00028 namespace caelum {
00029
00030 class BaseSkyLight;
00031 class SphereSun;
00032 class SpriteSun;
00033
00034 typedef SpriteSun Sun;
00035
00036
00040 class CAELUM_EXPORT SphereSun : public BaseSkyLight {
00041
00042 public:
00044 static const Ogre::String SUN_MATERIAL_NAME;
00045
00046 private:
00048 Ogre::Entity *mSunEntity;
00049
00051 Ogre::MaterialPtr mSunMaterial;
00052
00053
00054 public:
00058 SphereSun (Ogre::SceneManager *sceneMgr,
00059 Ogre::SceneNode *caelumRootNode,
00060 const Ogre::String &meshName = "sphere.mesh");
00061
00065 virtual ~SphereSun ();
00066
00070 void setBodyColour (const Ogre::ColourValue &colour);
00071
00072 public:
00074 virtual void notifyCameraChanged (Ogre::Camera *cam);
00075 };
00076
00077
00078
00082 class CAELUM_EXPORT SpriteSun : public BaseSkyLight {
00083
00084 public:
00086 static const Ogre::String SUN_MATERIAL_NAME;
00087
00088 protected:
00090 Ogre::BillboardSet* mSunBillboardSet;
00091
00093 Ogre::MaterialPtr mSunMaterial;
00094
00096 Ogre::Degree mSunTextureAngularSize;
00097
00098
00099 public:
00103 SpriteSun (Ogre::SceneManager *sceneMgr,
00104 Ogre::SceneNode *caelumRootNode,
00105 const Ogre::String& sunTextureName = "sun_disc.png",
00106 const Ogre::Degree& sunTextureAngularSize = Ogre::Degree(3.77f));
00107
00111 virtual ~SpriteSun ();
00112
00116 void setSunTexture (const Ogre::String &textureName);
00117
00121 void setSunTextureAngularSize(const Ogre::Degree& sunTextureAngularSize);
00122
00126 void setBodyColour (const Ogre::ColourValue &colour);
00127
00128 public:
00130 virtual void notifyCameraChanged (Ogre::Camera *cam);
00131 };
00132 }
00133
00134 #endif //SUN_H