Changeset 6247
- Timestamp:
- Apr 5, 2016, 1:23:12 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
geovis/trunk/Renderer.cpp
r6246 r6247 1596 1596 void Renderer::selectFeatures(std::vector<unsigned long>& featureIDs, const char *layerName, bool clear) 1597 1597 { 1598 bool doPlacard = true; 1598 1599 TRACE("Select layer '%s', num features: %u", layerName, featureIDs.size()); 1599 1600 if (clear) { … … 1637 1638 #if OSGEARTH_MIN_VERSION_REQUIRED(3, 0, 0) 1638 1639 osgEarth::ObjectID id = index->getObjectID(fid); 1639 #if 0 1640 osgEarth::Features::Feature *feature = index->getFeature(id); 1641 if (feature) { 1642 // Find feature centroid 1643 osgEarth::GeoPoint location; 1644 if (feature->getGeometry()) { 1645 osg::BoundingSphered bound; 1646 feature->getWorldBound(getMapSRS(), bound); 1647 location.set(getMapSRS(), bound.center(), 1648 osgEarth::ALTMODE_ABSOLUTE); 1640 if (doPlacard) { 1641 osgEarth::Features::Feature *feature = index->getFeature(id); 1642 if (feature) { 1643 // Find feature centroid 1644 osgEarth::GeoPoint location; 1645 if (feature->getGeometry()) { 1646 osg::BoundingSphered bound; 1647 feature->getWorldBound(getMapSRS(), bound); 1648 location.set(getMapSRS(), bound.center(), 1649 osgEarth::ALTMODE_ABSOLUTE); 1650 } 1651 addPlacard(location, feature, layerName); 1649 1652 } 1650 addPlacard(location, feature, layerName);1651 1653 } 1652 #endif1653 1654 setHighlightByObjectID(id); 1654 1655 TRACE("FID %lu = OID %d", fid, id);
Note: See TracChangeset
for help on using the changeset viewer.