写在前面:由于时间和需求的关系,Cesium.js文件的解析有可能不会写完,但是能贡献一点是一点吧,我会边做边写。另外由于作者水平和时间的关系,还请大家不吝指教。Cartesian3的源码比较简单,所以我以翻译为主,辅以自己的理解等等。

Cartesian的翻译为"笛卡尔",实际上Cartesian3是来储存点的X/Y/Z坐标的,其中的方法也是服务于这一点,请大家记住这一点。以下就简称之为C3。

.fromSpherical函数:Converts the provided Spherical into Cartesian3 coordinates
                              把球形转化为C3坐标
.fromElements函数:Creates a Cartesian3 instance from x, y and z coordinates.
                              使用X/Y/Z坐标给C3赋值
.clone函数:Duplicates a Cartesian3 instance.
                   复制C3实例并返回
.fromCartesian4对象:Creates a Cartesian3 instance from an existing Cartesian4.  This simply takes the x, y, and z properties of the Cartesian4 and drops w.
                                函数方法与clone函数相同,即返回值为C3实例
.packedLength对象:The number of elements used to pack the object into an array.

返回值为3

.pack函数:Stores the provided instance into the provided array.
                  将提供的实例置入数组(可以为空)中,返回该数组
.unpack函数:Retrieves an instance from a packed array

从数组中根据位置检索一个实例并返回

array的数据结构:[ x , y , z , x , y , z , x , y , z , x ……]

.packArray函数:Flattens an array of Cartesian3s into an array of components.
                         由C3的数组转换为一维的数组,并返回
.unpackArray函数:Unpacks an array of cartesian components into an array of Cartesian3s.

由一维的数组转换为C3的数组,并返回

C3数组的数据结构:[C3_1 , C3_2 , C3_3 ……]

.fromArray对象:Creates a Cartesian3 from three consecutive elements in an array.
                         为unpack函数的返回值
.maximumComponent函数:Computes the value of the maximum component for the supplied Cartesian.
                                         计算C3中X/Y/Z的最大值并返回
.minimumComponent函数:Computes the value of the minimum component for the supplied Cartesian.
                                         计算C3中X/Y/Z的最小值并返回
.minimumByComponent函数:Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
                                            分别比较两个C3实例的X/Y/Z并返回一个各坐标均为最小的CS实例
.maximumByComponent函数:Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
                                            分别比较两个C3实例的X/Y/Z并返回一个各坐标均为最大的CS实例
.magnitudeSquared函数:Computes the provided Cartesian's squared magnitude.
                                     计算X/Y/Z的平方和并返回
.magnitude函数:Computes the Cartesian's magnitude (length).
                          进行magnitudeSquared后的根号计算并返回
.distance函数:Computes the distance between two points.
                       计算两个点之间的距离
.distanceSquared函数:Computes the squared distance between two points.  Comparing squared distances
                                  计算两点之间的距离的平方根
.normalize函数:Computes the normalized form of the supplied Cartesian.
                         计算成为统一的C3格式
.dot函数:Computes the dot (scalar) product of two Cartesians.(物理意义是什么?经常用到)
                计算两个Cartesian的点(标量)乘积
.multiplyComponents函数:Computes the componentwise product of two Cartesians.
                                        计算两个C3实例的乘积(分量积)后的C3实例
.divideComponents函数:Computes the componentwise quotient of two Cartesians.
                                     计算两个C3实例的相除(分量商)后的C3实例
.add函数:Computes the componentwise sum of two Cartesians.
                计算两个C3实例的相加(分量和)后的C3实例
.subtract函数:Computes the componentwise difference of two Cartesians.
                       计算两个C3实例的相减(分量差)后的C3实例
.multiplyByScalar函数:Multiplies the provided Cartesian componentwise by the provided scalar.
                                  计算C3实例与已知级别相乘并返回
.divideByScalar函数:Multiplies the provided Cartesian componentwise by the provided scalar.
                                  计算C3实例与已知级别相除并返回
.negate函数:Negates the provided Cartesian.
                    计算C3实例的相反数并返回
.abs函数:Computes the absolute value of the provided Cartesian.
                计算C3实例的绝对值并返回
.lerp函数:Computes the linear interpolation or extrapolation at t using the provided cartesians.
                根据t的值和两个C3实例(对t来说,一个对应的值为0,一个为1)进行内插或外推
.angleBetween函数:Returns the angle, in radians, between the provided Cartesians.
                               以弧度制单位返回两个C3实例间的角度
.mostOrthogonalAxis函数:Returns the axis that is most orthogonal to the provided Cartesian.(还不是很懂)
                                       返回与提供的C3实例正交的轴
.projectVector函数:Projects vector a onto vector b
                              把向量a投影到向量b上返回其结果
.equals函数:Compares the provided Cartesians componentwise and returns
                    比较两个C3实例是否相同
.equalsArray函数:private
                            比较C3实例是否与数组中某偏移量后的X/Y/Z相同
.equalsEpsilon函数:Compares the provided Cartesians componentwise and returns
                              根据一定的容忍度(误差圆)来判断两个C3实例是否相等
.cross函数:Computes the cross (outer) product of two Cartesians.(还不是很懂)
                  计算两个C3实例之间的叉积
.fromDegrees函数:Returns a Cartesian3 position from longitude and latitude values given in degrees.
                             由经纬度(角度单位)计算C3坐标并返回,通过调用fromRadians函数
.fromRadians函数:Returns a Cartesian3 position from longitude and latitude values given in radians.
                             由给定的经纬度(弧度单位)计算C3并返回
.fromDegreesArray函数:Returns an array of Cartesian3 positions given an array of longitude and latitude values given in degrees.
                                     由给定的经纬度(角度单位)数组生成一个C3数组并返回
.fromRadiansArray函数:Returns an array of Cartesian3 positions given an array of longitude and latitude values given in radians.
                                    由给定的经纬度(弧度单位)数组生成一个C3数组并返回
.fromDegreesArrayHeights函数:Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in degrees.
                                               由给定的坐标数据(角度单位)的数组生成一个C3数组并返回,数组数据结构如下
                                               [-115.0, 37.0, 100000.0, -107.0, 33.0, 150000.0 ……]
.fromRadiansArrayHeights函数:Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in radians.
                                              由给定的坐标数据(角度单位)的数组生成一个C3数组并返回,数组数据结构如下
                                              [-2.007, 0.645, 100000.0, -1.867, .575, 150000.0 ……]

.ZERO对象:An immutable Cartesian3 instance initialized to (0.0, 0.0, 0.0).
.UNIT_X对象:An immutable Cartesian3 instance initialized to (1.0, 0.0, 0.0).
.UNIT_Y对象:An immutable Cartesian3 instance initialized to (0.0, 1.0, 0.0).
.UNIT_Z对象:An immutable Cartesian3 instance initialized to (0.0, 0.0, 1.0).

.prototype.clone函数:Duplicates this Cartesian3 instance.
                                 调用clone函数,复制这个C3实例并返回
.prototype.equals函数:Compares this Cartesian against the provided Cartesian componentwise and returns
                                  调用equals函数,比较该实例与给定实例的相等关系
.prototype.equalsEpsilon函数:Compares this Cartesian against the provided Cartesian componentwise and returns
                                             调用equalsEpsilon函数,比较该实例域给定实例在误差范围内(给定的容忍度)的比较结果
.prototype.toString函数:Creates a string representing this Cartesian in the format '(x, y, z)'.

Cesium.js解析第一篇 Cartesian3相关推荐

  1. IT创业失败案例解析 - 第一篇

    频道:商业, 科技, 社会 类型:文章 标签:创业, IT 原文标题:6 reasons why my VC funded startup did fail(查看原文推荐) 原文作者:Stephan ...

  2. vue.js实战 第一篇 1-3章计算属性

    一.基本环境的搭建 1.引用<script src=vue.min.js> 2.容器设置<div id="app"> 指令:v-for v-if v-htm ...

  3. vue.js实战 第一篇 第七章 组件详解_组件通信

    正向数据传递props <div id="app"><my-component message="来自父组件的数据"></my-c ...

  4. IT创业失败案例解析 - 第一篇(转)

    创业启示录:创业失败报告这个系列包括30多家创业公司的失败案例分析.本文就有由其中一家IT创业公司的CTO所撰写.还是那句老话,成功的故事固然非常鼓舞人心,但我们也可以从失败故事中学到很多.以下是译文 ...

  5. html仿qq最小化怎么实现,JS仿QQ好友列表展开、收缩功能(第一篇)

    JS仿QQ好友列表展开.收缩功能(第一篇) 发布时间:2020-10-17 14:20:03 来源:脚本之家 阅读:96 作者:erdouzhang 效果图如下所示: html: 我的好友 张三 李四 ...

  6. threejs 绘制球体_Three.js 第一篇:绘制一个静态的3D球体

    第一篇就画一个球体吧 首先我们知道Three.js其实是一个3D的JS引擎,其中的强大之处就在于这个JS框架并不是依托于JQUERY来写的.那么,我们在写这一篇绘制3D球体的文章的时候,应该注意哪些地 ...

  7. Webpack系列-第一篇基础杂记

    系列文章 Webpack系列-第一篇基础杂记 Webpack系列-第二篇插件机制杂记 Webpack系列-第三篇流程杂记 前言 公司的前端项目基本都是用Webpack来做工程化的,而Webpack虽然 ...

  8. 编程书籍阅读随谈(第一篇)

    做.NET程序员也有几年了,从在大学到现在读过的编程书也的确有不少,读过.NET.Java.Python.Node.JS.底层原理等等的书籍.不知道自己学习的怎么样,但是也的确去学习过这些东西. (备 ...

  9. b2c项目基础架构分析(二)前端框架 以及补漏的第一篇名词解释

    b2c项目基础架构分析(二)前端框架 以及补漏的第一篇名词解释 继续上篇,上篇里忘记了也很重要的前端部分,今天的网站基本上是以一个启示页,然后少量的整页切换,大量的浏览器后台调用web服务局部.动态更 ...

  10. Cesium案例解析(四)——3DModels模型加载

    文章目录 1. 概述 2. 代码 3. 解析 4. 参考 1. 概述 Cesium自带的3D Models示例,展示了如何加载glTF格式三维模型数据.glTF是为WebGL量身定制的数据格式,在网络 ...

最新文章

  1. element UI框架Fr Cover主题插画下载模板V2.0
  2. 将本地项目上传到Github的两种方式 1.在线上传 2.使用Git客户端上传
  3. php ffmpeg
  4. java关键字只static
  5. ApplicationContextAware使用理解
  6. 查看Jetson系列产品JetPack的版本信息
  7. python输出去掉空格
  8. yoloV3运行速度测试报告
  9. 爱好-超级IP:超级IP
  10. 40163 php,【PHP】微信支付JsApi 40163错误,_PHP_ 少侠科技
  11. 使用ArchR分析单细胞ATAC-seq数据(第一章)
  12. 申通快递年营收253亿:净亏9亿 上年同期为盈利
  13. 学习blus老师js(1)--基础
  14. mac上开发abp-zero(三) —— 代码调试篇
  15. 【读书笔记】《谈谈方法》(笛卡尔)
  16. 力扣刷题 DAY_63 回溯
  17. git 版本回退之关于git reset --hard 和 --soft区别
  18. 阿里巴巴矢量图标库icon图标在线引用
  19. dump文件深度分析
  20. Arthas(阿尔萨斯) 的安装与使用

热门文章

  1. h5支付不能打开支付宝 ios_iOS解决H5支付跳转到支付App及返回原App问题
  2. php依赖注入框架pimple中文文档
  3. 从零基础开始学习(一) esp32 micro python编程软件环境Thonny的安装
  4. C# WebApi 返回详细错误信息
  5. 肾囊肿有什么症状呢?
  6. 傻妞对接微信公众号【4.17】
  7. Fiddler功能讲解
  8. 开发U3V时遇到bus hound报babble detect错误
  9. 只要3步,如何用Python发送通知到微信?
  10. inverted dropout(反向随机失活)正则化