我的github

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 2021-12-04 14:25  XiaoNiuFeiTian  阅读(728)  评论(0编辑  收藏  举报