random_racer/src/MeshBeautifier.h

Go to the documentation of this file.
00001 #ifndef _RR_MESHBEAUTIFIER_H_
00002 #define _RR_MESHBEAUTIFIER_H_
00003 
00004 #include <vrs/sharedobj.h>
00005 
00006 namespace VRS
00007 {
00008 class Image;
00009 class SceneThing;
00010 class Texture2DGL;
00011 class FaceStyle;
00012 } // namespace VRS
00013 
00014 
00015 namespace random_racer
00016 {
00017 
00018 class VRSTerrainLoader;
00019 
00024 class MeshBeautifier : public VRS::SharedObj
00025 {
00029     VRS::SO<VRS::Image>         m_gradientImage;
00030     
00034     VRS::SO<VRS::Texture2DGL>   m_texture;
00035     
00040     VRS::SO<VRS::Texture2DGL>   m_textureTemp;
00041     
00045     VRS::SO<VRS::SceneThing>    m_thing;
00046     
00050     VRS::SO<VRS::FaceStyle>          m_faceStyle;
00051     
00056     VRSTerrainLoader*           m_loader;
00057     
00061     unsigned int m_imageGradientWidth, m_absHeight;
00062     
00066     int m_minHeight, m_maxHeight;
00067     
00074     bool m_newTexture, m_debug, m_removed, m_grid;
00075     
00080     unsigned int calculateAbsHeight(int minHeight, int maxHeight);
00081     
00089     void terLoadTextureCommand(const std::string& string);
00090 
00091 public:
00095     MeshBeautifier(
00096         VRSTerrainLoader* loader, int minHeight, int maxHeight);
00097 
00101     virtual ~MeshBeautifier();
00102 
00107     template <class ITER, class COLORV, class TEXV>
00108     void generateColorsAndTexCoords(
00109         const ITER& begin,
00110         const ITER& end,
00111         TEXV* textureVector,
00112         COLORV* colorVector,
00113         const VRS::Vector& translation);
00114 
00118     void initializeSceneThing(VRS::SO<VRS::SceneThing> thing);
00119 };
00120 
00121 } // namespace random_racer
00122 
00123 #include "MeshBeautifier.tcc"
00124 
00125 #endif // _RR_MESHBEAUTIFIER_H_

Generated on Fri May 11 21:01:58 2007 for Random Racer by  doxygen 1.5.1