Caelum
ImageStarfield.h
1 /*
2 This file is part of Caelum.
3 See http://www.ogre3d.org/wiki/index.php/Caelum
4 
5 Copyright (c) 2006-2008 Caelum team. See Contributors.txt for details.
6 
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.
11 
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.
16 
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/>.
19 */
20 
21 #ifndef CAELUM__IMAGE_STARFIELD_H
22 #define CAELUM__IMAGE_STARFIELD_H
23 
24 #include "CaelumPrerequisites.h"
25 #include "CameraBoundElement.h"
26 #include "PrivatePtr.h"
27 
28 namespace Caelum
29 {
34  class CAELUM_EXPORT ImageStarfield : public CameraBoundElement
35  {
36  protected:
39 
42 
45 
47  static const Ogre::String STARFIELD_DOME_NAME;
48 
50  static const Ogre::String STARFIELD_MATERIAL_NAME;
51 
54  Ogre::Degree mInclination;
55 
56  public:
57  static const String DEFAULT_TEXTURE_NAME;
58 
63  Ogre::SceneManager *sceneMgr,
64  Ogre::SceneNode *caelumRootNode,
65  const Ogre::String &textureName = DEFAULT_TEXTURE_NAME);
66 
69  virtual ~ImageStarfield ();
70 
74  void setInclination (Ogre::Degree inc);
75 
79  void update (const float time);
80 
84  void setTexture (const Ogre::String &mapName);
85 
86  public:
88  virtual void notifyCameraChanged (Ogre::Camera *cam);
89 
90  protected:
92  virtual void setFarRadius (Ogre::Real radius);
93 
94  public:
95  void setQueryFlags (uint flags) { mEntity->setQueryFlags (flags); }
96  uint getQueryFlags () const { return mEntity->getQueryFlags (); }
97  void setVisibilityFlags (uint flags) { mEntity->setVisibilityFlags (flags); }
98  uint getVisibilityFlags () const { return mEntity->getVisibilityFlags (); }
99  };
100 }
101 
102 #endif // CAELUM__IMAGE_STARFIELD_H
Image-based starfield class.
PrivateSceneNodePtr mNode
Reference to the dome node.
static const Ogre::String STARFIELD_MATERIAL_NAME
Name of the starfield material.
PrivateEntityPtr mEntity
Reference to the dome entity.
static const Ogre::String STARFIELD_DOME_NAME
Name of the spheric dome resource.
A camera-bound element.
Ogre::Degree mInclination
Inclination of the starfield.
PrivateMaterialPtr mStarfieldMaterial
Reference to the (cloned) starfield material.
Caelum namespace.
Definition: Astronomy.cpp:24