Ignore:
Timestamp:
Aug 17, 2012, 1:52:15 AM (12 years ago)
Author:
ldelgass
Message:

Add protocol for bond style (cylinder vs. line)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/RpVtkRendererGraphicsObjs.cpp

    r3134 r3143  
    12551255}
    12561256
     1257void Renderer::setMoleculeBondStyle(const DataSetId& id, Molecule::BondStyle style)
     1258{
     1259    MoleculeHashmap::iterator itr;
     1260
     1261    bool doAll = false;
     1262
     1263    if (id.compare("all") == 0) {
     1264        itr = _molecules.begin();
     1265        doAll = true;
     1266    } else {
     1267        itr = _molecules.find(id);
     1268    }
     1269    if (itr == _molecules.end()) {
     1270        ERROR("Molecule not found: %s", id.c_str());
     1271        return;
     1272    }
     1273
     1274    do {
     1275        itr->second->setBondStyle(style);
     1276    } while (doAll && ++itr != _molecules.end());
     1277
     1278    _needsRedraw = true;
     1279}
     1280
    12571281void Renderer::setMoleculeBondColorMode(const DataSetId& id, Molecule::BondColorMode mode)
    12581282{
Note: See TracChangeset for help on using the changeset viewer.