Changeset 4284


Ignore:
Timestamp:
Mar 27, 2014, 11:12:02 PM (10 years ago)
Author:
ldelgass
Message:

Fix for terrain layers: use default terrain tile size of 15 (same as .earth
loader uses)

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

Legend:

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

    r4282 r4284  
    463463
    464464void Renderer::addImageLayer(const char *name,
    465                              const osgEarth::TileSourceOptions& opts,
     465                             osgEarth::TileSourceOptions& opts,
    466466                             bool makeShared,
    467467                             bool visible)
     
    557557
    558558void Renderer::addElevationLayer(const char *name,
    559                                  const osgEarth::TileSourceOptions& opts)
    560 {
     559                                 osgEarth::TileSourceOptions& opts)
     560{
     561    if (!opts.tileSize().isSet()) {
     562        opts.tileSize() = 15;
     563    }
     564    osgEarth::ElevationLayerOptions layerOpts(name, opts);
    561565    // XXX: GDAL does not report vertical datum, it should be specified here
    562     osgEarth::ElevationLayerOptions layerOpts(name, opts);
    563566    // Common options: geodetic (default), egm96, egm84, egm2008
    564567    //layerOpts.verticalDatum() = "egm96";
     
    602605}
    603606
    604 void Renderer::addModelLayer(const char *name, const osgEarth::ModelSourceOptions& opts)
     607void Renderer::addModelLayer(const char *name, osgEarth::ModelSourceOptions& opts)
    605608{
    606609    osgEarth::ModelLayerOptions layerOpts(name, opts);
  • trunk/packages/vizservers/geovis/Renderer.h

    r4282 r4284  
    169169    }
    170170
    171     void addImageLayer(const char *name, const osgEarth::TileSourceOptions& opts,
     171    void addImageLayer(const char *name, osgEarth::TileSourceOptions& opts,
    172172                       bool makeShared = false, bool visible = true);
    173173
     
    191191    }
    192192
    193     void addElevationLayer(const char *name, const osgEarth::TileSourceOptions& opts);
     193    void addElevationLayer(const char *name, osgEarth::TileSourceOptions& opts);
    194194
    195195    void removeElevationLayer(const char *name);
     
    206206    }
    207207
    208     void addModelLayer(const char *name, const osgEarth::ModelSourceOptions& opts);
     208    void addModelLayer(const char *name, osgEarth::ModelSourceOptions& opts);
    209209
    210210    void removeModelLayer(const char *name);
Note: See TracChangeset for help on using the changeset viewer.