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

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - 李海家

环境搭建-第01节:分布式IM即时通讯系统研发环境搭建 通过构建完整研发管理体系,建立管理机制,让技术组织聚焦目标,高效运转,同时激励团队不断优化提升 SQL Injection(SQL注入) Linux提权-权限升级 CentOS里配置.net core运行环境 ArcGIS for Enterprise的部署 CentOS 7.9 安装 git-2.21.0 CentOS 7.9 安装 node-v14.16.0 CentOS 7.9 安装 Jenkins 2.361.2 CentOS 7.9 安装 nginx-1.22.0 CentOS 7.9 安装 redis-6.2.0 CentOS 7.9 安装 mongodb5.0.13 CentOS 7.9 安装 mysql-5.7.35 45个 GIT 经典操作场景,专治不会合代码 jenkins + supervisor + ansible 实现netcore程序的多机一键部署 一个lock锁就可以分出低中高水平的程序员对问题的处置方式 JVM监控工具之JProfiler 通过hadoop + hive搭建离线式的分析系统之快速搭建一览 Nginx实战部署常用功能演示(超详细版),绝对给力~~~
Cesium 拾取 API 完全总结
李海家 · 2021-07-01 · via 博客园 - 李海家

先讲怎么用,再讲大致原理。

1 拾取坐标

> 仅拾取椭球体表面坐标

使用 Camera.prototype.pickEllipsoid 方法,接受一个必选的屏幕坐标,返回一个三维世界坐标 Cartesian3

> 拾取带地形高度的地表坐标

使用 Globe.prototype.pick 方法。需要事先使用 Camera.prototype.getPickRay 创建射线。
接受一个必选的射线对象,一个必选的 Scene 对象,返回一个三维世界坐标 Cartesian3

> 拾取三维物体的坐标

使用 Scene.prototype.pickPosition 方法。

拓展阅读
Scene.prototype.pickPositionSupported,只读字段,表示当前 Scene 是否支持拾取坐标
Scene.prototype.pickTranslucentDepth,Boolean 类型字段,使用它的前提是设置 Scene.prototype.useDepthPicking 为 true,这个 会增加性能消耗,来判断透明物体的深度

2 拾取三维物体

> 拾取 Entity 和 Primitive(包括 3D-Tiles)

使用 Scene.prototype.pick 方法,返回一个对象:

{
  primitive: Primitive | GroundPrimitive | Cesium3DTileContent | ...
  id?: Entity
}

若拾取到的是 Entity,那么返回的对象的 id 字段将为此 Entity,否则为 undefined.

还有一个 Scene.prototype.drillPick,穿透拾取的意思,与 pick 的区别就是能拾取多个点击点的三维物体。

> 拾取 DataSource 加载的数据

一样通过 Scene.prototype.pick 和 drillPick 方法拾取,接受二维屏幕坐标 Cartesian2

*拾取图层

这个功能正在推进,届时可能在 1.84 版本的 Cesium 会加入拾取图层的功能。

原理

在 Cesium 的场景组织中,有那么几个容器构成了三维世界:

Scene:包括了 Globe,除了 Globe 的元素外,还加上了 Primitive、Entity、DataSource 等三维物件
Globe:包括了 Ellipsoid,还包括了所有的影像图层、地形瓦片,可以算是椭球体上面的皮肤
Ellipsoid:一个数学公式所定义的旋转椭球体,代表一个纯粹的地球椭球形状

所以,针对不同的容器,就有不同的拾取。

拾取不准确的问题:开启深度检测

Scene.prototype.pickPositionScene.prototype.pick 和 Globe.prototype.pickRay 的准确性受深度缓存影响,所以,在深度检测不开启时,拾取的坐标会不准确。

建议开启。

viewer.scene.globe.depthTestAgainstTerrain = true