cesium 1.17.0 → 1.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/Cesium/Cesium.js +3 -2
  3. data/app/assets/javascripts/Cesium/Core/BoundingSphere.js +158 -2
  4. data/app/assets/javascripts/Cesium/Core/BoxOutlineGeometry.js +0 -2
  5. data/app/assets/javascripts/Cesium/Core/CesiumTerrainProvider.js +1 -1
  6. data/app/assets/javascripts/Cesium/Core/CircleGeometry.js +0 -2
  7. data/app/assets/javascripts/Cesium/Core/CircleOutlineGeometry.js +0 -2
  8. data/app/assets/javascripts/Cesium/Core/CorridorOutlineGeometry.js +0 -2
  9. data/app/assets/javascripts/Cesium/Core/CylinderGeometry.js +0 -2
  10. data/app/assets/javascripts/Cesium/Core/CylinderOutlineGeometry.js +0 -2
  11. data/app/assets/javascripts/Cesium/Core/EllipseOutlineGeometry.js +0 -2
  12. data/app/assets/javascripts/Cesium/Core/EllipsoidGeometry.js +0 -2
  13. data/app/assets/javascripts/Cesium/Core/EllipsoidOutlineGeometry.js +0 -2
  14. data/app/assets/javascripts/Cesium/Core/EllipsoidTerrainProvider.js +7 -9
  15. data/app/assets/javascripts/Cesium/Core/Math.js +19 -0
  16. data/app/assets/javascripts/Cesium/Core/PolygonGeometry.js +1 -0
  17. data/app/assets/javascripts/Cesium/Core/PolygonOutlineGeometry.js +0 -2
  18. data/app/assets/javascripts/Cesium/Core/PolygonPipeline.js +5 -3
  19. data/app/assets/javascripts/Cesium/Core/PolylineVolumeOutlineGeometry.js +0 -2
  20. data/app/assets/javascripts/Cesium/Core/Rectangle.js +60 -0
  21. data/app/assets/javascripts/Cesium/Core/RectangleOutlineGeometry.js +0 -2
  22. data/app/assets/javascripts/Cesium/Core/SimplePolylineGeometry.js +0 -2
  23. data/app/assets/javascripts/Cesium/Core/SphereGeometry.js +0 -2
  24. data/app/assets/javascripts/Cesium/Core/SphereOutlineGeometry.js +0 -2
  25. data/app/assets/javascripts/Cesium/Core/WallOutlineGeometry.js +0 -2
  26. data/app/assets/javascripts/Cesium/Core/getBaseUri.js +22 -4
  27. data/app/assets/javascripts/Cesium/DataSources/CylinderGraphics.js +0 -1
  28. data/app/assets/javascripts/Cesium/Scene/ArcGisMapServerImageryProvider.js +1 -1
  29. data/app/assets/javascripts/Cesium/Scene/BingMapsImageryProvider.js +1 -1
  30. data/app/assets/javascripts/Cesium/Scene/CameraFlightPath.js +6 -4
  31. data/app/assets/javascripts/Cesium/Scene/EllipsoidSurfaceAppearance.js +0 -2
  32. data/app/assets/javascripts/Cesium/Scene/GlobeSurfaceTileProvider.js +19 -16
  33. data/app/assets/javascripts/Cesium/Scene/GoogleEarthImageryProvider.js +1 -1
  34. data/app/assets/javascripts/Cesium/Scene/GroundPrimitive.js +8 -3
  35. data/app/assets/javascripts/Cesium/Scene/ImageryLayer.js +22 -0
  36. data/app/assets/javascripts/Cesium/Scene/ImageryLayerCollection.js +1 -1
  37. data/app/assets/javascripts/Cesium/Scene/Model.js +5 -2
  38. data/app/assets/javascripts/Cesium/Scene/OpenStreetMapImageryProvider.js +1 -1
  39. data/app/assets/javascripts/Cesium/Scene/PerInstanceColorAppearance.js +0 -2
  40. data/app/assets/javascripts/Cesium/Scene/Polyline.js +0 -1
  41. data/app/assets/javascripts/Cesium/Scene/PolylineCollection.js +0 -1
  42. data/app/assets/javascripts/Cesium/Scene/PolylineColorAppearance.js +0 -2
  43. data/app/assets/javascripts/Cesium/Scene/PolylineMaterialAppearance.js +0 -1
  44. data/app/assets/javascripts/Cesium/Scene/SingleTileImageryProvider.js +1 -1
  45. data/app/assets/javascripts/Cesium/Scene/TileMapServiceImageryProvider.js +5 -0
  46. data/app/assets/javascripts/Cesium/Scene/UrlTemplateImageryProvider.js +143 -43
  47. data/app/assets/javascripts/Cesium/Scene/WebMapServiceImageryProvider.js +1 -1
  48. data/app/assets/javascripts/Cesium/Scene/WebMapTileServiceImageryProvider.js +1 -1
  49. data/app/assets/javascripts/Cesium/Scene/createOpenStreetMapImageryProvider.js +1 -1
  50. data/app/assets/javascripts/Cesium/Scene/createTileMapServiceImageryProvider.js +286 -0
  51. data/app/assets/javascripts/Cesium/Scene/modelMaterialsCommon.js +54 -9
  52. data/app/assets/javascripts/Cesium/Widgets/BaseLayerPicker/BaseLayerPicker.js +2 -2
  53. data/app/assets/javascripts/Cesium/Widgets/BaseLayerPicker/createDefaultImageryProviderViewModels.js +4 -4
  54. data/app/assets/javascripts/Cesium/Workers/cesiumWorkerBootstrapper.js +23 -1
  55. data/app/assets/javascripts/Cesium/Workers/combineGeometry.js +231 -2
  56. data/app/assets/javascripts/Cesium/Workers/createBoxGeometry.js +231 -2
  57. data/app/assets/javascripts/Cesium/Workers/createBoxOutlineGeometry.js +231 -4
  58. data/app/assets/javascripts/Cesium/Workers/createCircleGeometry.js +231 -4
  59. data/app/assets/javascripts/Cesium/Workers/createCircleOutlineGeometry.js +231 -6
  60. data/app/assets/javascripts/Cesium/Workers/createCorridorGeometry.js +231 -2
  61. data/app/assets/javascripts/Cesium/Workers/createCorridorOutlineGeometry.js +231 -4
  62. data/app/assets/javascripts/Cesium/Workers/createCylinderGeometry.js +231 -4
  63. data/app/assets/javascripts/Cesium/Workers/createCylinderOutlineGeometry.js +231 -4
  64. data/app/assets/javascripts/Cesium/Workers/createEllipseGeometry.js +231 -2
  65. data/app/assets/javascripts/Cesium/Workers/createEllipseOutlineGeometry.js +231 -4
  66. data/app/assets/javascripts/Cesium/Workers/createEllipsoidGeometry.js +231 -4
  67. data/app/assets/javascripts/Cesium/Workers/createEllipsoidOutlineGeometry.js +231 -4
  68. data/app/assets/javascripts/Cesium/Workers/createGeometry.js +231 -2
  69. data/app/assets/javascripts/Cesium/Workers/createPointGeometry.js +231 -2
  70. data/app/assets/javascripts/Cesium/Workers/createPolygonGeometry.js +237 -5
  71. data/app/assets/javascripts/Cesium/Workers/createPolygonOutlineGeometry.js +236 -7
  72. data/app/assets/javascripts/Cesium/Workers/createPolylineGeometry.js +231 -2
  73. data/app/assets/javascripts/Cesium/Workers/createPolylineVolumeGeometry.js +236 -5
  74. data/app/assets/javascripts/Cesium/Workers/createPolylineVolumeOutlineGeometry.js +236 -7
  75. data/app/assets/javascripts/Cesium/Workers/createRectangleGeometry.js +236 -5
  76. data/app/assets/javascripts/Cesium/Workers/createRectangleOutlineGeometry.js +236 -7
  77. data/app/assets/javascripts/Cesium/Workers/createSimplePolylineGeometry.js +231 -4
  78. data/app/assets/javascripts/Cesium/Workers/createSphereGeometry.js +231 -6
  79. data/app/assets/javascripts/Cesium/Workers/createSphereOutlineGeometry.js +231 -6
  80. data/app/assets/javascripts/Cesium/Workers/createVerticesFromHeightmap.js +231 -2
  81. data/app/assets/javascripts/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +231 -2
  82. data/app/assets/javascripts/Cesium/Workers/createWallGeometry.js +236 -5
  83. data/app/assets/javascripts/Cesium/Workers/createWallOutlineGeometry.js +236 -7
  84. data/app/assets/javascripts/Cesium/Workers/upsampleQuantizedTerrainMesh.js +231 -2
  85. data/lib/cesium/version.rb +1 -1
  86. data/test/dummy/log/development.log +232 -0
  87. data/test/dummy/tmp/cache/assets/C16/310/sprockets%2Fc9273e1954562144f440a71a3766c300 +0 -0
  88. data/test/dummy/tmp/cache/assets/C16/BE0/sprockets%2F730c481502395cc21463bcc305986308 +0 -0
  89. data/test/dummy/tmp/cache/assets/C3E/980/sprockets%2F00fce10d03861d2101743695f0716c66 +0 -0
  90. data/test/dummy/tmp/cache/assets/C4F/690/sprockets%2F771870445807107490b63bfd6e0b543d +0 -0
  91. data/test/dummy/tmp/cache/assets/C54/680/sprockets%2F31c6133a4541f42b507e5689b076759f +0 -0
  92. data/test/dummy/tmp/cache/assets/C5C/600/sprockets%2F6ec94c904254580e8691821109d6ad57 +0 -0
  93. data/test/dummy/tmp/cache/assets/C7C/C90/sprockets%2F92c082511a234b21cf6c479b6f507576 +0 -0
  94. data/test/dummy/tmp/cache/assets/C7D/950/sprockets%2F6c0363b13959ad48161b25b1c835657e +0 -0
  95. data/test/dummy/tmp/cache/assets/C87/860/sprockets%2F06a90e1784696233013dd6ee75e4549b +0 -0
  96. data/test/dummy/tmp/cache/assets/C91/8A0/sprockets%2Fe02395f83f6f5201913e1b888f46f645 +0 -0
  97. data/test/dummy/tmp/cache/assets/C94/D10/sprockets%2F903d696bc385f21c973d97789a31e504 +0 -0
  98. data/test/dummy/tmp/cache/assets/CA2/BC0/sprockets%2F336f5a0e85027c07c4460b10d548a7d4 +0 -0
  99. data/test/dummy/tmp/cache/assets/CA6/050/sprockets%2F0870154ae63a5f7c83121ef17d0846b2 +0 -0
  100. data/test/dummy/tmp/cache/assets/CA7/D20/sprockets%2F1f594f974f38ae85702ec10ae4233000 +0 -0
  101. data/test/dummy/tmp/cache/assets/CA7/D40/sprockets%2F09291437a41fbc8b0053920f836c4b9a +0 -0
  102. data/test/dummy/tmp/cache/assets/CAA/EF0/sprockets%2F13b3f1125490c5a2e82e24d64f780e39 +0 -0
  103. data/test/dummy/tmp/cache/assets/CAB/320/sprockets%2F78ac4929439bc866a653a2a12a2a5165 +0 -0
  104. data/test/dummy/tmp/cache/assets/CAE/630/sprockets%2F9d24d9f35a4650e41b4645c5d81b0842 +0 -0
  105. data/test/dummy/tmp/cache/assets/CB5/310/sprockets%2F2833f6b19a5ac7453729822f259b2db6 +0 -0
  106. data/test/dummy/tmp/cache/assets/CB7/A10/sprockets%2Fd34b045e6d4215367bcf6f08e4638926 +0 -0
  107. data/test/dummy/tmp/cache/assets/CB7/FA0/sprockets%2Fe11b1d418699c10ce19c92b8a8562992 +0 -0
  108. data/test/dummy/tmp/cache/assets/CB9/FD0/sprockets%2F868358f2ee30f4326e761014cd2576ee +0 -0
  109. data/test/dummy/tmp/cache/assets/CBC/B00/sprockets%2F781e0bd52bee4781ff663069a5941079 +0 -0
  110. data/test/dummy/tmp/cache/assets/CC0/3A0/sprockets%2F26cd86b84410a02a601212bd2236f6da +0 -0
  111. data/test/dummy/tmp/cache/assets/CC3/1D0/sprockets%2Fe05f83785d87559e712ef7331136b7fa +0 -0
  112. data/test/dummy/tmp/cache/assets/CC5/FB0/sprockets%2F80e0c2f9390c8a479972b8841e949cb3 +0 -0
  113. data/test/dummy/tmp/cache/assets/CD0/310/sprockets%2F825eb4414b555ce140fc46ad24b48061 +0 -0
  114. data/test/dummy/tmp/cache/assets/CD1/F00/sprockets%2F47e220bc6460ea8850265baf014525fd +0 -0
  115. data/test/dummy/tmp/cache/assets/CD3/940/sprockets%2F641b837eeb02a10631a0d20acd987887 +0 -0
  116. data/test/dummy/tmp/cache/assets/CD4/D30/sprockets%2F6741dd0454f9080fa418ed09a192ab40 +0 -0
  117. data/test/dummy/tmp/cache/assets/CD5/900/sprockets%2F0603a31cdcdf8ec2872219242c65f336 +0 -0
  118. data/test/dummy/tmp/cache/assets/CD7/AF0/sprockets%2F8ea5147f262ca0db032440670e576f7d +0 -0
  119. data/test/dummy/tmp/cache/assets/CD8/8B0/sprockets%2F27e2f83e374ba7052dc6c2281d18071e +0 -0
  120. data/test/dummy/tmp/cache/assets/CD9/830/sprockets%2F056590d09da88c9b1920143a3b37d6ea +0 -0
  121. data/test/dummy/tmp/cache/assets/CDA/700/sprockets%2F24c5884ae3352ca70a9546d02bb6e844 +0 -0
  122. data/test/dummy/tmp/cache/assets/CDC/3A0/sprockets%2F2bdb3f8510205db3f3bf4605947851f7 +0 -0
  123. data/test/dummy/tmp/cache/assets/CDC/910/sprockets%2F4127b7bf7565f5eb82a54f5012c7512d +0 -0
  124. data/test/dummy/tmp/cache/assets/CDD/5A0/sprockets%2Fb7dfa40599517f39400db36240fa16c9 +0 -0
  125. data/test/dummy/tmp/cache/assets/CDE/400/sprockets%2F1a1e6562a81a5be59fe6c205797711d3 +0 -0
  126. data/test/dummy/tmp/cache/assets/CE0/310/sprockets%2F9ee5a8c15b510b043e88f5826cc33409 +0 -0
  127. data/test/dummy/tmp/cache/assets/CE1/B10/sprockets%2Fc25147e593c0dd3f0973509a56aa92f5 +0 -0
  128. data/test/dummy/tmp/cache/assets/CE6/DD0/sprockets%2Ffd590df3a5e39763c7258802d8233c1c +0 -0
  129. data/test/dummy/tmp/cache/assets/CE8/910/sprockets%2F080f8c0b62830c954799a2d5edf591d2 +0 -0
  130. data/test/dummy/tmp/cache/assets/CE9/380/sprockets%2Fdb39605a961a8c0f9150d48ca81938f7 +0 -0
  131. data/test/dummy/tmp/cache/assets/CE9/8F0/sprockets%2F505f0e4ca77daae7369943e392a85607 +0 -0
  132. data/test/dummy/tmp/cache/assets/CEB/8A0/sprockets%2F159eb5218f66cb1523956585e1add78c +0 -0
  133. data/test/dummy/tmp/cache/assets/CEC/230/sprockets%2F06c6439d6734e9122d0429d99bd76ceb +0 -0
  134. data/test/dummy/tmp/cache/assets/CEC/9B0/sprockets%2F623d2921e3b7bd6cbe9288253e18e776 +0 -0
  135. data/test/dummy/tmp/cache/assets/CED/610/sprockets%2Fc464c2668d8d57244934c45b9a28e7ba +0 -0
  136. data/test/dummy/tmp/cache/assets/CF0/8D0/sprockets%2Fd87a027ff95cd7b9080555d76f16824a +0 -0
  137. data/test/dummy/tmp/cache/assets/CF6/3F0/sprockets%2Fc8a187687d86c86d20ccd8d39258428a +0 -0
  138. data/test/dummy/tmp/cache/assets/CF9/CA0/sprockets%2Fe3287c6767a894efd1e4461ae21599e8 +0 -0
  139. data/test/dummy/tmp/cache/assets/CFA/720/sprockets%2Fdc2ea106de9ab60be261248f21059224 +0 -0
  140. data/test/dummy/tmp/cache/assets/CFA/B50/sprockets%2F8505a240bc3a2e4b1a953417c73ebc72 +0 -0
  141. data/test/dummy/tmp/cache/assets/CFB/AB0/sprockets%2F4310d259c9d51b895d0b3c1a6eb031d2 +0 -0
  142. data/test/dummy/tmp/cache/assets/CFE/AE0/sprockets%2F7c886a80519554ea620aac2325bb1ce0 +0 -0
  143. data/test/dummy/tmp/cache/assets/CFF/860/sprockets%2F5c7d2a10419532611c629aef1e62ed3b +0 -0
  144. data/test/dummy/tmp/cache/assets/D00/C10/sprockets%2F169d5c9cc4598e63f95577f52e9da370 +0 -0
  145. data/test/dummy/tmp/cache/assets/D01/A60/sprockets%2F3ca75cfcf2037d5364e4531448da120d +0 -0
  146. data/test/dummy/tmp/cache/assets/D03/8B0/sprockets%2Febcb583b805d6193b261002efcf52067 +0 -0
  147. data/test/dummy/tmp/cache/assets/D09/100/sprockets%2Fd696fb8fbd707484e69f9815a79387d2 +0 -0
  148. data/test/dummy/tmp/cache/assets/D0B/640/sprockets%2F9366c3e436388b239ebcda0fc24520f1 +0 -0
  149. data/test/dummy/tmp/cache/assets/D0F/980/sprockets%2Fdaa14ed9a3657161c56c66483e2d17e4 +0 -0
  150. data/test/dummy/tmp/cache/assets/D10/FC0/sprockets%2F563f9f7eb632fc32ab885a1bc2127429 +0 -0
  151. data/test/dummy/tmp/cache/assets/D11/C40/sprockets%2F04aecf869ffe1036d6a34e5412b37548 +0 -0
  152. data/test/dummy/tmp/cache/assets/D14/0F0/sprockets%2Ff82e9e555d5326ff2226159aeec16c12 +0 -0
  153. data/test/dummy/tmp/cache/assets/D15/030/sprockets%2Fa5affe567dc74a8321744f5902f6d531 +0 -0
  154. data/test/dummy/tmp/cache/assets/D15/6B0/sprockets%2F3bfbac97eb5796307418d0f0e679144a +0 -0
  155. data/test/dummy/tmp/cache/assets/D16/0C0/sprockets%2F58fb9abfdb670a8502813dc88487711a +0 -0
  156. data/test/dummy/tmp/cache/assets/D16/2C0/sprockets%2Fa90ad78854c9bd1156e3866eb0e234f5 +0 -0
  157. data/test/dummy/tmp/cache/assets/D17/C50/sprockets%2Fc3f3c439bf5e484757eee298b106062a +0 -0
  158. data/test/dummy/tmp/cache/assets/D18/290/sprockets%2F5cb980f53c999c04b9b0b930dd08266e +0 -0
  159. data/test/dummy/tmp/cache/assets/D1A/670/sprockets%2F4f45089e5678ba2b1c06518bde98a7d4 +0 -0
  160. data/test/dummy/tmp/cache/assets/D1D/C90/sprockets%2Fa688522a4494897a6f6a5e6b80b0c4ff +0 -0
  161. data/test/dummy/tmp/cache/assets/D1F/FB0/sprockets%2Ff99fa88a2f4184388de53b6bb71057c3 +0 -0
  162. data/test/dummy/tmp/cache/assets/D25/A10/sprockets%2F8459d7a6e879de2a674d224bd7b960d5 +0 -0
  163. data/test/dummy/tmp/cache/assets/D26/C90/sprockets%2Fb09f146e78fc920d934ee9e19dc92284 +0 -0
  164. data/test/dummy/tmp/cache/assets/D29/F80/sprockets%2F3d888988ef5e7292bf1f181eb622b19f +0 -0
  165. data/test/dummy/tmp/cache/assets/D2C/200/sprockets%2Fea42ef470e90c4282457aaab741e1d20 +0 -0
  166. data/test/dummy/tmp/cache/assets/D34/E10/sprockets%2F74034ea037bd6434c8eb68ccf2b3026d +0 -0
  167. data/test/dummy/tmp/cache/assets/D36/990/sprockets%2F2508cad8b402c37cc09f6dfa6222c476 +0 -0
  168. data/test/dummy/tmp/cache/assets/D37/190/sprockets%2F1b0a29942409f65198f4dd0b107ddabf +0 -0
  169. data/test/dummy/tmp/cache/assets/D37/F00/sprockets%2F18060fd4371473efaa135cea6076ced7 +0 -0
  170. data/test/dummy/tmp/cache/assets/D38/5A0/sprockets%2F05c60f19fe5c929377109d0acb6bc1d2 +0 -0
  171. data/test/dummy/tmp/cache/assets/D38/C80/sprockets%2F0c40fce56bb9b9d01f5112c7974a22f7 +0 -0
  172. data/test/dummy/tmp/cache/assets/D3C/FE0/sprockets%2F24f6d543983043d0d1feefacb090196e +0 -0
  173. data/test/dummy/tmp/cache/assets/D3E/520/sprockets%2F4765d7ea3ba6a5d16231c29de0d958c4 +0 -0
  174. data/test/dummy/tmp/cache/assets/D3F/5E0/sprockets%2Fcbf1d7fac4114ec9059f87f2a0936342 +0 -0
  175. data/test/dummy/tmp/cache/assets/D48/2D0/sprockets%2F0be50e01c1aee3d2e4b1167bc704b150 +0 -0
  176. data/test/dummy/tmp/cache/assets/D49/000/sprockets%2Fd94896eee0f35a0a966393090fcc3fc1 +0 -0
  177. data/test/dummy/tmp/cache/assets/D4B/430/sprockets%2F3717d58544de674bf0f87b1fd67a45ac +0 -0
  178. data/test/dummy/tmp/cache/assets/D4B/EB0/sprockets%2F90e1f184458ccb432d9fddb8994423af +0 -0
  179. data/test/dummy/tmp/cache/assets/D51/EC0/sprockets%2F741e01ffc618da7e6ee5a5f3945c5499 +0 -0
  180. data/test/dummy/tmp/cache/assets/D53/0B0/sprockets%2F3ce0380426fadc73b3e4b21a4b305d6a +0 -0
  181. data/test/dummy/tmp/cache/assets/D55/050/sprockets%2Ff8a1519f64f695a48b04fc494d7fce19 +0 -0
  182. data/test/dummy/tmp/cache/assets/D56/850/sprockets%2F4281a0d26ca87aa5d200ac5c45dac728 +0 -0
  183. data/test/dummy/tmp/cache/assets/D59/110/sprockets%2F2ec0c121af2f7eb46d4a164c3fd75032 +0 -0
  184. data/test/dummy/tmp/cache/assets/D60/760/sprockets%2Ff2488acab1571bcae10c7c23d5f64606 +0 -0
  185. data/test/dummy/tmp/cache/assets/D63/2C0/sprockets%2Fb29b4f22c11cdf82445a279ce2b3e08b +0 -0
  186. data/test/dummy/tmp/cache/assets/D65/390/sprockets%2F5a8932bfeba07d1607613f62bf1b9e1b +0 -0
  187. data/test/dummy/tmp/cache/assets/D66/D60/sprockets%2Fd116910cf8d03281dfa078d9c81af3ca +0 -0
  188. data/test/dummy/tmp/cache/assets/D66/F50/sprockets%2F3f8db65ac02247d21db75d02af68e9b1 +0 -0
  189. data/test/dummy/tmp/cache/assets/D68/4E0/sprockets%2F013c5d547bd5e3350f8f5fe1f4eb03e3 +0 -0
  190. data/test/dummy/tmp/cache/assets/D6D/5A0/sprockets%2F93cdc99cc7adf79210460311d71cfae4 +0 -0
  191. data/test/dummy/tmp/cache/assets/D6D/DF0/sprockets%2F839c9b7b20c2a49bd9516a84bec6a61a +0 -0
  192. data/test/dummy/tmp/cache/assets/D6E/300/sprockets%2F3ad5a388b388247dd303bdbbf73b3f57 +0 -0
  193. data/test/dummy/tmp/cache/assets/D6E/470/sprockets%2F71df3138a1fe8b97f7fadb7dc1203714 +0 -0
  194. data/test/dummy/tmp/cache/assets/D6E/6D0/sprockets%2Ffc7d3ba0ef7c52a8455bf1268a29623e +0 -0
  195. data/test/dummy/tmp/cache/assets/D72/550/sprockets%2Fdc8a1e3cc36d42587cd9c5750e703e4d +0 -0
  196. data/test/dummy/tmp/cache/assets/D73/1E0/sprockets%2F2028a62d96b8b021e87ea2c9dded688a +0 -0
  197. data/test/dummy/tmp/cache/assets/D74/FD0/sprockets%2F64dbb94566f1a107a8a455fa7cb76ff4 +0 -0
  198. data/test/dummy/tmp/cache/assets/D77/AE0/sprockets%2F5668bbe7bf9792cfd8da59d01b7a1061 +0 -0
  199. data/test/dummy/tmp/cache/assets/D7A/3F0/sprockets%2Fbf3d583f5ba468586a1db5f56e52ef61 +0 -0
  200. data/test/dummy/tmp/cache/assets/D7B/230/sprockets%2F4e473cebde712a45d9879939c2e2bec1 +0 -0
  201. data/test/dummy/tmp/cache/assets/D80/4A0/sprockets%2Fc0322f552fc7ddecd97889feaf544660 +0 -0
  202. data/test/dummy/tmp/cache/assets/D8E/5F0/sprockets%2F123b3f0aaa8ab1864ed5d6e29d2167ca +0 -0
  203. data/test/dummy/tmp/cache/assets/D90/C00/sprockets%2Fab691533f1127900c07c2debabd7ff5c +0 -0
  204. data/test/dummy/tmp/cache/assets/D96/9A0/sprockets%2Fec9907bade1891db6bc20180a843cec3 +0 -0
  205. data/test/dummy/tmp/cache/assets/D96/B40/sprockets%2F90a85be6000c45257cc63dec8c1bcf8b +0 -0
  206. data/test/dummy/tmp/cache/assets/D97/3D0/sprockets%2F44b63b15cae4c6f7d5b04ed3754f41be +0 -0
  207. data/test/dummy/tmp/cache/assets/D97/A10/sprockets%2Ff1fe3b6160ec3da42f287aed3d3235c9 +0 -0
  208. data/test/dummy/tmp/cache/assets/D9C/230/sprockets%2F5126f140ae32b9557afd23d7f8cbdbc9 +0 -0
  209. data/test/dummy/tmp/cache/assets/D9D/E00/sprockets%2F62f7d32b35fb23cc6360fbedd75c6e17 +0 -0
  210. data/test/dummy/tmp/cache/assets/D9E/050/sprockets%2F6dfa22af1047cd7b6a9d6dd9611b56d6 +0 -0
  211. data/test/dummy/tmp/cache/assets/D9E/750/sprockets%2F3ab32a9aab15487d6b9be355c37dfe92 +0 -0
  212. data/test/dummy/tmp/cache/assets/D9F/790/sprockets%2F4d9649c0c0fdecf285b30fa1474b59db +0 -0
  213. data/test/dummy/tmp/cache/assets/D9F/9C0/sprockets%2Fffc7d816802d6a5085e5b3e3f93bb4aa +0 -0
  214. data/test/dummy/tmp/cache/assets/DA3/7B0/sprockets%2Fb20f9d42c879feea70b12b6fe9a7443c +0 -0
  215. data/test/dummy/tmp/cache/assets/DA7/180/sprockets%2Fd73e504186ef5af78cdf7c24cfc3f620 +0 -0
  216. data/test/dummy/tmp/cache/assets/DAA/D30/sprockets%2Fba92440f66d3ab82ccfcd4f86e899a16 +0 -0
  217. data/test/dummy/tmp/cache/assets/DAB/300/sprockets%2Fe822e0c7ed2416485de1f78ded67ed0f +0 -0
  218. data/test/dummy/tmp/cache/assets/DAE/8E0/sprockets%2Faee3dc2a887eeee336ef1893818372bd +0 -0
  219. data/test/dummy/tmp/cache/assets/DB4/5A0/sprockets%2Ff6c4c504c300bcf2baa95ca8923dcb10 +0 -0
  220. data/test/dummy/tmp/cache/assets/DBA/3B0/sprockets%2Ffd06bc030bc3ae7a13682ad3ce3e37f4 +0 -0
  221. data/test/dummy/tmp/cache/assets/DBC/A70/sprockets%2F0f7da71f1d2e23fc55bc2441e0efa41f +0 -0
  222. data/test/dummy/tmp/cache/assets/DBD/040/sprockets%2Fbab3c9aeedf12b684be7a100458ad308 +0 -0
  223. data/test/dummy/tmp/cache/assets/DC6/BB0/sprockets%2Fc650cd342bf1d6306bf614ebcebe56f6 +0 -0
  224. data/test/dummy/tmp/cache/assets/DC8/670/sprockets%2F47b5310b4dbf58b2b8dcd6ba98c05db6 +0 -0
  225. data/test/dummy/tmp/cache/assets/DC8/9E0/sprockets%2F0fad3b3f1ed38ea3041c6f6f382c79da +0 -0
  226. data/test/dummy/tmp/cache/assets/DCB/D50/sprockets%2F285bfff127e41bfcab2ce7941eba9343 +0 -0
  227. data/test/dummy/tmp/cache/assets/DCF/180/sprockets%2Fa0fb6e0ea7cad056e5e49e3d875c40d8 +0 -0
  228. data/test/dummy/tmp/cache/assets/DCF/6F0/sprockets%2Fb35295b9c0ed38dd040ea475edfea37f +0 -0
  229. data/test/dummy/tmp/cache/assets/DCF/AC0/sprockets%2Fca3f2c931d05fd9271edb9db0f19c92f +0 -0
  230. data/test/dummy/tmp/cache/assets/DD3/150/sprockets%2Fbae8affcbd247de88930e215e7d4d460 +0 -0
  231. data/test/dummy/tmp/cache/assets/DDE/D00/sprockets%2F74c27cac3ef959ecc8cfd9327b7fa334 +0 -0
  232. data/test/dummy/tmp/cache/assets/DEA/980/sprockets%2Fc5897a1f996aafff34f555f76a39fbbd +0 -0
  233. data/test/dummy/tmp/cache/assets/DEE/930/sprockets%2F8e899ec8a7afe2577634ef981ccabcc9 +0 -0
  234. data/test/dummy/tmp/cache/assets/E01/7D0/sprockets%2F771e23888dbed36f017cbb35acdbc8df +0 -0
  235. data/test/dummy/tmp/cache/assets/E02/460/sprockets%2Febdaa5d81edadcf19f17470971a692df +0 -0
  236. data/test/dummy/tmp/cache/assets/E03/8C0/sprockets%2Fdddca472be9884cdfe6af78222bad074 +0 -0
  237. data/test/dummy/tmp/cache/assets/E04/730/sprockets%2F583c8db59edef3f0c5b7e336e284babb +0 -0
  238. data/test/dummy/tmp/cache/assets/E14/5A0/sprockets%2F4ac5be9007bc8bebc81dcabe902b021c +0 -0
  239. data/test/dummy/tmp/cache/assets/E28/A80/sprockets%2F34a8d9e9cbd7a2a5178da0afbf4e10fd +0 -0
  240. data/test/dummy/tmp/cache/assets/E2A/FC0/sprockets%2Fa90fba67cf290f1ae5d51b9ccd74fbb4 +0 -0
  241. data/test/dummy/tmp/cache/assets/E2F/3D0/sprockets%2F3d8aa6ffceaf05eefca73ce469e71222 +0 -0
  242. data/test/dummy/tmp/cache/assets/E2F/8C0/sprockets%2Fb333cacd9aae969cf4e25ce0dddd4277 +0 -0
  243. data/test/dummy/tmp/cache/assets/E31/6E0/sprockets%2Ff305b61e7fa499ad2504bfebb9e7edea +0 -0
  244. data/test/dummy/tmp/cache/assets/E3E/2D0/sprockets%2F4e7fda6ffbcb5a5f816cf91cd5d723f9 +0 -0
  245. data/test/dummy/tmp/cache/assets/E67/7C0/sprockets%2F5fdef75e5fc94f4672cbbce2d4bde3a4 +0 -0
  246. data/test/dummy/tmp/cache/assets/E84/C40/sprockets%2Fd1b7fa85aeb3b0eff54ea8518ca3cbdc +0 -0
  247. data/test/dummy/tmp/cache/assets/E96/510/sprockets%2Ff3dd99b915fbacd1c6e7ebcf916b5abf +0 -0
  248. data/test/dummy/tmp/cache/assets/EB0/300/sprockets%2Fe4bacccace2941a1a8ddfbdd97b2ad82 +0 -0
  249. data/test/dummy/tmp/data/meta_request/77d9256eaba827554162b22cbae039d3.json +1 -0
  250. data/test/dummy/tmp/data/meta_request/99e35f127878b47fbca1bfd42a6d2e7d.json +1 -0
  251. data/test/dummy/tmp/data/meta_request/e7dac870e053aa6dabbeeac8d5913303.json +1 -0
  252. data/test/dummy/tmp/data/meta_request/fc7d26c7d98a6058081869da8c253f3c.json +1 -0
  253. data/test/dummy/tmp/pids/server.pid +1 -0
  254. metadata +19 -2
@@ -1133,6 +1133,23 @@ define('Core/Math',[
1133
1133
  return 2.0 * radius * Math.sin(angle * 0.5);
1134
1134
  };
1135
1135
 
1136
+ /**
1137
+ * Finds the logarithm of a number to a base.
1138
+ *
1139
+ * @param {Number} number The number.
1140
+ * @param {Number} base The base.
1141
+ * @returns {Number} The result.
1142
+ */
1143
+ CesiumMath.logBase = function(number, base) {
1144
+ if (!defined(number)) {
1145
+ throw new DeveloperError('number is required.');
1146
+ }
1147
+ if (!defined(base)) {
1148
+ throw new DeveloperError('base is required.');
1149
+ }
1150
+ return Math.log(number) / Math.log(base);
1151
+ };
1152
+
1136
1153
  /**
1137
1154
  * @private
1138
1155
  */
@@ -9136,6 +9153,62 @@ define('Core/Rectangle',[
9136
9153
  return result;
9137
9154
  };
9138
9155
 
9156
+ /**
9157
+ * Computes a rectangle that is the union of two rectangles.
9158
+ *
9159
+ * @param {Rectangle} rectangle A rectangle to enclose in rectangle.
9160
+ * @param {Rectangle} otherRectangle A rectangle to enclose in a rectangle.
9161
+ * @param {Rectangle} [result] The object onto which to store the result.
9162
+ * @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
9163
+ */
9164
+ Rectangle.union = function(rectangle, otherRectangle, result) {
9165
+ if (!defined(rectangle)) {
9166
+ throw new DeveloperError('rectangle is required');
9167
+ }
9168
+ if (!defined(otherRectangle)) {
9169
+ throw new DeveloperError('otherRectangle is required.');
9170
+ }
9171
+
9172
+ if (!defined(result)) {
9173
+ result = new Rectangle();
9174
+ }
9175
+
9176
+ result.west = Math.min(rectangle.west, otherRectangle.west);
9177
+ result.south = Math.min(rectangle.south, otherRectangle.south);
9178
+ result.east = Math.max(rectangle.east, otherRectangle.east);
9179
+ result.north = Math.max(rectangle.north, otherRectangle.north);
9180
+
9181
+ return result;
9182
+ };
9183
+
9184
+ /**
9185
+ * Computes a rectangle by enlarging the provided rectangle until it contains the provided cartographic.
9186
+ *
9187
+ * @param {Rectangle} rectangle A rectangle to expand.
9188
+ * @param {Cartographic} cartographic A cartographic to enclose in a rectangle.
9189
+ * @param {Rectangle} [result] The object onto which to store the result.
9190
+ * @returns {Rectangle} The modified result parameter or a new Rectangle instance if one was not provided.
9191
+ */
9192
+ Rectangle.expand = function(rectangle, cartographic, result) {
9193
+ if (!defined(rectangle)) {
9194
+ throw new DeveloperError('rectangle is required.');
9195
+ }
9196
+ if (!defined(cartographic)) {
9197
+ throw new DeveloperError('cartographic is required.');
9198
+ }
9199
+
9200
+ if (!defined(result)) {
9201
+ result = new Rectangle();
9202
+ }
9203
+
9204
+ result.west = Math.min(rectangle.west, cartographic.longitude);
9205
+ result.south = Math.min(rectangle.south, cartographic.latitude);
9206
+ result.east = Math.max(rectangle.east, cartographic.longitude);
9207
+ result.north = Math.max(rectangle.north, cartographic.latitude);
9208
+
9209
+ return result;
9210
+ };
9211
+
9139
9212
  /**
9140
9213
  * Returns true if the cartographic is on or inside the rectangle, false otherwise.
9141
9214
  *
@@ -9582,7 +9655,6 @@ define('Core/BoundingSphere',[
9582
9655
  * @param {BoundingSphere} [result] The object onto which to store the result.
9583
9656
  * @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
9584
9657
  *
9585
- *
9586
9658
  * @example
9587
9659
  * // Compute the bounding sphere from 3 positions, each specified relative to a center.
9588
9660
  * // In addition to the X, Y, and Z coordinates, the points array contains two additional
@@ -9592,7 +9664,7 @@ define('Core/BoundingSphere',[
9592
9664
  * 4.0, 5.0, 6.0, 0.1, 0.2,
9593
9665
  * 7.0, 8.0, 9.0, 0.1, 0.2];
9594
9666
  * var sphere = Cesium.BoundingSphere.fromVertices(points, center, 5);
9595
- *
9667
+ *
9596
9668
  * @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
9597
9669
  */
9598
9670
  BoundingSphere.fromVertices = function(positions, center, stride, result) {
@@ -9745,6 +9817,163 @@ define('Core/BoundingSphere',[
9745
9817
  return result;
9746
9818
  };
9747
9819
 
9820
+ /**
9821
+ * Computes a tight-fitting bounding sphere enclosing a list of {@link EncodedCartesian3}s, where the points are
9822
+ * stored in parallel flat arrays in X, Y, Z, order. The bounding sphere is computed by running two
9823
+ * algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
9824
+ * ensure a tight fit.
9825
+ *
9826
+ * @param {Number[]} positionsHigh An array of high bits of the encoded cartesians that the bounding sphere will enclose. Each point
9827
+ * is formed from three elements in the array in the order X, Y, Z.
9828
+ * @param {Number[]} positionsLow An array of low bits of the encoded cartesians that the bounding sphere will enclose. Each point
9829
+ * is formed from three elements in the array in the order X, Y, Z.
9830
+ * @param {BoundingSphere} [result] The object onto which to store the result.
9831
+ * @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
9832
+ *
9833
+ * @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
9834
+ */
9835
+ BoundingSphere.fromEncodedCartesianVertices = function(positionsHigh, positionsLow, result) {
9836
+ if (!defined(result)) {
9837
+ result = new BoundingSphere();
9838
+ }
9839
+
9840
+ if (!defined(positionsHigh) || !defined(positionsLow) || positionsHigh.length !== positionsLow.length || positionsHigh.length === 0) {
9841
+ result.center = Cartesian3.clone(Cartesian3.ZERO, result.center);
9842
+ result.radius = 0.0;
9843
+ return result;
9844
+ }
9845
+
9846
+ var currentPos = fromPointsCurrentPos;
9847
+ currentPos.x = positionsHigh[0] + positionsLow[0];
9848
+ currentPos.y = positionsHigh[1] + positionsLow[1];
9849
+ currentPos.z = positionsHigh[2] + positionsLow[2];
9850
+
9851
+ var xMin = Cartesian3.clone(currentPos, fromPointsXMin);
9852
+ var yMin = Cartesian3.clone(currentPos, fromPointsYMin);
9853
+ var zMin = Cartesian3.clone(currentPos, fromPointsZMin);
9854
+
9855
+ var xMax = Cartesian3.clone(currentPos, fromPointsXMax);
9856
+ var yMax = Cartesian3.clone(currentPos, fromPointsYMax);
9857
+ var zMax = Cartesian3.clone(currentPos, fromPointsZMax);
9858
+
9859
+ var numElements = positionsHigh.length;
9860
+ for (var i = 0; i < numElements; i += 3) {
9861
+ var x = positionsHigh[i] + positionsLow[i];
9862
+ var y = positionsHigh[i + 1] + positionsLow[i + 1];
9863
+ var z = positionsHigh[i + 2] + positionsLow[i + 2];
9864
+
9865
+ currentPos.x = x;
9866
+ currentPos.y = y;
9867
+ currentPos.z = z;
9868
+
9869
+ // Store points containing the the smallest and largest components
9870
+ if (x < xMin.x) {
9871
+ Cartesian3.clone(currentPos, xMin);
9872
+ }
9873
+
9874
+ if (x > xMax.x) {
9875
+ Cartesian3.clone(currentPos, xMax);
9876
+ }
9877
+
9878
+ if (y < yMin.y) {
9879
+ Cartesian3.clone(currentPos, yMin);
9880
+ }
9881
+
9882
+ if (y > yMax.y) {
9883
+ Cartesian3.clone(currentPos, yMax);
9884
+ }
9885
+
9886
+ if (z < zMin.z) {
9887
+ Cartesian3.clone(currentPos, zMin);
9888
+ }
9889
+
9890
+ if (z > zMax.z) {
9891
+ Cartesian3.clone(currentPos, zMax);
9892
+ }
9893
+ }
9894
+
9895
+ // Compute x-, y-, and z-spans (Squared distances b/n each component's min. and max.).
9896
+ var xSpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(xMax, xMin, fromPointsScratch));
9897
+ var ySpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(yMax, yMin, fromPointsScratch));
9898
+ var zSpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(zMax, zMin, fromPointsScratch));
9899
+
9900
+ // Set the diameter endpoints to the largest span.
9901
+ var diameter1 = xMin;
9902
+ var diameter2 = xMax;
9903
+ var maxSpan = xSpan;
9904
+ if (ySpan > maxSpan) {
9905
+ maxSpan = ySpan;
9906
+ diameter1 = yMin;
9907
+ diameter2 = yMax;
9908
+ }
9909
+ if (zSpan > maxSpan) {
9910
+ maxSpan = zSpan;
9911
+ diameter1 = zMin;
9912
+ diameter2 = zMax;
9913
+ }
9914
+
9915
+ // Calculate the center of the initial sphere found by Ritter's algorithm
9916
+ var ritterCenter = fromPointsRitterCenter;
9917
+ ritterCenter.x = (diameter1.x + diameter2.x) * 0.5;
9918
+ ritterCenter.y = (diameter1.y + diameter2.y) * 0.5;
9919
+ ritterCenter.z = (diameter1.z + diameter2.z) * 0.5;
9920
+
9921
+ // Calculate the radius of the initial sphere found by Ritter's algorithm
9922
+ var radiusSquared = Cartesian3.magnitudeSquared(Cartesian3.subtract(diameter2, ritterCenter, fromPointsScratch));
9923
+ var ritterRadius = Math.sqrt(radiusSquared);
9924
+
9925
+ // Find the center of the sphere found using the Naive method.
9926
+ var minBoxPt = fromPointsMinBoxPt;
9927
+ minBoxPt.x = xMin.x;
9928
+ minBoxPt.y = yMin.y;
9929
+ minBoxPt.z = zMin.z;
9930
+
9931
+ var maxBoxPt = fromPointsMaxBoxPt;
9932
+ maxBoxPt.x = xMax.x;
9933
+ maxBoxPt.y = yMax.y;
9934
+ maxBoxPt.z = zMax.z;
9935
+
9936
+ var naiveCenter = Cartesian3.multiplyByScalar(Cartesian3.add(minBoxPt, maxBoxPt, fromPointsScratch), 0.5, fromPointsNaiveCenterScratch);
9937
+
9938
+ // Begin 2nd pass to find naive radius and modify the ritter sphere.
9939
+ var naiveRadius = 0;
9940
+ for (i = 0; i < numElements; i += 3) {
9941
+ currentPos.x = positionsHigh[i] + positionsLow[i];
9942
+ currentPos.y = positionsHigh[i + 1] + positionsLow[i + 1];
9943
+ currentPos.z = positionsHigh[i + 2] + positionsLow[i + 2];
9944
+
9945
+ // Find the furthest point from the naive center to calculate the naive radius.
9946
+ var r = Cartesian3.magnitude(Cartesian3.subtract(currentPos, naiveCenter, fromPointsScratch));
9947
+ if (r > naiveRadius) {
9948
+ naiveRadius = r;
9949
+ }
9950
+
9951
+ // Make adjustments to the Ritter Sphere to include all points.
9952
+ var oldCenterToPointSquared = Cartesian3.magnitudeSquared(Cartesian3.subtract(currentPos, ritterCenter, fromPointsScratch));
9953
+ if (oldCenterToPointSquared > radiusSquared) {
9954
+ var oldCenterToPoint = Math.sqrt(oldCenterToPointSquared);
9955
+ // Calculate new radius to include the point that lies outside
9956
+ ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5;
9957
+ radiusSquared = ritterRadius * ritterRadius;
9958
+ // Calculate center of new Ritter sphere
9959
+ var oldToNew = oldCenterToPoint - ritterRadius;
9960
+ ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint;
9961
+ ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint;
9962
+ ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint;
9963
+ }
9964
+ }
9965
+
9966
+ if (ritterRadius < naiveRadius) {
9967
+ Cartesian3.clone(ritterCenter, result.center);
9968
+ result.radius = ritterRadius;
9969
+ } else {
9970
+ Cartesian3.clone(naiveCenter, result.center);
9971
+ result.radius = naiveRadius;
9972
+ }
9973
+
9974
+ return result;
9975
+ };
9976
+
9748
9977
  /**
9749
9978
  * Computes a bounding sphere from the corner points of an axis-aligned bounding box. The sphere
9750
9979
  * tighly and fully encompases the box.
@@ -23352,10 +23581,12 @@ define('Core/PolygonPipeline',[
23352
23581
  p = ellipsoid.scaleToGeodeticSurface(p, p);
23353
23582
  }
23354
23583
 
23355
- n = ellipsoid.geodeticSurfaceNormal(p, n);
23584
+ if (height !== 0) {
23585
+ n = ellipsoid.geodeticSurfaceNormal(p, n);
23356
23586
 
23357
- Cartesian3.multiplyByScalar(n, height, n);
23358
- Cartesian3.add(p, n, p);
23587
+ Cartesian3.multiplyByScalar(n, height, n);
23588
+ Cartesian3.add(p, n, p);
23589
+ }
23359
23590
 
23360
23591
  positions[i] = p.x;
23361
23592
  positions[i + 1] = p.y;
@@ -23665,8 +23896,6 @@ define('Core/WallOutlineGeometry',[
23665
23896
  * @see WallGeometry#createGeometry
23666
23897
  * @see WallGeometry#fromConstantHeight
23667
23898
  *
23668
- * @demo {@link http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Wall%20Outline.html|Cesium Sandcastle Wall Outline Demo}
23669
- *
23670
23899
  * @example
23671
23900
  * // create a wall outline that spans from ground level to 10000 meters
23672
23901
  * var wall = new Cesium.WallOutlineGeometry({
@@ -1133,6 +1133,23 @@ define('Core/Math',[
1133
1133
  return 2.0 * radius * Math.sin(angle * 0.5);
1134
1134
  };
1135
1135
 
1136
+ /**
1137
+ * Finds the logarithm of a number to a base.
1138
+ *
1139
+ * @param {Number} number The number.
1140
+ * @param {Number} base The base.
1141
+ * @returns {Number} The result.
1142
+ */
1143
+ CesiumMath.logBase = function(number, base) {
1144
+ if (!defined(number)) {
1145
+ throw new DeveloperError('number is required.');
1146
+ }
1147
+ if (!defined(base)) {
1148
+ throw new DeveloperError('base is required.');
1149
+ }
1150
+ return Math.log(number) / Math.log(base);
1151
+ };
1152
+
1136
1153
  /**
1137
1154
  * @private
1138
1155
  */
@@ -10108,6 +10125,62 @@ define('Core/Rectangle',[
10108
10125
  return result;
10109
10126
  };
10110
10127
 
10128
+ /**
10129
+ * Computes a rectangle that is the union of two rectangles.
10130
+ *
10131
+ * @param {Rectangle} rectangle A rectangle to enclose in rectangle.
10132
+ * @param {Rectangle} otherRectangle A rectangle to enclose in a rectangle.
10133
+ * @param {Rectangle} [result] The object onto which to store the result.
10134
+ * @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
10135
+ */
10136
+ Rectangle.union = function(rectangle, otherRectangle, result) {
10137
+ if (!defined(rectangle)) {
10138
+ throw new DeveloperError('rectangle is required');
10139
+ }
10140
+ if (!defined(otherRectangle)) {
10141
+ throw new DeveloperError('otherRectangle is required.');
10142
+ }
10143
+
10144
+ if (!defined(result)) {
10145
+ result = new Rectangle();
10146
+ }
10147
+
10148
+ result.west = Math.min(rectangle.west, otherRectangle.west);
10149
+ result.south = Math.min(rectangle.south, otherRectangle.south);
10150
+ result.east = Math.max(rectangle.east, otherRectangle.east);
10151
+ result.north = Math.max(rectangle.north, otherRectangle.north);
10152
+
10153
+ return result;
10154
+ };
10155
+
10156
+ /**
10157
+ * Computes a rectangle by enlarging the provided rectangle until it contains the provided cartographic.
10158
+ *
10159
+ * @param {Rectangle} rectangle A rectangle to expand.
10160
+ * @param {Cartographic} cartographic A cartographic to enclose in a rectangle.
10161
+ * @param {Rectangle} [result] The object onto which to store the result.
10162
+ * @returns {Rectangle} The modified result parameter or a new Rectangle instance if one was not provided.
10163
+ */
10164
+ Rectangle.expand = function(rectangle, cartographic, result) {
10165
+ if (!defined(rectangle)) {
10166
+ throw new DeveloperError('rectangle is required.');
10167
+ }
10168
+ if (!defined(cartographic)) {
10169
+ throw new DeveloperError('cartographic is required.');
10170
+ }
10171
+
10172
+ if (!defined(result)) {
10173
+ result = new Rectangle();
10174
+ }
10175
+
10176
+ result.west = Math.min(rectangle.west, cartographic.longitude);
10177
+ result.south = Math.min(rectangle.south, cartographic.latitude);
10178
+ result.east = Math.max(rectangle.east, cartographic.longitude);
10179
+ result.north = Math.max(rectangle.north, cartographic.latitude);
10180
+
10181
+ return result;
10182
+ };
10183
+
10111
10184
  /**
10112
10185
  * Returns true if the cartographic is on or inside the rectangle, false otherwise.
10113
10186
  *
@@ -10554,7 +10627,6 @@ define('Core/BoundingSphere',[
10554
10627
  * @param {BoundingSphere} [result] The object onto which to store the result.
10555
10628
  * @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
10556
10629
  *
10557
- *
10558
10630
  * @example
10559
10631
  * // Compute the bounding sphere from 3 positions, each specified relative to a center.
10560
10632
  * // In addition to the X, Y, and Z coordinates, the points array contains two additional
@@ -10564,7 +10636,7 @@ define('Core/BoundingSphere',[
10564
10636
  * 4.0, 5.0, 6.0, 0.1, 0.2,
10565
10637
  * 7.0, 8.0, 9.0, 0.1, 0.2];
10566
10638
  * var sphere = Cesium.BoundingSphere.fromVertices(points, center, 5);
10567
- *
10639
+ *
10568
10640
  * @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
10569
10641
  */
10570
10642
  BoundingSphere.fromVertices = function(positions, center, stride, result) {
@@ -10717,6 +10789,163 @@ define('Core/BoundingSphere',[
10717
10789
  return result;
10718
10790
  };
10719
10791
 
10792
+ /**
10793
+ * Computes a tight-fitting bounding sphere enclosing a list of {@link EncodedCartesian3}s, where the points are
10794
+ * stored in parallel flat arrays in X, Y, Z, order. The bounding sphere is computed by running two
10795
+ * algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
10796
+ * ensure a tight fit.
10797
+ *
10798
+ * @param {Number[]} positionsHigh An array of high bits of the encoded cartesians that the bounding sphere will enclose. Each point
10799
+ * is formed from three elements in the array in the order X, Y, Z.
10800
+ * @param {Number[]} positionsLow An array of low bits of the encoded cartesians that the bounding sphere will enclose. Each point
10801
+ * is formed from three elements in the array in the order X, Y, Z.
10802
+ * @param {BoundingSphere} [result] The object onto which to store the result.
10803
+ * @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
10804
+ *
10805
+ * @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
10806
+ */
10807
+ BoundingSphere.fromEncodedCartesianVertices = function(positionsHigh, positionsLow, result) {
10808
+ if (!defined(result)) {
10809
+ result = new BoundingSphere();
10810
+ }
10811
+
10812
+ if (!defined(positionsHigh) || !defined(positionsLow) || positionsHigh.length !== positionsLow.length || positionsHigh.length === 0) {
10813
+ result.center = Cartesian3.clone(Cartesian3.ZERO, result.center);
10814
+ result.radius = 0.0;
10815
+ return result;
10816
+ }
10817
+
10818
+ var currentPos = fromPointsCurrentPos;
10819
+ currentPos.x = positionsHigh[0] + positionsLow[0];
10820
+ currentPos.y = positionsHigh[1] + positionsLow[1];
10821
+ currentPos.z = positionsHigh[2] + positionsLow[2];
10822
+
10823
+ var xMin = Cartesian3.clone(currentPos, fromPointsXMin);
10824
+ var yMin = Cartesian3.clone(currentPos, fromPointsYMin);
10825
+ var zMin = Cartesian3.clone(currentPos, fromPointsZMin);
10826
+
10827
+ var xMax = Cartesian3.clone(currentPos, fromPointsXMax);
10828
+ var yMax = Cartesian3.clone(currentPos, fromPointsYMax);
10829
+ var zMax = Cartesian3.clone(currentPos, fromPointsZMax);
10830
+
10831
+ var numElements = positionsHigh.length;
10832
+ for (var i = 0; i < numElements; i += 3) {
10833
+ var x = positionsHigh[i] + positionsLow[i];
10834
+ var y = positionsHigh[i + 1] + positionsLow[i + 1];
10835
+ var z = positionsHigh[i + 2] + positionsLow[i + 2];
10836
+
10837
+ currentPos.x = x;
10838
+ currentPos.y = y;
10839
+ currentPos.z = z;
10840
+
10841
+ // Store points containing the the smallest and largest components
10842
+ if (x < xMin.x) {
10843
+ Cartesian3.clone(currentPos, xMin);
10844
+ }
10845
+
10846
+ if (x > xMax.x) {
10847
+ Cartesian3.clone(currentPos, xMax);
10848
+ }
10849
+
10850
+ if (y < yMin.y) {
10851
+ Cartesian3.clone(currentPos, yMin);
10852
+ }
10853
+
10854
+ if (y > yMax.y) {
10855
+ Cartesian3.clone(currentPos, yMax);
10856
+ }
10857
+
10858
+ if (z < zMin.z) {
10859
+ Cartesian3.clone(currentPos, zMin);
10860
+ }
10861
+
10862
+ if (z > zMax.z) {
10863
+ Cartesian3.clone(currentPos, zMax);
10864
+ }
10865
+ }
10866
+
10867
+ // Compute x-, y-, and z-spans (Squared distances b/n each component's min. and max.).
10868
+ var xSpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(xMax, xMin, fromPointsScratch));
10869
+ var ySpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(yMax, yMin, fromPointsScratch));
10870
+ var zSpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(zMax, zMin, fromPointsScratch));
10871
+
10872
+ // Set the diameter endpoints to the largest span.
10873
+ var diameter1 = xMin;
10874
+ var diameter2 = xMax;
10875
+ var maxSpan = xSpan;
10876
+ if (ySpan > maxSpan) {
10877
+ maxSpan = ySpan;
10878
+ diameter1 = yMin;
10879
+ diameter2 = yMax;
10880
+ }
10881
+ if (zSpan > maxSpan) {
10882
+ maxSpan = zSpan;
10883
+ diameter1 = zMin;
10884
+ diameter2 = zMax;
10885
+ }
10886
+
10887
+ // Calculate the center of the initial sphere found by Ritter's algorithm
10888
+ var ritterCenter = fromPointsRitterCenter;
10889
+ ritterCenter.x = (diameter1.x + diameter2.x) * 0.5;
10890
+ ritterCenter.y = (diameter1.y + diameter2.y) * 0.5;
10891
+ ritterCenter.z = (diameter1.z + diameter2.z) * 0.5;
10892
+
10893
+ // Calculate the radius of the initial sphere found by Ritter's algorithm
10894
+ var radiusSquared = Cartesian3.magnitudeSquared(Cartesian3.subtract(diameter2, ritterCenter, fromPointsScratch));
10895
+ var ritterRadius = Math.sqrt(radiusSquared);
10896
+
10897
+ // Find the center of the sphere found using the Naive method.
10898
+ var minBoxPt = fromPointsMinBoxPt;
10899
+ minBoxPt.x = xMin.x;
10900
+ minBoxPt.y = yMin.y;
10901
+ minBoxPt.z = zMin.z;
10902
+
10903
+ var maxBoxPt = fromPointsMaxBoxPt;
10904
+ maxBoxPt.x = xMax.x;
10905
+ maxBoxPt.y = yMax.y;
10906
+ maxBoxPt.z = zMax.z;
10907
+
10908
+ var naiveCenter = Cartesian3.multiplyByScalar(Cartesian3.add(minBoxPt, maxBoxPt, fromPointsScratch), 0.5, fromPointsNaiveCenterScratch);
10909
+
10910
+ // Begin 2nd pass to find naive radius and modify the ritter sphere.
10911
+ var naiveRadius = 0;
10912
+ for (i = 0; i < numElements; i += 3) {
10913
+ currentPos.x = positionsHigh[i] + positionsLow[i];
10914
+ currentPos.y = positionsHigh[i + 1] + positionsLow[i + 1];
10915
+ currentPos.z = positionsHigh[i + 2] + positionsLow[i + 2];
10916
+
10917
+ // Find the furthest point from the naive center to calculate the naive radius.
10918
+ var r = Cartesian3.magnitude(Cartesian3.subtract(currentPos, naiveCenter, fromPointsScratch));
10919
+ if (r > naiveRadius) {
10920
+ naiveRadius = r;
10921
+ }
10922
+
10923
+ // Make adjustments to the Ritter Sphere to include all points.
10924
+ var oldCenterToPointSquared = Cartesian3.magnitudeSquared(Cartesian3.subtract(currentPos, ritterCenter, fromPointsScratch));
10925
+ if (oldCenterToPointSquared > radiusSquared) {
10926
+ var oldCenterToPoint = Math.sqrt(oldCenterToPointSquared);
10927
+ // Calculate new radius to include the point that lies outside
10928
+ ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5;
10929
+ radiusSquared = ritterRadius * ritterRadius;
10930
+ // Calculate center of new Ritter sphere
10931
+ var oldToNew = oldCenterToPoint - ritterRadius;
10932
+ ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint;
10933
+ ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint;
10934
+ ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint;
10935
+ }
10936
+ }
10937
+
10938
+ if (ritterRadius < naiveRadius) {
10939
+ Cartesian3.clone(ritterCenter, result.center);
10940
+ result.radius = ritterRadius;
10941
+ } else {
10942
+ Cartesian3.clone(naiveCenter, result.center);
10943
+ result.radius = naiveRadius;
10944
+ }
10945
+
10946
+ return result;
10947
+ };
10948
+
10720
10949
  /**
10721
10950
  * Computes a bounding sphere from the corner points of an axis-aligned bounding box. The sphere
10722
10951
  * tighly and fully encompases the box.