我的github
posts - 3243,  comments - 42,  views - 158万

headingpitchroll是用在orientation属性上的(比如相机的setView,flyTo,以及entities.add中)

而HeadingPitchRange

https://blog.csdn.net/kalinux/article/details/109103784

 

设置相机视角及跟踪一个移动的实体:https://blog.csdn.net/youlinhuanyan/article/details/104004360

Cesium第一视角飞行(相机跟随漫游,跟随定点转弯):https://blog.csdn.net/qq_40043761/article/details/105707054

Cesium飞行漫游,动态调整视角:https://blog.csdn.net/dahongdahong/article/details/108647230

 

总结一:

self.viewer.scene.camera.lookAtTransform(this.getModelMatrix(), new Cesium.Cartesian3(-51, -50, 50));
总结二:
var hpRange = {};
hpRange.heading = Cesium.Math.toRadians(45);//绕着Z轴旋转45度角
hpRange.pitch = Cesium.Math.toRadians(-45);//绕着Y轴旋转45度角
hpRange.range = 160;//距离160米
self.viewer.camera.lookAt(self.cartesianCoor, hpRange);
 
                                      http://qa.supermap.com/93903
 
复制代码
// 2 Set view with heading, pitch and roll
viewer.camera.setView({
    destination : cartesianPosition,
    orientation: {
        heading : Cesium.Math.toRadians(90.0), // east, default value is 0.0 (north)
        pitch : Cesium.Math.toRadians(-90),    // default value (looking down)
        roll : 0.0                             // default value
    }
});
复制代码

官方Camera:https://cesium.com/downloads/cesiumjs/releases/1.62/Build/Documentation/Camera.html?classFilter=camera

js cesium 中弧度、角度转化:https://blog.csdn.net/solocao/article/details/102836924(CesiumMath不存在toDegrees())
hpr中的heading为负值:-32.82570818482683
self.viewer.camera.heading为正值:327.17429181517315

 

 

posted on   XiaoNiuFeiTian  阅读(751)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2020-12-04 OpenLayers根据输入坐标居中定位显示功能
2019-12-04 Generalizing from a Few Examples: A Survey on Few-Shot Learning(从几个例子总结经验:少样本学习综述)
2019-12-04 Omniglot data set for one-shot learning(单样本学习数据集Omniglot)
2019-12-04 迁移学习、元学习和强化学习的区别和联系
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示