- Timestamp:
- Apr 7, 2016, 12:01:13 PM (9 years ago)
- Location:
- geovis/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
geovis/trunk/Placard.cpp
r6245 r6254 26 26 using namespace GeoVis; 27 27 28 Placard::Placard() 28 Placard::Placard() : 29 _enabled(true) 29 30 { 30 31 osgEarth::Symbology::TextSymbol *ts = _textStyle.getOrCreateSymbol<osgEarth::Symbology::TextSymbol>(); -
geovis/trunk/Placard.h
r6245 r6254 72 72 return _padding; 73 73 } 74 bool enabled() 75 { 76 return _enabled; 77 } 78 void setEnabled(bool state) 79 { 80 _enabled = state; 81 } 74 82 75 83 private: … … 78 86 float _padding; 79 87 osgEarth::Symbology::Style _textStyle; 88 bool _enabled; 80 89 }; 81 90 -
geovis/trunk/Renderer.cpp
r6253 r6254 1589 1589 } 1590 1590 1591 void Renderer::enablePlacard(const char *layerName, bool state) 1592 { 1593 osgEarth::ModelLayer *layer = _map->getModelLayerByName(layerName); 1594 if (layer == NULL) { 1595 ERROR("Unknown layer '%s'", layerName); 1596 return; 1597 } 1598 _placardConfigs[layerName].setEnabled(state); 1599 } 1600 1591 1601 void Renderer::setPlacardConfig(const Placard& placardConf, const char *layerName) 1592 1602 { … … 1712 1722 { 1713 1723 if (feature == NULL) return; 1724 Placard placard = getPlacardConfig(layerName); 1725 if (!placard.enabled()) 1726 return; 1714 1727 1715 1728 const osgEarth::Features::AttributeTable &attrs = feature->getAttrs(); 1716 Placard placard = getPlacardConfig(layerName);1717 1729 if (placard.getNumEntries() == 0) { 1718 1730 placard.addAllAttributes(attrs); -
geovis/trunk/Renderer.h
r6253 r6254 525 525 526 526 void writeScene(const std::string& file); 527 528 void enablePlacard(const char *layerName, bool state); 527 529 528 530 void setPlacardConfig(const Placard& placardConf, const char *layerName); -
geovis/trunk/RendererCmd.cpp
r6220 r6254 3272 3272 return TCL_ERROR; 3273 3273 } 3274 //g_renderer->enablePlacard(layerName, enable);3274 g_renderer->enablePlacard(layerName, enable); 3275 3275 return TCL_OK; 3276 3276 }
Note: See TracChangeset
for help on using the changeset viewer.