#include <Terrain3D.h>
Collaboration diagram for Terrain3D:

Public Member Functions | |
| Terrain3D (char *path, osg::Group *terrain, int nbTree) | |
| bool | Ok () |
| osg::Geode * | getGeode () |
Protected Member Functions | |
| void | RemplitPerc (float *, unsigned char) |
| unsigned char | GetPixelColor (SDL_Surface *, int, int, int) |
| void | SetPixel (SDL_Surface *, int, int, Uint32) |
| void | TextureHeightMap () |
| void | addTrees (osg::Group *, osg::Texture2D *, float, float, float, int number, float hmin, float hmax) |
| osg::Drawable * | createBillboardDrawable (float scale, osg::StateSet *bbState, float width, float height) |
Private Attributes | |
| bool | ok |
| osg::HeightField * | HeightMap |
| osg::Geode * | HeightMapGeode |
Definition at line 33 of file Terrain3D.h.
| Terrain3D::Terrain3D | ( | char * | path, | |
| osg::Group * | terrain, | |||
| int | nbTree | |||
| ) |
Definition at line 31 of file Terrain3D.cpp.
References addTrees(), GetPixelColor(), HeightMap, HeightMapGeode, ok, RemplitPerc(), SetPixel(), and TextureHeightMap().
Here is the call graph for this function:

| bool Terrain3D::Ok | ( | ) |
| osg::Geode * Terrain3D::getGeode | ( | ) |
Definition at line 399 of file Terrain3D.cpp.
References HeightMapGeode.
Referenced by Scene3D::createScene().
| void Terrain3D::RemplitPerc | ( | float * | , | |
| unsigned | char | |||
| ) | [protected] |
| unsigned char Terrain3D::GetPixelColor | ( | SDL_Surface * | , | |
| int | , | |||
| int | , | |||
| int | ||||
| ) | [protected] |
| void Terrain3D::SetPixel | ( | SDL_Surface * | , | |
| int | , | |||
| int | , | |||
| Uint32 | ||||
| ) | [protected] |
| void Terrain3D::TextureHeightMap | ( | ) | [protected] |
Definition at line 359 of file Terrain3D.cpp.
References HeightMapGeode, and ok.
Referenced by Terrain3D().
| void Terrain3D::addTrees | ( | osg::Group * | rootNode, | |
| osg::Texture2D * | treeTexture, | |||
| float | scale, | |||
| float | width, | |||
| float | height, | |||
| int | number, | |||
| float | hmin, | |||
| float | hmax | |||
| ) | [protected] |
La méthode addTree permet d'ajouter des arbres à une position donnée. Ces arbres sont des billboards orientables selon l'axe Z
Definition at line 408 of file Terrain3D.cpp.
References createBillboardDrawable(), and HeightMap.
Referenced by Terrain3D().
Here is the call graph for this function:

| osg::Drawable * Terrain3D::createBillboardDrawable | ( | float | scale, | |
| osg::StateSet * | bbState, | |||
| float | width, | |||
| float | height | |||
| ) | [protected] |
bool Terrain3D::ok [private] |
osg::HeightField* Terrain3D::HeightMap [private] |
osg::Geode* Terrain3D::HeightMapGeode [private] |
Definition at line 45 of file Terrain3D.h.
Referenced by getGeode(), Terrain3D(), and TextureHeightMap().
1.5.1