osgEarth 2.1.1
Public Member Functions | Public Attributes | Private Attributes

osgEarth::TerrainEngineNode::ImageLayerController Struct Reference

Inheritance diagram for osgEarth::TerrainEngineNode::ImageLayerController:
Collaboration diagram for osgEarth::TerrainEngineNode::ImageLayerController:

List of all members.

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

Detailed Description

Definition at line 110 of file TerrainEngineNode.


Constructor & Destructor Documentation

TerrainEngineNode::ImageLayerController::ImageLayerController ( const Map map)

Definition at line 59 of file TerrainEngineNode.cpp.

                                                                            :
_mapf( map, Map::IMAGE_LAYERS, "TerrainEngineNode.ImageLayerController" )
{
    //nop
}

Member Function Documentation

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;
}

Here is the call graph for this function:

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;
}

Here is the call graph for this function:


Member Data Documentation

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.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines