OpenSceneGraph 2.8.4
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
osgTerrain::Terrain Class Reference

Terrain provides a framework for loosely coupling height field data with height rendering algorithms. More...

Inheritance diagram for osgTerrain::Terrain:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Terrain ()
 Terrain (const Terrain &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 Copy constructor using CopyOp to manage deep vs shallow copy.
 META_Node (osgTerrain, Terrain)
virtual void traverse (osg::NodeVisitor &nv)
 Traverse downwards : calls children's accept method with NodeVisitor.
void setSampleRatio (float ratio)
 Set the sample ratio hint that TerrainTile should use when building geometry.
float getSampleRatio () const
 Get the sample ratio hint.
void setVerticalScale (float scale)
 Set the vertical scale hint.
float getVerticalScale () const
 Get the vertical scale hint.
TerrainTilegetTile (const TileID &tileID)
 Get the TerrainTile for a given TileID.
const TerrainTilegetTile (const TileID &tileID) const
 Get the const TerrainTile for a given TileID.
void setTerrainTechniquePrototype (TerrainTechnique *technique)
 Set the TerrainTechnique prototype from which TerrainTiles can clone the techniques from.
TerrainTechniquegetTerrainTechniquePrototype ()
 Get the TerrainTechnique prototype.
const TerrainTechniquegetTerrainTechniquePrototype () const
 Get the const TerrainTechnique protype.

Protected Types

typedef std::map< TileID,
TerrainTile * > 
TerrainTileMap
typedef std::set< TerrainTile * > TerrainTileSet

Protected Member Functions

virtual ~Terrain ()
void dirtyRegisteredTiles ()
void registerTerrainTile (TerrainTile *tile)
void unregisterTerrainTile (TerrainTile *tile)

Protected Attributes

float _sampleRatio
float _verticalScale
OpenThreads::Mutex _mutex
TerrainTileSet _terrainTileSet
TerrainTileMap _terrainTileMap
osg::ref_ptr< TerrainTechnique_terrainTechnique

Friends

class TerrainTile

Detailed Description

Terrain provides a framework for loosely coupling height field data with height rendering algorithms.

This allows TerrainTechnique's to be plugged in at runtime.


Member Typedef Documentation

typedef std::map< TileID, TerrainTile* > osgTerrain::Terrain::TerrainTileMap [protected]
typedef std::set< TerrainTile* > osgTerrain::Terrain::TerrainTileSet [protected]

Constructor & Destructor Documentation

osgTerrain::Terrain::Terrain ( )
osgTerrain::Terrain::Terrain ( const Terrain ,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
)

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osgTerrain::Terrain::~Terrain ( ) [protected, virtual]

Member Function Documentation

void osgTerrain::Terrain::dirtyRegisteredTiles ( ) [protected]
float osgTerrain::Terrain::getSampleRatio ( ) const [inline]

Get the sample ratio hint.

TerrainTechnique* osgTerrain::Terrain::getTerrainTechniquePrototype ( ) [inline]

Get the TerrainTechnique prototype.

const TerrainTechnique* osgTerrain::Terrain::getTerrainTechniquePrototype ( ) const [inline]

Get the const TerrainTechnique protype.

const TerrainTile* osgTerrain::Terrain::getTile ( const TileID tileID) const

Get the const TerrainTile for a given TileID.

TerrainTile* osgTerrain::Terrain::getTile ( const TileID tileID)

Get the TerrainTile for a given TileID.

float osgTerrain::Terrain::getVerticalScale ( ) const [inline]

Get the vertical scale hint.

osgTerrain::Terrain::META_Node ( osgTerrain  ,
Terrain   
)
void osgTerrain::Terrain::registerTerrainTile ( TerrainTile tile) [protected]
void osgTerrain::Terrain::setSampleRatio ( float  ratio) [inline]

Set the sample ratio hint that TerrainTile should use when building geometry.

Defaults to 1.0, which means use all original sample points.

void osgTerrain::Terrain::setTerrainTechniquePrototype ( TerrainTechnique technique) [inline]

Set the TerrainTechnique prototype from which TerrainTiles can clone the techniques from.

void osgTerrain::Terrain::setVerticalScale ( float  scale) [inline]

Set the vertical scale hint.

virtual void osgTerrain::Terrain::traverse ( osg::NodeVisitor ) [virtual]

Traverse downwards : calls children's accept method with NodeVisitor.

Reimplemented from osg::Group.

void osgTerrain::Terrain::unregisterTerrainTile ( TerrainTile tile) [protected]

Friends And Related Function Documentation

friend class TerrainTile [friend]

Member Data Documentation

OpenThreads::Mutex osgTerrain::Terrain::_mutex [mutable, protected]

The documentation for this class was generated from the following file:

osg logo
Generated at Sun Jan 8 2012 13:16:54 for the OpenSceneGraph by doxygen 1.7.4.