日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

cesium米转换经纬度_cesium 笛卡尔坐标(单位:米) 与 经纬度(单位:弧度/度) 之间的转换。...

發布時間:2023/12/4 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 cesium米转换经纬度_cesium 笛卡尔坐标(单位:米) 与 经纬度(单位:弧度/度) 之间的转换。... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

this.model.readyPromise.then(function (tileset) {

//記錄模型原始的中心點

var boundingSphere = tileset.boundingSphere;

that.boundingSphere = boundingSphere;

//模型原始的中心點。此處是笛卡爾坐標,單位:米。

var position = boundingSphere.center;

// 此處是經緯度,單位:弧度;高度單位:米。

var catographic = Cesium.Cartographic.fromCartesian(position);

var height = Number(catographic.height.toFixed(2));

// 此處是經緯度,單位:度。

var longitude = Number(Cesium.Math.toDegrees(catographic.longitude).toFixed(6));

var latitude = Number(Cesium.Math.toDegrees(catographic.latitude).toFixed(6));

that.originalCenter = { x: longitude, y: latitude, z: height };

console.log((that.config.name || "") + " 模型原始位置:" + JSON.stringify(that.originalCenter));

//offsetopt.x,y不能多次更改

updateMatrix: function (offsetopt) {

if (this.model == null) return;

console.log(" 模型修改后位置:" + JSON.stringify(offsetopt));

var boundingSphere = this.model.boundingSphere;

var catographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);

var surface = Cesium.Cartesian3.fromRadians(catographic.longitude, catographic.latitude, 0.0);

// 此處展示了,從經緯度(單位:度)-->笛卡爾坐標(單位:米)。

var offset = Cesium.Cartesian3.fromDegrees(offsetopt.x, offsetopt.y, offsetopt.z);

var translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());

this.model.modelMatrix = Cesium.Matrix4.fromTranslation(translation);

//this.model.update();

},

總結

以上是生活随笔為你收集整理的cesium米转换经纬度_cesium 笛卡尔坐标(单位:米) 与 经纬度(单位:弧度/度) 之间的转换。...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。