Changeset 4054


Ignore:
Timestamp:
Nov 12, 2013 11:43:30 PM (11 years ago)
Author:
ldelgass
Message:

Add method to set model layer opacity

Location:
trunk/packages/vizservers/geovis
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/geovis/Renderer.cpp

    r4036 r4054  
    301301}
    302302
     303void Renderer::setModelLayerOpacity(const char *name, double opacity)
     304{
     305#if OSGEARTH_MIN_VERSION_REQUIRED(2, 5, 0)
     306    osgEarth::ImageLayer *layer = _map->getImageLayerByName(name);
     307    if (layer != NULL) {
     308        layer->setOpacity(opacity);
     309    }
     310#endif
     311}
     312
    303313void Renderer::setModelLayerVisibility(const char *name, bool state)
    304314{
  • trunk/packages/vizservers/geovis/Renderer.h

    r4036 r4054  
    186186    void moveModelLayer(const char *name, unsigned int pos);
    187187
     188    void setModelLayerOpacity(const char *name, double opacity);
     189
    188190    void setModelLayerVisibility(const char *name, bool state);
    189191
  • trunk/packages/vizservers/geovis/RendererCmd.cpp

    r4036 r4054  
    483483    }
    484484    g_renderer->setImageLayerOpacity(name, opacity);
     485    g_renderer->setModelLayerOpacity(name, opacity);
    485486
    486487    return TCL_OK;
Note: See TracChangeset for help on using the changeset viewer.