#include <MeshBeautifier.h>
Inheritance diagram for random_racer::MeshBeautifier:

Public Member Functions | |
| MeshBeautifier (VRSTerrainLoader *loader, int minHeight, int maxHeight) | |
| Ctor. | |
| virtual | ~MeshBeautifier () |
| Dtor. | |
| template<class ITER, class COLORV, class TEXV> | |
| void | generateColorsAndTexCoords (const ITER &begin, const ITER &end, TEXV *textureVector, COLORV *colorVector, const VRS::Vector &translation) |
| Does what this class is intended to do. | |
| void | initializeSceneThing (VRS::SO< VRS::SceneThing > thing) |
| Initializes a SceneThing with textures, materials, etc. | |
Private Member Functions | |
| unsigned int | calculateAbsHeight (int minHeight, int maxHeight) |
| Calculate the Absolute Height of the Terrain depending on the given Min. | |
| void | terLoadTextureCommand (const std::string &string) |
| A Console Command to change the Texture instant. | |
Private Attributes | |
| VRS::SO< VRS::Image > | m_gradientImage |
| Stores the Gradient Image, necessary to get the color for the vertices. | |
| VRS::SO< VRS::Texture2DGL > | m_texture |
| Stores the Textures. | |
| VRS::SO< VRS::Texture2DGL > | m_textureTemp |
| To change between two textures we need a another variable to swap the texture. | |
| VRS::SO< VRS::SceneThing > | m_thing |
| Stores the SceneThing to change the texture. | |
| VRS::SO< VRS::FaceStyle > | m_faceStyle |
| Stores the FaceStyle. | |
| VRSTerrainLoader * | m_loader |
| Stores the Pointer to the Loader, to change the color and texture instant. | |
| unsigned int | m_imageGradientWidth |
| Stores the Gradient Width and Stores the Absolute Height of the Terrain. | |
| unsigned int | m_absHeight |
| int | m_minHeight |
| Stores the Min. | |
| int | m_maxHeight |
| bool | m_newTexture |
| newTexture: true if we want to change the texture debug: true if we just want see the geometry (no texture and color) removed: true if we removed the texture from the Scenegraph grid: true if we want just see the mesh grid | |
| bool | m_debug |
| bool | m_removed |
| bool | m_grid |
Definition at line 24 of file MeshBeautifier.h.
| random_racer::MeshBeautifier::MeshBeautifier | ( | VRSTerrainLoader * | loader, | |
| int | minHeight, | |||
| int | maxHeight | |||
| ) |
Ctor.
Definition at line 26 of file MeshBeautifier.cpp.
References calculateAbsHeight(), random_racer::Console::get(), random_racer::ResourceManager::get(), m_absHeight, m_debug, m_faceStyle, m_gradientImage, m_grid, m_imageGradientWidth, m_loader, m_maxHeight, m_minHeight, m_newTexture, m_removed, m_texture, m_textureTemp, and terLoadTextureCommand().
Here is the call graph for this function:

| random_racer::MeshBeautifier::~MeshBeautifier | ( | ) | [virtual] |
| unsigned int random_racer::MeshBeautifier::calculateAbsHeight | ( | int | minHeight, | |
| int | maxHeight | |||
| ) | [private] |
Calculate the Absolute Height of the Terrain depending on the given Min.
and Max. Height
Definition at line 70 of file MeshBeautifier.cpp.
Referenced by MeshBeautifier().
Here is the caller graph for this function:

| void random_racer::MeshBeautifier::terLoadTextureCommand | ( | const std::string & | string | ) | [private] |
A Console Command to change the Texture instant.
As parameter use the the name of the texture to show the texture with its gradient or debug to just see the geometry. The texture have to be in the jpg format and the name of the gradient have to be in this structure: gradient_textureName.rgb
Definition at line 97 of file MeshBeautifier.cpp.
References random_racer::VRSTerrainLoader::beautifyMesh(), random_racer::ResourceManager::get(), random_racer::Console::get(), m_debug, m_gradientImage, m_grid, m_imageGradientWidth, m_loader, m_newTexture, m_removed, and m_textureTemp.
Referenced by MeshBeautifier().
Here is the call graph for this function:

Here is the caller graph for this function:

| void random_racer::MeshBeautifier::generateColorsAndTexCoords | ( | const ITER & | begin, | |
| const ITER & | end, | |||
| TEXV * | textureVector, | |||
| COLORV * | colorVector, | |||
| const VRS::Vector & | translation | |||
| ) |
Does what this class is intended to do.
(Read the class description)
| void random_racer::MeshBeautifier::initializeSceneThing | ( | VRS::SO< VRS::SceneThing > | thing | ) |
Initializes a SceneThing with textures, materials, etc.
VRS::SO<VRS::Image> random_racer::MeshBeautifier::m_gradientImage [private] |
Stores the Gradient Image, necessary to get the color for the vertices.
Definition at line 29 of file MeshBeautifier.h.
Referenced by MeshBeautifier(), and terLoadTextureCommand().
VRS::SO<VRS::Texture2DGL> random_racer::MeshBeautifier::m_texture [private] |
Stores the Textures.
Definition at line 34 of file MeshBeautifier.h.
Referenced by MeshBeautifier().
VRS::SO<VRS::Texture2DGL> random_racer::MeshBeautifier::m_textureTemp [private] |
To change between two textures we need a another variable to swap the texture.
Definition at line 40 of file MeshBeautifier.h.
Referenced by MeshBeautifier(), and terLoadTextureCommand().
VRS::SO<VRS::SceneThing> random_racer::MeshBeautifier::m_thing [private] |
VRS::SO<VRS::FaceStyle> random_racer::MeshBeautifier::m_faceStyle [private] |
Stores the FaceStyle.
Definition at line 50 of file MeshBeautifier.h.
Referenced by MeshBeautifier().
Stores the Pointer to the Loader, to change the color and texture instant.
Definition at line 56 of file MeshBeautifier.h.
Referenced by MeshBeautifier(), and terLoadTextureCommand().
unsigned int random_racer::MeshBeautifier::m_imageGradientWidth [private] |
Stores the Gradient Width and Stores the Absolute Height of the Terrain.
Definition at line 61 of file MeshBeautifier.h.
Referenced by MeshBeautifier(), and terLoadTextureCommand().
unsigned int random_racer::MeshBeautifier::m_absHeight [private] |
int random_racer::MeshBeautifier::m_minHeight [private] |
Stores the Min.
and Max. Height of the Terrain
Definition at line 66 of file MeshBeautifier.h.
Referenced by MeshBeautifier().
int random_racer::MeshBeautifier::m_maxHeight [private] |
bool random_racer::MeshBeautifier::m_newTexture [private] |
newTexture: true if we want to change the texture debug: true if we just want see the geometry (no texture and color) removed: true if we removed the texture from the Scenegraph grid: true if we want just see the mesh grid
Definition at line 74 of file MeshBeautifier.h.
Referenced by MeshBeautifier(), and terLoadTextureCommand().
bool random_racer::MeshBeautifier::m_debug [private] |
Definition at line 74 of file MeshBeautifier.h.
Referenced by MeshBeautifier(), and terLoadTextureCommand().
bool random_racer::MeshBeautifier::m_removed [private] |
Definition at line 74 of file MeshBeautifier.h.
Referenced by MeshBeautifier(), and terLoadTextureCommand().
bool random_racer::MeshBeautifier::m_grid [private] |
Definition at line 74 of file MeshBeautifier.h.
Referenced by MeshBeautifier(), and terLoadTextureCommand().
1.5.1