我的github
posts - 3243,  comments - 42,  views - 158万
复制代码
     <el-row><el-col :span="9">视角模式</el-col><el-col :span="15">
        <el-select size="mini" v-model="detail.visualAngle" placeholder="请选择视角模式" @change="onChange">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value">
          </el-option>
        </el-select>
      </el-col></el-row>
复制代码

 

复制代码
    handleFlyRoamInputChange(detail,data){
        const { visualAngle, visualClearance, visualHeight } = detail
        let camera = {
          type: "",
          followedX: Number(visualClearance),
          followedZ: Number(visualHeight)
        }
        switch (visualAngle){
          case '':
            camera.type = ""
            camera.followedX = undefined
            camera.followedZ = undefined
            break;
          case 'zdy':
            camera.type = "zdy"
            camera.followedZ = undefined
            break;
          case 'gs':
            camera.type = "gs"
            camera.followedX = undefined
            camera.followedZ = undefined
            break;
          case 'dy':
            camera.type = "dy"
            break;
          case 'sd':
            camera.type = "sd"
            camera.followedX = undefined
            break;
        }
        window.flyLine && window.flyLine.updateStyle({camera});
      },
复制代码
window.flyLine({camera})&&window.flyLine.updateStyle({camera})
复制代码
key: "updateAngle",
    value: function updateAngle(isAuto, opts) {
      if (isAuto) {
        this.entity.orientation = this.velocityOrientation; //基于移动位置自动计算方位

        this._heading = null;
        this._pitch = null;
        this._roll = null;
      } else {
        opts = opts || {};

        var position = this.position; //当前点
        var _orientation = this.orientation; //获取当前角度
        if (!position || !_orientation) return null;

        var autoHpr = (0, _matrix.getHeadingPitchRollByOrientation)(position, _orientation, this.viewer.scene.globe.ellipsoid, this._fixedFrameTransform);

        //重新赋值新角度
        var heading = autoHpr.heading;
        var pitch = Cesium.Math.toRadians(Number(opts.pitch || 0.0));
        var roll = Cesium.Math.toRadians(Number(opts.roll || 0.0));

        this._heading = heading;
        this._pitch = pitch;
        this._roll = roll;

        this.entity.orientation = Cesium.Transforms.headingPitchRollQuaternion(position, new Cesium.HeadingPitchRoll(heading, pitch, roll), this.viewer.scene.globe.ellipsoid, this._fixedFrameTransform);
      }
复制代码
复制代码
{
    key: "updateStyle",
    value: function updateStyle(params) {
      if (!this.options) return;
      for (var i in params) {
        if (_typeof(params[i]) === "object" && this.options[i]) {
          for (var key2 in params[i]) {
            this.options[i][key2] = params[i][key2];
          }
        } else {
          this.options[i] = params[i];
        }
      }
    }
复制代码

createPath

lookAtTransform:控制朝向

viewer.scene.preUpdate.addEventListener:https://www.freesion.com/article/57661009683/

 

_this._fixedFrameTransform = Cesium.defaultValue(options.fixedFrameTransform, Cesium.Transforms.eastNorthUpToFixedFrame); //参考系

posted on   XiaoNiuFeiTian  阅读(122)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2020-12-03 JavaScript如何保存全局变量(或中间变量)?
2020-12-03 基于OpenLayers和ArcGIS Server REST的要素属性信息查询和列表显示功能
2019-12-03 Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks(用于深度网络快速适应的元学习)
2018-12-03 图像中提取边缘线(轮廓)(等高线)
< 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

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