涩的发甜
路人甲
路人甲
  • 注册日期2006-05-06
  • 发帖数35
  • QQ
  • 铜币304枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1794回复:1

[求助]请教SceneControl里图层设基高

楼主#
更多 发布于:2008-01-02 02:22
private void setbaseheight()<BR>        {<BR>            ISceneGraph scenegraph = axSceneControl1.SceneGraph;<BR>       <BR>            IScene scene = scenegraph.Scene;<BR>            ILayer layer;<BR>            int j;<BR>            for (j = 0; j < scene.LayerCount - 1; j++)<BR>            {
<P>                layer = scene.get_Layer(j);</P>
<P>                IRasterLayer rlayer;<BR>                rlayer = layer as IRasterLayer;<BR>                IRaster raster;<BR>                IRasterSurface rsurface = new RasterSurface();</P>
<P>                raster = (IRaster)rlayer.Raster;<BR>                ISurface surface;<BR>                IRasterBandCollection rasterbands = raster as IRasterBandCollection;<BR>                IRasterBand rasterband = rasterbands.Item(1);<BR>                rsurface.RasterBand = rasterband;<BR>                surface = rsurface as ISurface;</P>
<P>                ILayerExtensions layerextensions = rlayer as ILayerExtensions;<BR>                I3DProperties properties = new Raster3DPropertiesClass();<BR>                int i;<BR>                for (i = 0; i < layerextensions.ExtensionCount - 1; i++)<BR>                {     <BR>                   <BR>                    if ( layerextensions.get_Extension(i)!=null)<BR>                    {<BR>                        properties = (I3DProperties)layerextensions.get_Extension(i);                        <BR>                       <BR>                    }<BR>                }<BR>                properties.BaseOption = esriBaseOption.esriBaseSurface;<BR>                properties.BaseSurface = surface;<BR>           </P>
<P>                properties.Apply3DProperties(layer);<BR>                scenegraph = scene.SceneGraph;</P>
<P>                scenegraph.RefreshViewers();<BR>            }<BR>           <BR>          <BR>        }</P>


<P>请问里面哪里写错了?我运行的时候没有结果,图层还是原来平平的样子。谢谢</P>
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15945
  • QQ554730525
  • 铜币25337枚
  • 威望15352点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2008-01-03 10:12
<P>看看这个帮助</P>
<P>http://edndoc.esri.com/arcobjects/9.1/default.asp?url=/arcobjects/9.1/ComponentHelp/esri3DAnalyst/analyst3d_overview.htm</P>
<P>3D properties的设置</P>
举报 回复(0) 喜欢(0)     评分
游客

返回顶部