惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
P
Privacy & Cybersecurity Law Blog
SecWiki News
SecWiki News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News: Ask HN
Hacker News: Ask HN
Engineering at Meta
Engineering at Meta
Hugging Face - Blog
Hugging Face - Blog
PCI Perspectives
PCI Perspectives
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
The Exploit Database - CXSecurity.com
博客园_首页
Latest news
Latest news
T
Threat Research - Cisco Blogs
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
罗磊的独立博客
月光博客
月光博客
C
Cisco Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
Last Week in AI
Last Week in AI
Cloudbric
Cloudbric
MyScale Blog
MyScale Blog
Spread Privacy
Spread Privacy
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
G
GRAHAM CLULEY
N
News and Events Feed by Topic
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
I
InfoQ
Microsoft Security Blog
Microsoft Security Blog
人人都是产品经理
人人都是产品经理
K
Kaspersky official blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
量子位
I
Intezer
Microsoft Azure Blog
Microsoft Azure Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
A
About on SuperTechFans
D
DataBreaches.Net
宝玉的分享
宝玉的分享
S
Security @ Cisco Blogs
Help Net Security
Help Net Security
Hacker News - Newest:
Hacker News - Newest: "LLM"

博客园 - 依尔根觉罗天赫

2024年上半年实景三维相关项目建设内容 智慧城市基础设施与智能网联汽车协同发展试点城市 城市CIM基础平台需求调查结果 新城建试点城市 住建部第一批城市更新试点名单 不动产测绘包含哪些内容 CIM基础平台性能指标 日照的那片海 Cesium地下模式应用示例 nginx-1.12.2解决跨域问题nginx.conf设置参考记录 遥望北戴河 SkylineGlobe 7 版本TerraExplorer Pro二次开发快速入门 SkylineGlobe 7.0.1 & 7.0.2版本Web开发 如何实现土方量计算 SkylineGlobe 7.0.1 & 7.0.2版本Web开发 如何正确使用三维地图控件和工程树控件 SkylineGlobe TerraExplorer for Web 7.1.0版本 接口示例 如何解决一个从SkylineGlobe5版本升级到7版本遇到的小问题 Cesium如何通过addImageryProvider方法加载SkylineGlobe Server发布的WMS服务 SkylineGlobe7.0.1版本 支持SQLite(*.sqlite;*.db)数据库 SkylineGlobe7.0.1版本 通过鼠标左右平移模型对象
SkylineGlobe 7.0.1 & 7.0.2版本Web开发 如何实现对三维模型和地形的剖切展示
依尔根觉罗天赫 · 2018-08-09 · via 博客园 - 依尔根觉罗天赫

现在很多三维项目中,不仅仅要用到三维地形,正射影像和矢量数据,还会融合到各种三维模型,包括传统的3DMax手工建模,BIM,倾斜摄影自动建模,激光点云模型,三维地质体模型等等。

三维平台首先要做的是把这些多源数据承载进来,并且要能够流畅,稳定地运行使用。

接下来就是各种展示,应用,分析。

三维剖切,就是一种较好的展示复杂结构模型的方法,比如应用于BIM,室内精细建模,三维地质体模型等。

SkylineGlobe提供的核心示例代码如下:

//-------------------
        function showCrossSection(gBoxObj) {
            try {
                var SGWorld = CreateSGObj();
                    var vertices = [];
                    var sectionSize = gBoxObj.Width * 5;
                    gLastPos = gBoxObj.Position.Copy();
                    var pos = gBoxObj.Position;
                    var planeTolarance = 100 / 100;
                    if (gBoxObj.Position.Pitch == 90) {
                        var yaw = gBoxObj.Position.Yaw - 180;
                        pos = pos.Move(planeTolarance, yaw - 180, 0);  // make sure the cut area doesn't include the box
                        pos = pos.Move(gBoxObj.Width / 2, 0, -90);
                        pos = pos.Move(gBoxObj.Width / 2, yaw + 90, 0);
                        vertices[0] = pos;
                        pos = pos.Move(sectionSize, yaw - 180, 0);
                        vertices[1] = pos;
                        pos = pos.Move(gBoxObj.Width, yaw - 90, 0);
                        vertices[2] = pos;
                        pos = pos.Move(sectionSize, yaw, 0);
                        vertices[3] = pos;
                        vertices[4] = vertices[0].Move(gBoxObj.Width, 0, 90);
                        vertices[5] = vertices[1].Move(gBoxObj.Width, 0, 90);
                        vertices[6] = vertices[2].Move(gBoxObj.Width, 0, 90);
                        vertices[7] = vertices[3].Move(gBoxObj.Width, 0, 90);
                    }
                    else {
                        pos = pos.Move(planeTolarance, 0, 90);  // make sure the cut area doesn't include the box
                        pos = pos.Move(gBoxObj.Width / 2, gBoxObj.Position.Yaw, 0);
                        pos = pos.Move(gBoxObj.Width / 2, gBoxObj.Position.Yaw + 90, 0);
                        vertices[0] = pos;
                        pos = pos.Move(gBoxObj.Width, gBoxObj.Position.Yaw - 180, 0);
                        vertices[1] = pos;
                        pos = pos.Move(gBoxObj.Width, gBoxObj.Position.Yaw - 90, 0);
                        vertices[2] = pos;
                        pos = pos.Move(gBoxObj.Width, gBoxObj.Position.Yaw, 0);
                        vertices[3] = pos;
                        vertices[4] = vertices[0].Move(sectionSize, 0, 90);
                        vertices[5] = vertices[1].Move(sectionSize, 0, 90);
                        vertices[6] = vertices[2].Move(sectionSize, 0, 90);
                        vertices[7] = vertices[3].Move(sectionSize, 0, 90);
                    }

                    gGeometry = SGWorld.Creator.GeometryCreator.CreateLineStringGeometry(vertices);                    
                    SGWorld.Analysis.ShowCrossSectionBox(gGeometry, false, 0xffffffff); 
            }
            catch (err) {}
        }

        function HideCrossSectionBox()
        {
            if (syBoxobj != null) {
                var sg = CreateSGObj();
                sg.Analysis.HideCrossSectionBox();
                sg.Creator.DeleteObject(syBoxobj.ID);
                syBoxobj = null;
            }
        }

 完整的功能实现代码在C:\Program Files\Skyline\TerraExplorer Pro\Tools\CrossSection这个目录里。