osgEarth 2.1.1
|
Public Member Functions | |
ImageLayerController (const Map *map) | |
void | onEnabledChanged (TerrainLayer *layer) |
void | onOpacityChanged (ImageLayer *layer) |
Public Attributes | |
ArrayUniform | _layerOpacityUniform |
ArrayUniform | _layerEnabledUniform |
ArrayUniform | _layerRangeUniform |
Private Attributes | |
MapFrame | _mapf |
Definition at line 110 of file TerrainEngineNode.
TerrainEngineNode::ImageLayerController::ImageLayerController | ( | const Map * | map | ) |
Definition at line 59 of file TerrainEngineNode.cpp.
: _mapf( map, Map::IMAGE_LAYERS, "TerrainEngineNode.ImageLayerController" ) { //nop }
void TerrainEngineNode::ImageLayerController::onEnabledChanged | ( | TerrainLayer * | layer | ) | [virtual] |
Reimplemented from osgEarth::TerrainLayerCallback.
Definition at line 67 of file TerrainEngineNode.cpp.
{ if ( !Registry::instance()->getCapabilities().supportsGLSL() ) return; _mapf.sync(); int layerNum = _mapf.indexOf( static_cast<ImageLayer*>(layer) ); if ( layerNum >= 0 ) _layerEnabledUniform.setElement( layerNum, layer->getEnabled() ); else OE_WARN << LC << "Odd, updateLayerOpacity did not find layer" << std::endl; }
void TerrainEngineNode::ImageLayerController::onOpacityChanged | ( | ImageLayer * | layer | ) | [virtual] |
Reimplemented from osgEarth::ImageLayerCallback.
Definition at line 97 of file TerrainEngineNode.cpp.
{ if ( !Registry::instance()->getCapabilities().supportsGLSL() ) return; _mapf.sync(); int layerNum = _mapf.indexOf( layer ); if ( layerNum >= 0 ) _layerOpacityUniform.setElement( layerNum, layer->getOpacity() ); else OE_WARN << LC << "Odd, onOpacityChanged did not find layer" << std::endl; }
Definition at line 118 of file TerrainEngineNode.
Definition at line 117 of file TerrainEngineNode.
Definition at line 119 of file TerrainEngineNode.
Definition at line 134 of file TerrainEngineNode.