Terrain3D Class Reference

#include <Terrain3D.h>

Collaboration diagram for Terrain3D:

Collaboration graph
[legend]

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

Detailed Description

Definition at line 33 of file Terrain3D.h.


Constructor & Destructor Documentation

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:


Member Function Documentation

bool Terrain3D::Ok (  ) 

Definition at line 394 of file Terrain3D.cpp.

References ok.

Referenced by Scene3D::createScene().

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]

Definition at line 234 of file Terrain3D.cpp.

Referenced by Terrain3D().

unsigned char Terrain3D::GetPixelColor ( SDL_Surface *  ,
int  ,
int  ,
int   
) [protected]

Definition at line 304 of file Terrain3D.cpp.

Referenced by Terrain3D().

void Terrain3D::SetPixel ( SDL_Surface *  ,
int  ,
int  ,
Uint32   
) [protected]

Definition at line 322 of file Terrain3D.cpp.

Referenced by Terrain3D().

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]

Definition at line 461 of file Terrain3D.cpp.

Referenced by addTrees().


Field Documentation

bool Terrain3D::ok [private]

Definition at line 43 of file Terrain3D.h.

Referenced by Ok(), Terrain3D(), and TextureHeightMap().

osg::HeightField* Terrain3D::HeightMap [private]

Definition at line 44 of file Terrain3D.h.

Referenced by addTrees(), and Terrain3D().

osg::Geode* Terrain3D::HeightMapGeode [private]

Definition at line 45 of file Terrain3D.h.

Referenced by getGeode(), Terrain3D(), and TextureHeightMap().


The documentation for this class was generated from the following files:
Generated on Tue Jun 5 16:57:28 2007 for Anidam by  doxygen 1.5.1