当前位置: 首页 > news >正文

认识Cesium旋转大小变量

前文代码中有如下;矩阵乘以旋转大小,还放入mat;

Cesium.Matrix4.multiply(mat, rotationX, mat);

初看以为rotationX是一个数值,因为矩阵可以和数相乘;

但是看它的代码,rotationX是由一长串代码获得的;下面来看一下;

Cesium.Ion.defaultAccessToken = 'xxxxxx'var viewer = new Cesium.Viewer("cesiumContainer");var rotationX = Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians
(2)));alert("Rotation: "+rotationX);

 

 

rotationX还是一个矩阵;
调用了3个类的函数,最终获得这个矩阵;

radian
n:弧度,弪

Cesium.Math.toRadians,这是把数值转换为弧度;


Cesium.Matrix4,看上去应该是4*4矩阵,看一下定义,

new Cesium.Matrix4(column0Row0, column1Row0, column2Row0, column3Row0, column0Row1, column1Row1, column2Row1, column3Row1, column0Row2, column1Row2, column2Row2, column3Row2, column0Row3, column1Row3, column2Row3, column3Row3)

没错是4*4矩阵;

Cesium.Matrix3是3*3矩阵;
new Cesium.Matrix3(column0Row0, column1Row0, column2Row0, column0Row1, column1Row1, column2Row1, column0Row2, column1Row2, column2Row2)
 


 

http://www.lryc.cn/news/25311.html

相关文章:

  • 异响加持、吐槽声不断,小鹏G9难解困局
  • 【react】react18的学习
  • Ep_操作系统面试题-什么是线程,线程和进程的区别
  • 最流行的自动化测试工具,总有一款适合你(附部分教程)
  • Shell高级——进程替换vs管道
  • 国内有哪些支持定制化的低代码平台?
  • Altair 宣布将于3月举办 Future.Industry 2023 全球虚拟大会
  • react lazyLoad学习记录
  • 29 openEuler管理网络-配置网络绑定
  • RTT 全志D1s RDC2022纪念版开发板开箱使用分享与折腾记录
  • 24日常实习万得一面面径
  • MySQL的DML和DDL操作(1)
  • Kafka系列之:Kafka生产者和消费者
  • Linux进程间通信:信号量(一)
  • Python笔记一之excel的读取
  • JavaScript Number 数字对象
  • 设计模式-服务定位器模式
  • Android Dalvik虚拟机 GC流程分析
  • opencv读入图片注意事项
  • 学习渗透测试,考CISP-PTE还是考NISP-PT证书呢?
  • 记录自己遇到的关于Hashmap的面试题
  • mysql数据库之sql语句性能分析工具
  • 搭建SpringBoot项目
  • “一网统管”视频融合平台EasyCVR页面tab切换细节优化
  • 【Python入门第二十天】Python Lambda
  • 比特数据结构与算法(第四章_下)二叉树OJ(力扣:144,965,104,226,100,572)
  • 【C++】inline 内联函数
  • 如何审计一个智能合约
  • 不用PS,也能实现抠图的工具
  • 集群化存储的概述