AE+ArcSence简单演示三维洪水淹没(无源淹没)
private void setbasehigh(string height) { ISceneGraph scenegraph = axSceneControl1.SceneGraph; IScene scene = scenegraph.Scene; ILayer layer = scene.get_Layer(0); IRasterLayer rlayer = layer as IRasterLayer; IRasterSurface rsurface = new RasterSurface(); IRaster raster = (IRaster)rlayer.Raster; IRasterBandCollection rasterbands = raster as IRasterBandCollection; IRasterBand rasterband = rasterbands.Item(0); rsurface.RasterBand = rasterband; ISurface surface = rsurface as ISurface; ILayerExtensions layerextensions = layer as ILayerExtensions; I3DProperties properties = new Raster3DPropertiesClass(); object p3d; for (int i = 0; i < layerextensions.ExtensionCount; i++) { p3d = layerextensions.get_Extension(i); if (p3d != null) { properties = (I3DProperties)p3d; break; } } properties.BaseExpressionString = height; properties.Apply3DProperties(layer); scenegraph = scene.SceneGraph; scenegraph.RefreshViewers(); }
简单的思路就是在三维演示上,将计算出来的水淹面利用baseheight属性慢慢抬升,再利用timer控件循环,即可演示三维水淹分析