00001 /* 00002 This file is part of Caelum. 00003 See http://www.ogre3d.org/wiki/index.php/Caelum 00004 00005 Copyright (c) 2008 Caelum team. See Contributors.txt for details. 00006 00007 Caelum is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU Lesser General Public License as published 00009 by the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 Caelum is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public License 00018 along with Caelum. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 #ifndef CAELUM__MOON_H 00022 #define CAELUM__MOON_H 00023 00024 #include "CaelumPrerequisites.h" 00025 #include "SkyLight.h" 00026 00027 namespace Caelum { 00028 00033 class CAELUM_EXPORT Moon: 00034 public BaseSkyLight 00035 { 00036 public: 00038 static const Ogre::String MOON_MATERIAL_NAME; 00039 00041 static const Ogre::String MOON_BACKROUND_MATERIAL_NAME; 00042 00043 private: 00045 Ogre::BillboardSet* mMoonBB; 00046 00048 Ogre::MaterialPtr mMoonMaterial; 00049 00051 Ogre::BillboardSet* mBackBB; 00052 00054 Ogre::MaterialPtr mBackMaterial; 00055 00057 Ogre::Degree mAngularSize; 00058 00059 Ogre::GpuProgramParametersSharedPtr getFpParams(); 00060 00061 public: 00064 Moon ( 00065 Ogre::SceneManager *sceneMgr, 00066 Ogre::SceneNode *caelumRootNode, 00067 const Ogre::String& moonTextureName = "moon_disc.dds", 00068 Ogre::Degree angularSize = Ogre::Degree(3.77f)); 00069 00070 virtual ~Moon (); 00071 00075 void setMoonTexture (const Ogre::String &textureName); 00076 00080 void setMoonTextureAngularSize(const Ogre::Degree& moonTextureAngularSize); 00081 00085 void setBodyColour (const Ogre::ColourValue &colour); 00086 00088 void setPhase (Ogre::Real phase); 00089 00090 public: 00092 virtual void notifyCameraChanged (Ogre::Camera *cam); 00093 00094 virtual void setQueryFlags (uint flags); 00095 virtual uint getQueryFlags () const; 00096 virtual void setVisibilityFlags (uint flags); 00097 virtual uint getVisibilityFlags () const; 00098 }; 00099 } 00100 00101 #endif // CAELUM__MOON_H