This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 计算双线性内插点的值 | |
| * @param {Point} pt 目标点位 | |
| * @param {Point} p1 左上 | |
| * @param {Point} p2 右上 | |
| * @param {Point} p3 左下 | |
| * @param {Point} p4 右下 | |
| * | |
| * @returns {Number} pt的插值结果 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vec4 czm_computePosition() | |
| { | |
| vec4 p; | |
| if (czm_morphTime == 1.0) | |
| { | |
| p = czm_translateRelativeToEye(position3DHigh, position3DLow); | |
| } | |
| else if (czm_morphTime == 0.0) | |
| { | |
| p = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @description 需要 Cesium.js 环境 | |
| */ | |
| const viewer = new Cesium.Viewer("cesiumContainer"); | |
| viewer.scene.globe.depthTestAgainstTerrain = true; | |
| const handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas); | |
| handler.setInputAction(function(click){ | |
| const cart = viewer.scene.pickPosition(click.position); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Need Cesium.js 1.7x environment. | |
| */ | |
| var viewer = new Cesium.Viewer("cesiumContainer"); | |
| viewer.scene.globe.depthTestAgainstTerrain = true; | |
| viewer.camera.setView({ | |
| destination : new Cesium.Cartesian3(-2644963.9889313546, 5763731.142118295, 2199400.7089496767), //世界坐标系下的一个坐标点 | |
| orientation : {//旋转角度 | |
| heading :6.075, |
NewerOlder