Removed hardware down sampling hack from GeoemtryTechnique and replaced with Terrain::g/setSampleRatio()

usage.
This commit is contained in:
Robert Osfield
2008-04-22 11:39:47 +00:00
parent 37bea2727b
commit 234bfeb648
4 changed files with 22 additions and 7 deletions

View File

@@ -36,6 +36,14 @@ class OSGTERRAIN_EXPORT Terrain : public osg::Group
virtual void traverse(osg::NodeVisitor& nv);
/** Set the sample ratio hint that TerrainTile should use when building geometry.
* Defaults to 1.0, which means use all original sample points.*/
void setSampleRatio(float ratio) { _sampleRatio = ratio; }
/** Get the sample ratio hint.*/
float getSampleRatio() const { return _sampleRatio; }
/** Get the TerrainTile for a given TileID.*/
TerrainTile* getTile(const TileID& tileID);
@@ -54,10 +62,11 @@ class OSGTERRAIN_EXPORT Terrain : public osg::Group
typedef std::map< TileID, TerrainTile* > TerrainTileMap;
typedef std::set< TerrainTile* > TerrainTileSet;
float _sampleRatio;
mutable OpenThreads::Mutex _mutex;
TerrainTileSet _terrainTileSet;
TerrainTileMap _terrainTileMap;
};