Changeset 92 for Swollen/swwreader


Ignore:
Timestamp:
Jun 3, 2005, 8:27:21 AM (19 years ago)
Author:
darran
Message:
  • bedslope texture only when asked
  • code cleanup (comment-out PnP gone)
  • bedslope material/stateset only used for texture
  • 'l' keyboard toggle removed
  • code for looking at global attributes of .sww file
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Swollen/swwreader/swwreader.cpp

    r82 r92  
    7272    _status.push_back( nc_get_var_int (_ncid, _volumesid, (int *) _pvolumes) );  // triangle indices
    7373    if (this->_statusHasError()) return;
     74
     75
     76        // sww file can optionally contain bedslope texture image filename
     77        size_t attlen;
     78        if( nc_inq_attlen(_ncid, NC_GLOBAL, "institution", &attlen) != NC_ENOTATT )
     79        {
     80                std::string filename;
     81                int nc_get_att_text(_ncid, NC_GLOBAL, "institution", char filename);
     82                setBedslopeTexture( std::string filename );
     83        }
    7484
    7585    // loop index
     
    105115   
    106116    // handle case of a flat bed that doesn't necessarily pass through z=0
    107     _zscale = (zrange == 0.0) ? 1.0 : 1.0 / zrange;
     117    _zscale = (zrange == 0.0) ? 1.0 : 1.0/zrange;
    108118
    109119    _xoffset = xmin;
     
    130140    _heightmin = 0.0;
    131141    _heightmax = 1.0;   
    132 
    133 
    134     // default texture map without geodata
    135     // FIXME: only use texture if specified on command line, otherwise colour
    136     _bedslopetexture = new std::string("bedslope.jpg");
    137     _bedslopegeodata.hasData = false;
    138 
    139142
    140143    osg::notify(osg::INFO) << "[SWWReader] xmin: " << xmin <<  std::endl;
Note: See TracChangeset for help on using the changeset viewer.