在官方的示例包中看到淹没分析这个模块,然后我分层设色代码如下,
ColorDictionary colorDictionary = new ColorDictionary();
colorDictionary.setColor(0, new Color(0, 150, 255));
colorDictionary.setColor(100, new Color(50, 255, 255));
HypsometricSetting mhypsometricSetting = new HypsometricSetting();
mhypsometricSetting.setDisplayMode(HypsometricSettingDisplayMode.HypsometricSettingDisplayModeFace);
mhypsometricSetting.setMinVisibleValue(0);
// mhypsometricSetting.setMaxVisibleValue(key);
mhypsometricSetting.setMaxVisibleValue(200);
mhypsometricSetting.setOpacity(150);
mhypsometricSetting.setColorDictionary(colorDictionary);
Layer3Ds layer3ds = sceneControl.getScene().getLayers();
Layer3D layer3d = layer3ds.get(0);
Layer3DOSGBFile layer3dosgbfile = (Layer3DOSGBFile) layer3d;
layer3dosgbfile.setHypsometricSetting(mhypsometricSetting);
这样并没有颜色显示到图层上?( layer3dosgbfile是三维模型图层,并且是存在的。所以应该还是分层设色的问题)