00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 #ifndef CAELUM__IMAGE_STARFIELD_H
00022 #define CAELUM__IMAGE_STARFIELD_H
00023 
00024 #include "CaelumPrerequisites.h"
00025 #include "CameraBoundElement.h"
00026 
00027 namespace Caelum
00028 {
00033     class CAELUM_EXPORT ImageStarfield : public CameraBoundElement
00034     {
00035     protected:
00037         Ogre::SceneNode *mNode;
00038 
00040         Ogre::Entity *mEntity;
00041 
00043         Ogre::MaterialPtr mStarfieldMaterial;
00044 
00046         static const Ogre::String STARFIELD_DOME_NAME;
00047 
00049         static const Ogre::String STARFIELD_MATERIAL_NAME;
00050 
00053         Ogre::Degree mInclination;
00054 
00055     public:
00056         static const String DEFAULT_TEXTURE_NAME;
00057 
00061         ImageStarfield (
00062                 Ogre::SceneManager *sceneMgr,
00063                 Ogre::SceneNode *caelumRootNode,
00064                 const Ogre::String &textureName = DEFAULT_TEXTURE_NAME);
00065 
00068         virtual ~ImageStarfield ();
00069 
00073         void setInclination (Ogre::Degree inc);
00074 
00078         void update (const float time);
00079 
00083         void setTexture (const Ogre::String &mapName);
00084 
00085     public:
00087         virtual void notifyCameraChanged (Ogre::Camera *cam);
00088 
00089     protected:
00091         virtual void setFarRadius (Ogre::Real radius);
00092 
00093     public:
00094         void setQueryFlags (uint flags) { mEntity->setQueryFlags (flags); }
00095         uint getQueryFlags () const { return mEntity->getQueryFlags (); }
00096         void setVisibilityFlags (uint flags) { mEntity->setVisibilityFlags (flags); }
00097         uint getVisibilityFlags () const { return mEntity->getVisibilityFlags (); }
00098     };
00099 }
00100 
00101 #endif // CAELUM__IMAGE_STARFIELD_H