解决Skyline 6.5版本中3DML模型单体化后外部网页挂接问题
2014-08-22 14:49
183 查看
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using TerraExplorerX; ////////设置3DML单体化对象的Message ////////赵贺 namespace DXSkyline { public partial class Form1 : Form { SGWorld65 globe; IMouseInfo65 mi; I3DMLFeatureLayer65 _3dmlfeatureLayer; IWorldPointInfo65 wpi; IFeature65 theFeature; string lastID; int FPSLimitation; int framesNr; //IMeshLayer65 ml; public Form1() { InitializeComponent(); globe = new SGWorld65(); FPSLimitation = 10; } void globe_OnFrame() { framesNr++; if (framesNr < FPSLimitation) { return; } mi = globe.Window.GetMouseInfo(); wpi = globe.Window.PixelToWorld(mi.X, mi.Y); if (wpi.Type == (WorldPointType)8192 && lastID != wpi.ObjectID && wpi.ObjectID!="") { theFeature = (IFeature65)globe.ProjectTree.GetObject(wpi.ObjectID); _3dmlfeatureLayer = (I3DMLFeatureLayer65)globe.ProjectTree.GetObject(theFeature.ParentGroupID); //_3dmlfeatureLayer.FeatureProperties.Tooltip.Text = theFeature.FeatureAttributes.GetFeatureAttribute("建筑属性").Value; //wpi.ObjectID; ITerraExplorerMessage65 mm = globe.Creator.CreateMessage(MsgTargetPosition.MTP_POPUP, "www.baidu.com?" + theFeature.FeatureAttributes.GetFeatureAttribute("建筑属性").Value, MsgType.TYPE_URL); _3dmlfeatureLayer.FeatureProperties.MessageID = mm.ID; lastID = wpi.ObjectID; } framesNr = 0; } private void Form1_Load(object sender, EventArgs e) { } private void textBox1_TextChanged(object sender, EventArgs e) { FPSLimitation = int.Parse(textBox1.Text); framesNr = 0; Console.WriteLine("FPS Limitation changed: " + FPSLimitation); } private void button1_Click(object sender, EventArgs e) { globe.OnFrame += new _ISGWorld65Events_OnFrameEventHandler(globe_OnFrame); } private void button2_Click(object sender, EventArgs e) { globe.OnFrame -= new _ISGWorld65Events_OnFrameEventHandler(globe_OnFrame); } } }
相关文章推荐
- FAST FW150R软件版本升级解决一些网页无法加载问题
- Cassandra 数据模型 (基于CQL,解决胖列数量限制及灵活性问题)(1.1及以上版本)
- 解决redis在centos自带ruby版本太低问题centos 6.5 ruby环境安装2.2+
- 解决VMware6.5 以上版本安装RHEL 5的自动安装的问题
- VS2015调用低版本lib库出现“无法解析的外部符号 __snprintf ”问题的解决
- 解决cmd命令查看python版本“python不是内部命令或外部命令,也不是可执行程序解决方案”的问题
- Android工具之解决安卓6.0以上版本不能读取外部存储权限的问题
- 外部无法连接kali(内核版本4.6.0)的mysql(版本5.6.30)问题解决方案
- VMware6.5上使用NAT网络配置,解决虽能ping通本地IP且DNS正常但就是打不开网页的问题
- WebView不同版本网页自适配问题解决方案
- Windows Mobile 6.5 安装 QQ 正式版本后无法浏览 WSP 网页的问题!
- Linux相关问题-CentOS6.5 x64版本下Tomcat无法自启动的解决办法
- 解决VMware6.5 以上版本安装RHEL 5的自动安装的问题
- 解决VMware6.5 以上版本安装RHEL 5的自动安装的问题
- Centos6.5 python升级成2.7版本出现的一些问题解决方法
- 解决WebBrowser浏览器版本导致网页显示变形的问题
- 解决学习tensorflow的LSTM模型中遇到一个版本不兼容问题
- Skyline从5.1升级版本到6.5的常见接口变化问题
- 解决chrome最新版本无法正常浏览https网页的问题