Caelum
InternalUtilities.h
1 /*
2 This file is part of Caelum.
3 See http://www.ogre3d.org/wiki/index.php/Caelum
4 
5 Copyright (c) 2006-2007 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_HEADER__PRIVATE_UTILITIES_H
22 #define CAELUM_HEADER__PRIVATE_UTILITIES_H
23 
24 #include "CaelumPrerequisites.h"
25 #include "PrivatePtr.h"
26 
27 namespace Caelum
28 {
33  class CAELUM_EXPORT InternalUtilities
34  {
35  public:
48  static Ogre::ColourValue getInterpolatedColour (
49  float fx,
50  float fy,
51  Ogre::Image *img,
52  bool wrapX = true);
53 
56  static const Ogre::String pointerToString(void* pointer);
57 
71  static Ogre::MaterialPtr checkLoadMaterialClone (
72  const Ogre::String& originalName,
73  const Ogre::String& cloneName);
74 
83  static Ogre::CompositorPtr checkCompositorSupported (const Ogre::String& name);
84 
85  public:
88  enum DomeType {
89  DT_SKY_DOME,
90  DT_IMAGE_STARFIELD,
91  };
92 
99  static void generateSphericDome (const Ogre::String &name, int segments, DomeType domeType);
100 
101  private:
107  static void fillGradientsDomeBuffers (float *pVertex, unsigned short *pIndices, int segments);
108 
114  static void fillStarfieldDomeBuffers (float *pVertex, unsigned short *pIndices, int segments);
115  };
116 }
117 
118 #endif // CAELUM_HEADER__PRIVATE_UTILITIES_H
Private caelum utilities.
DomeType
Enumeration of types of sky domes.
Caelum namespace.
Definition: Astronomy.cpp:24