码迷,mamicode.com
首页 > 其他好文 > 详细

定点查询

时间:2014-06-25 22:53:00      阅读:358      评论:0      收藏:0      [点我收藏+]

标签:class   tar   get   new   res   c   

//1.找到要查询的图层
            //2.找到要查询的shape
            //3设置Camera的位置
            //4刷新

ILayer pLayer = axSceneControl1.SceneGraph.Scene.get_Layer(i);
            IFeatureLayer pFeatureLayer = pLayer as IFeatureLayer;
            IFeatureClass pFeatureClass = pFeatureLayer.FeatureClass;
            IFeature pFeature = pFeatureClass.GetFeature(j);
            IPoint TargetPoint = pFeature.Shape as IPoint;
          
            IPoint CameraPoint = new PointClass();
           
            CameraPoint.X = TargetPoint.X - 100;
            CameraPoint.Y = TargetPoint.Y - 50;
            CameraPoint.Z = TargetPoint.Z + 100;

            ICamera PCaera = axSceneControl1.SceneViewer.Camera;
            PCaera.Target = TargetPoint;
            PCaera.Observer = CameraPoint;
            //IScene pScene = axSceneControl1.SceneGraph.Scene;
            axSceneControl1.SceneGraph.RefreshViewers();

定点查询,布布扣,bubuko.com

定点查询

标签:class   tar   get   new   res   c   

原文地址:http://www.cnblogs.com/shangguanjinwen/p/3804567.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!