OpenSceneGraph
3.0.1
|
Terrain provides a framework for loosely coupling height field data with height rendering algorithms. More...
Public Member Functions | |
Terrain () | |
Terrain (const Terrain &, const osg::CopyOp ©op=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. | |
virtual osgTerrain::Terrain * | asTerrain () |
Convert 'this' into a Transform pointer if Node is a Terrain, otherwise return 0. | |
virtual const osgTerrain::Terrain * | asTerrain () const |
convert 'const this' into a const Terrain pointer if Node is a Terrain, otherwise return 0. | |
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. | |
void | setEqualizeBoundaries (bool equalizeBoundaries) |
If set to true the boundaries between adjacent tiles should be equalized. | |
bool | getEqualizeBoundaries () const |
If true the boundaries between adjacent tiles will be equalized. | |
void | setBlendingPolicy (TerrainTile::BlendingPolicy policy) |
Set the default policy to use when deciding whether to enable/disable blending and use of transparent bin. | |
TerrainTile::BlendingPolicy | getBlendingPolicy () const |
Get the default policy to use when deciding whether to enable/disable blending and use of transparent bin. | |
TerrainTile * | getTile (const TileID &tileID) |
Get the TerrainTile for a given TileID. | |
const TerrainTile * | getTile (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. | |
TerrainTechnique * | getTerrainTechniquePrototype () |
Get the TerrainTechnique prototype. | |
const TerrainTechnique * | getTerrainTechniquePrototype () const |
Get the const TerrainTechnique protype. | |
void | updateTerrainTileOnNextFrame (TerrainTile *terrainTile) |
Tell the Terrain node to call the terrainTile's TerrainTechnique on the next update traversal. | |
Protected Types | |
typedef std::map< TileID, TerrainTile * > | TerrainTileMap |
typedef std::set< TerrainTile * > | TerrainTileSet |
Protected Member Functions | |
virtual | ~Terrain () |
void | dirtyRegisteredTiles (int dirtyMask=TerrainTile::ALL_DIRTY) |
void | registerTerrainTile (TerrainTile *tile) |
void | unregisterTerrainTile (TerrainTile *tile) |
Protected Attributes | |
float | _sampleRatio |
float | _verticalScale |
TerrainTile::BlendingPolicy | _blendingPolicy |
bool | _equalizeBoundaries |
OpenThreads::Mutex | _mutex |
TerrainTileSet | _terrainTileSet |
TerrainTileMap | _terrainTileMap |
TerrainTileSet | _updateTerrainTileSet |
osg::ref_ptr< TerrainTechnique > | _terrainTechnique |
Friends | |
class | TerrainTile |
Terrain provides a framework for loosely coupling height field data with height rendering algorithms.
This allows TerrainTechniques to be plugged in at runtime.
typedef std::map< TileID, TerrainTile* > osgTerrain::Terrain::TerrainTileMap [protected] |
typedef std::set< TerrainTile* > osgTerrain::Terrain::TerrainTileSet [protected] |
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] |
virtual osgTerrain::Terrain* osgTerrain::Terrain::asTerrain | ( | ) | [inline, virtual] |
virtual const osgTerrain::Terrain* osgTerrain::Terrain::asTerrain | ( | ) | const [inline, virtual] |
void osgTerrain::Terrain::dirtyRegisteredTiles | ( | int | dirtyMask = TerrainTile::ALL_DIRTY | ) | [protected] |
TerrainTile::BlendingPolicy osgTerrain::Terrain::getBlendingPolicy | ( | ) | const [inline] |
Get the default policy to use when deciding whether to enable/disable blending and use of transparent bin.
bool osgTerrain::Terrain::getEqualizeBoundaries | ( | ) | const [inline] |
If true the boundaries between adjacent tiles will be equalized.
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.
TerrainTile* osgTerrain::Terrain::getTile | ( | const TileID & | tileID | ) |
Get the TerrainTile for a given TileID.
const TerrainTile* osgTerrain::Terrain::getTile | ( | const TileID & | tileID | ) | const |
Get the const 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::setBlendingPolicy | ( | TerrainTile::BlendingPolicy | policy | ) |
Set the default policy to use when deciding whether to enable/disable blending and use of transparent bin.
Note, the Terrain::BlendingPolicy value only sets the value for the TerrainTiles it encloses for the TerrainTile's that have their policy set to INHERIT. INHERIT is the default BlendingPolicy for both Terrain and TerrainTile, and if both are left to INERHIT then the policy used is ENABLE_BLENDING_WHEN_ALPHA_PRESENT.
void osgTerrain::Terrain::setEqualizeBoundaries | ( | bool | equalizeBoundaries | ) |
If set to true the boundaries between adjacent tiles should be equalized.
Note, it is only possible to equalizae boundaries when the TerrainTile's contain properly assigned TileID's, databases built with VirtualPlanetBuilder-0.9.11 and older do not set the TileID, so databases must be built with later versions of VirtualPlanetBuilder to take advantage of boundary equalization.
void osgTerrain::Terrain::setSampleRatio | ( | float | ratio | ) |
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 | ) |
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] |
void osgTerrain::Terrain::updateTerrainTileOnNextFrame | ( | TerrainTile * | terrainTile | ) |
Tell the Terrain node to call the terrainTile's TerrainTechnique on the next update traversal.
friend class TerrainTile [friend] |
bool osgTerrain::Terrain::_equalizeBoundaries [protected] |
OpenThreads::Mutex osgTerrain::Terrain::_mutex [mutable, protected] |
float osgTerrain::Terrain::_sampleRatio [protected] |
TerrainTileMap osgTerrain::Terrain::_terrainTileMap [protected] |
TerrainTileSet osgTerrain::Terrain::_terrainTileSet [protected] |
float osgTerrain::Terrain::_verticalScale [protected] |
![]() | Generated at Mon Oct 3 2011 12:39:49 for the OpenSceneGraph by doxygen 1.7.5. |