PolylinePipeline-0b5c8621.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. /* This file is automatically rebuilt by the Cesium build process. */
  2. define(['exports', './when-e6985d2a', './Check-24cae389', './Math-392d0035', './Cartesian2-a5d6dde9', './Transforms-81680c41', './IntersectionTests-f17c84f0', './Plane-ac6a1d3e', './EllipsoidRhumbLine-5f1ab81f', './EllipsoidGeodesic-2a1a77d2'], function (exports, when, Check, _Math, Cartesian2, Transforms, IntersectionTests, Plane, EllipsoidRhumbLine, EllipsoidGeodesic) { 'use strict';
  3. /**
  4. * @private
  5. */
  6. var PolylinePipeline = {};
  7. PolylinePipeline.numberOfPoints = function (p0, p1, minDistance) {
  8. var distance = Cartesian2.Cartesian3.distance(p0, p1);
  9. return Math.ceil(distance / minDistance);
  10. };
  11. PolylinePipeline.numberOfPointsRhumbLine = function (p0, p1, granularity) {
  12. var radiansDistanceSquared =
  13. Math.pow(p0.longitude - p1.longitude, 2) +
  14. Math.pow(p0.latitude - p1.latitude, 2);
  15. return Math.max(
  16. 1,
  17. Math.ceil(Math.sqrt(radiansDistanceSquared / (granularity * granularity)))
  18. );
  19. };
  20. var cartoScratch = new Cartesian2.Cartographic();
  21. PolylinePipeline.extractHeights = function (positions, ellipsoid) {
  22. var length = positions.length;
  23. var heights = new Array(length);
  24. for (var i = 0; i < length; i++) {
  25. var p = positions[i];
  26. heights[i] = ellipsoid.cartesianToCartographic(p, cartoScratch).height;
  27. }
  28. return heights;
  29. };
  30. var wrapLongitudeInversMatrix = new Transforms.Matrix4();
  31. var wrapLongitudeOrigin = new Cartesian2.Cartesian3();
  32. var wrapLongitudeXZNormal = new Cartesian2.Cartesian3();
  33. var wrapLongitudeXZPlane = new Plane.Plane(Cartesian2.Cartesian3.UNIT_X, 0.0);
  34. var wrapLongitudeYZNormal = new Cartesian2.Cartesian3();
  35. var wrapLongitudeYZPlane = new Plane.Plane(Cartesian2.Cartesian3.UNIT_X, 0.0);
  36. var wrapLongitudeIntersection = new Cartesian2.Cartesian3();
  37. var wrapLongitudeOffset = new Cartesian2.Cartesian3();
  38. var subdivideHeightsScratchArray = [];
  39. function subdivideHeights(numPoints, h0, h1) {
  40. var heights = subdivideHeightsScratchArray;
  41. heights.length = numPoints;
  42. var i;
  43. if (h0 === h1) {
  44. for (i = 0; i < numPoints; i++) {
  45. heights[i] = h0;
  46. }
  47. return heights;
  48. }
  49. var dHeight = h1 - h0;
  50. var heightPerVertex = dHeight / numPoints;
  51. for (i = 0; i < numPoints; i++) {
  52. var h = h0 + i * heightPerVertex;
  53. heights[i] = h;
  54. }
  55. return heights;
  56. }
  57. var carto1 = new Cartesian2.Cartographic();
  58. var carto2 = new Cartesian2.Cartographic();
  59. var cartesian = new Cartesian2.Cartesian3();
  60. var scaleFirst = new Cartesian2.Cartesian3();
  61. var scaleLast = new Cartesian2.Cartesian3();
  62. var ellipsoidGeodesic = new EllipsoidGeodesic.EllipsoidGeodesic();
  63. var ellipsoidRhumb = new EllipsoidRhumbLine.EllipsoidRhumbLine();
  64. //Returns subdivided line scaled to ellipsoid surface starting at p1 and ending at p2.
  65. //Result includes p1, but not include p2. This function is called for a sequence of line segments,
  66. //and this prevents duplication of end point.
  67. function generateCartesianArc(
  68. p0,
  69. p1,
  70. minDistance,
  71. ellipsoid,
  72. h0,
  73. h1,
  74. array,
  75. offset
  76. ) {
  77. var first = ellipsoid.scaleToGeodeticSurface(p0, scaleFirst);
  78. var last = ellipsoid.scaleToGeodeticSurface(p1, scaleLast);
  79. var numPoints = PolylinePipeline.numberOfPoints(p0, p1, minDistance);
  80. var start = ellipsoid.cartesianToCartographic(first, carto1);
  81. var end = ellipsoid.cartesianToCartographic(last, carto2);
  82. var heights = subdivideHeights(numPoints, h0, h1);
  83. ellipsoidGeodesic.setEndPoints(start, end);
  84. var surfaceDistanceBetweenPoints =
  85. ellipsoidGeodesic.surfaceDistance / numPoints;
  86. var index = offset;
  87. start.height = h0;
  88. var cart = ellipsoid.cartographicToCartesian(start, cartesian);
  89. Cartesian2.Cartesian3.pack(cart, array, index);
  90. index += 3;
  91. for (var i = 1; i < numPoints; i++) {
  92. var carto = ellipsoidGeodesic.interpolateUsingSurfaceDistance(
  93. i * surfaceDistanceBetweenPoints,
  94. carto2
  95. );
  96. carto.height = heights[i];
  97. cart = ellipsoid.cartographicToCartesian(carto, cartesian);
  98. Cartesian2.Cartesian3.pack(cart, array, index);
  99. index += 3;
  100. }
  101. return index;
  102. }
  103. //Returns subdivided line scaled to ellipsoid surface starting at p1 and ending at p2.
  104. //Result includes p1, but not include p2. This function is called for a sequence of line segments,
  105. //and this prevents duplication of end point.
  106. function generateCartesianRhumbArc(
  107. p0,
  108. p1,
  109. granularity,
  110. ellipsoid,
  111. h0,
  112. h1,
  113. array,
  114. offset
  115. ) {
  116. var start = ellipsoid.cartesianToCartographic(p0, carto1);
  117. var end = ellipsoid.cartesianToCartographic(p1, carto2);
  118. var numPoints = PolylinePipeline.numberOfPointsRhumbLine(
  119. start,
  120. end,
  121. granularity
  122. );
  123. start.height = 0.0;
  124. end.height = 0.0;
  125. var heights = subdivideHeights(numPoints, h0, h1);
  126. if (!ellipsoidRhumb.ellipsoid.equals(ellipsoid)) {
  127. ellipsoidRhumb = new EllipsoidRhumbLine.EllipsoidRhumbLine(undefined, undefined, ellipsoid);
  128. }
  129. ellipsoidRhumb.setEndPoints(start, end);
  130. var surfaceDistanceBetweenPoints = ellipsoidRhumb.surfaceDistance / numPoints;
  131. var index = offset;
  132. start.height = h0;
  133. var cart = ellipsoid.cartographicToCartesian(start, cartesian);
  134. Cartesian2.Cartesian3.pack(cart, array, index);
  135. index += 3;
  136. for (var i = 1; i < numPoints; i++) {
  137. var carto = ellipsoidRhumb.interpolateUsingSurfaceDistance(
  138. i * surfaceDistanceBetweenPoints,
  139. carto2
  140. );
  141. carto.height = heights[i];
  142. cart = ellipsoid.cartographicToCartesian(carto, cartesian);
  143. Cartesian2.Cartesian3.pack(cart, array, index);
  144. index += 3;
  145. }
  146. return index;
  147. }
  148. /**
  149. * Breaks a {@link Polyline} into segments such that it does not cross the &plusmn;180 degree meridian of an ellipsoid.
  150. *
  151. * @param {Cartesian3[]} positions The polyline's Cartesian positions.
  152. * @param {Matrix4} [modelMatrix=Matrix4.IDENTITY] The polyline's model matrix. Assumed to be an affine
  153. * transformation matrix, where the upper left 3x3 elements are a rotation matrix, and
  154. * the upper three elements in the fourth column are the translation. The bottom row is assumed to be [0, 0, 0, 1].
  155. * The matrix is not verified to be in the proper form.
  156. * @returns {Object} An object with a <code>positions</code> property that is an array of positions and a
  157. * <code>segments</code> property.
  158. *
  159. *
  160. * @example
  161. * var polylines = new Cesium.PolylineCollection();
  162. * var polyline = polylines.add(...);
  163. * var positions = polyline.positions;
  164. * var modelMatrix = polylines.modelMatrix;
  165. * var segments = Cesium.PolylinePipeline.wrapLongitude(positions, modelMatrix);
  166. *
  167. * @see PolygonPipeline.wrapLongitude
  168. * @see Polyline
  169. * @see PolylineCollection
  170. */
  171. PolylinePipeline.wrapLongitude = function (positions, modelMatrix) {
  172. var cartesians = [];
  173. var segments = [];
  174. if (when.defined(positions) && positions.length > 0) {
  175. modelMatrix = when.defaultValue(modelMatrix, Transforms.Matrix4.IDENTITY);
  176. var inverseModelMatrix = Transforms.Matrix4.inverseTransformation(
  177. modelMatrix,
  178. wrapLongitudeInversMatrix
  179. );
  180. var origin = Transforms.Matrix4.multiplyByPoint(
  181. inverseModelMatrix,
  182. Cartesian2.Cartesian3.ZERO,
  183. wrapLongitudeOrigin
  184. );
  185. var xzNormal = Cartesian2.Cartesian3.normalize(
  186. Transforms.Matrix4.multiplyByPointAsVector(
  187. inverseModelMatrix,
  188. Cartesian2.Cartesian3.UNIT_Y,
  189. wrapLongitudeXZNormal
  190. ),
  191. wrapLongitudeXZNormal
  192. );
  193. var xzPlane = Plane.Plane.fromPointNormal(origin, xzNormal, wrapLongitudeXZPlane);
  194. var yzNormal = Cartesian2.Cartesian3.normalize(
  195. Transforms.Matrix4.multiplyByPointAsVector(
  196. inverseModelMatrix,
  197. Cartesian2.Cartesian3.UNIT_X,
  198. wrapLongitudeYZNormal
  199. ),
  200. wrapLongitudeYZNormal
  201. );
  202. var yzPlane = Plane.Plane.fromPointNormal(origin, yzNormal, wrapLongitudeYZPlane);
  203. var count = 1;
  204. cartesians.push(Cartesian2.Cartesian3.clone(positions[0]));
  205. var prev = cartesians[0];
  206. var length = positions.length;
  207. for (var i = 1; i < length; ++i) {
  208. var cur = positions[i];
  209. // intersects the IDL if either endpoint is on the negative side of the yz-plane
  210. if (
  211. Plane.Plane.getPointDistance(yzPlane, prev) < 0.0 ||
  212. Plane.Plane.getPointDistance(yzPlane, cur) < 0.0
  213. ) {
  214. // and intersects the xz-plane
  215. var intersection = IntersectionTests.IntersectionTests.lineSegmentPlane(
  216. prev,
  217. cur,
  218. xzPlane,
  219. wrapLongitudeIntersection
  220. );
  221. if (when.defined(intersection)) {
  222. // move point on the xz-plane slightly away from the plane
  223. var offset = Cartesian2.Cartesian3.multiplyByScalar(
  224. xzNormal,
  225. 5.0e-9,
  226. wrapLongitudeOffset
  227. );
  228. if (Plane.Plane.getPointDistance(xzPlane, prev) < 0.0) {
  229. Cartesian2.Cartesian3.negate(offset, offset);
  230. }
  231. cartesians.push(
  232. Cartesian2.Cartesian3.add(intersection, offset, new Cartesian2.Cartesian3())
  233. );
  234. segments.push(count + 1);
  235. Cartesian2.Cartesian3.negate(offset, offset);
  236. cartesians.push(
  237. Cartesian2.Cartesian3.add(intersection, offset, new Cartesian2.Cartesian3())
  238. );
  239. count = 1;
  240. }
  241. }
  242. cartesians.push(Cartesian2.Cartesian3.clone(positions[i]));
  243. count++;
  244. prev = cur;
  245. }
  246. segments.push(count);
  247. }
  248. return {
  249. positions: cartesians,
  250. lengths: segments,
  251. };
  252. };
  253. /**
  254. * Subdivides polyline and raises all points to the specified height. Returns an array of numbers to represent the positions.
  255. * @param {Object} options Object with the following properties:
  256. * @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
  257. * @param {Number|Number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
  258. * @param {Number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
  259. * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
  260. * @returns {Number[]} A new array of positions of type {Number} that have been subdivided and raised to the surface of the ellipsoid.
  261. *
  262. * @example
  263. * var positions = Cesium.Cartesian3.fromDegreesArray([
  264. * -105.0, 40.0,
  265. * -100.0, 38.0,
  266. * -105.0, 35.0,
  267. * -100.0, 32.0
  268. * ]);
  269. * var surfacePositions = Cesium.PolylinePipeline.generateArc({
  270. * positons: positions
  271. * });
  272. */
  273. PolylinePipeline.generateArc = function (options) {
  274. if (!when.defined(options)) {
  275. options = {};
  276. }
  277. var positions = options.positions;
  278. //>>includeStart('debug', pragmas.debug);
  279. if (!when.defined(positions)) {
  280. throw new Check.DeveloperError("options.positions is required.");
  281. }
  282. //>>includeEnd('debug');
  283. var length = positions.length;
  284. var ellipsoid = when.defaultValue(options.ellipsoid, Cartesian2.Ellipsoid.WGS84);
  285. var height = when.defaultValue(options.height, 0);
  286. var hasHeightArray = Array.isArray(height);
  287. if (length < 1) {
  288. return [];
  289. } else if (length === 1) {
  290. var p = ellipsoid.scaleToGeodeticSurface(positions[0], scaleFirst);
  291. height = hasHeightArray ? height[0] : height;
  292. if (height !== 0) {
  293. var n = ellipsoid.geodeticSurfaceNormal(p, cartesian);
  294. Cartesian2.Cartesian3.multiplyByScalar(n, height, n);
  295. Cartesian2.Cartesian3.add(p, n, p);
  296. }
  297. return [p.x, p.y, p.z];
  298. }
  299. var minDistance = options.minDistance;
  300. if (!when.defined(minDistance)) {
  301. var granularity = when.defaultValue(
  302. options.granularity,
  303. _Math.CesiumMath.RADIANS_PER_DEGREE
  304. );
  305. minDistance = _Math.CesiumMath.chordLength(granularity, ellipsoid.maximumRadius);
  306. }
  307. var numPoints = 0;
  308. var i;
  309. for (i = 0; i < length - 1; i++) {
  310. numPoints += PolylinePipeline.numberOfPoints(
  311. positions[i],
  312. positions[i + 1],
  313. minDistance
  314. );
  315. }
  316. var arrayLength = (numPoints + 1) * 3;
  317. var newPositions = new Array(arrayLength);
  318. var offset = 0;
  319. for (i = 0; i < length - 1; i++) {
  320. var p0 = positions[i];
  321. var p1 = positions[i + 1];
  322. var h0 = hasHeightArray ? height[i] : height;
  323. var h1 = hasHeightArray ? height[i + 1] : height;
  324. offset = generateCartesianArc(
  325. p0,
  326. p1,
  327. minDistance,
  328. ellipsoid,
  329. h0,
  330. h1,
  331. newPositions,
  332. offset
  333. );
  334. }
  335. subdivideHeightsScratchArray.length = 0;
  336. var lastPoint = positions[length - 1];
  337. var carto = ellipsoid.cartesianToCartographic(lastPoint, carto1);
  338. carto.height = hasHeightArray ? height[length - 1] : height;
  339. var cart = ellipsoid.cartographicToCartesian(carto, cartesian);
  340. Cartesian2.Cartesian3.pack(cart, newPositions, arrayLength - 3);
  341. return newPositions;
  342. };
  343. var scratchCartographic0 = new Cartesian2.Cartographic();
  344. var scratchCartographic1 = new Cartesian2.Cartographic();
  345. /**
  346. * Subdivides polyline and raises all points to the specified height using Rhumb lines. Returns an array of numbers to represent the positions.
  347. * @param {Object} options Object with the following properties:
  348. * @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
  349. * @param {Number|Number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
  350. * @param {Number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
  351. * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
  352. * @returns {Number[]} A new array of positions of type {Number} that have been subdivided and raised to the surface of the ellipsoid.
  353. *
  354. * @example
  355. * var positions = Cesium.Cartesian3.fromDegreesArray([
  356. * -105.0, 40.0,
  357. * -100.0, 38.0,
  358. * -105.0, 35.0,
  359. * -100.0, 32.0
  360. * ]);
  361. * var surfacePositions = Cesium.PolylinePipeline.generateRhumbArc({
  362. * positons: positions
  363. * });
  364. */
  365. PolylinePipeline.generateRhumbArc = function (options) {
  366. if (!when.defined(options)) {
  367. options = {};
  368. }
  369. var positions = options.positions;
  370. //>>includeStart('debug', pragmas.debug);
  371. if (!when.defined(positions)) {
  372. throw new Check.DeveloperError("options.positions is required.");
  373. }
  374. //>>includeEnd('debug');
  375. var length = positions.length;
  376. var ellipsoid = when.defaultValue(options.ellipsoid, Cartesian2.Ellipsoid.WGS84);
  377. var height = when.defaultValue(options.height, 0);
  378. var hasHeightArray = Array.isArray(height);
  379. if (length < 1) {
  380. return [];
  381. } else if (length === 1) {
  382. var p = ellipsoid.scaleToGeodeticSurface(positions[0], scaleFirst);
  383. height = hasHeightArray ? height[0] : height;
  384. if (height !== 0) {
  385. var n = ellipsoid.geodeticSurfaceNormal(p, cartesian);
  386. Cartesian2.Cartesian3.multiplyByScalar(n, height, n);
  387. Cartesian2.Cartesian3.add(p, n, p);
  388. }
  389. return [p.x, p.y, p.z];
  390. }
  391. var granularity = when.defaultValue(
  392. options.granularity,
  393. _Math.CesiumMath.RADIANS_PER_DEGREE
  394. );
  395. var numPoints = 0;
  396. var i;
  397. var c0 = ellipsoid.cartesianToCartographic(
  398. positions[0],
  399. scratchCartographic0
  400. );
  401. var c1;
  402. for (i = 0; i < length - 1; i++) {
  403. c1 = ellipsoid.cartesianToCartographic(
  404. positions[i + 1],
  405. scratchCartographic1
  406. );
  407. numPoints += PolylinePipeline.numberOfPointsRhumbLine(c0, c1, granularity);
  408. c0 = Cartesian2.Cartographic.clone(c1, scratchCartographic0);
  409. }
  410. var arrayLength = (numPoints + 1) * 3;
  411. var newPositions = new Array(arrayLength);
  412. var offset = 0;
  413. for (i = 0; i < length - 1; i++) {
  414. var p0 = positions[i];
  415. var p1 = positions[i + 1];
  416. var h0 = hasHeightArray ? height[i] : height;
  417. var h1 = hasHeightArray ? height[i + 1] : height;
  418. offset = generateCartesianRhumbArc(
  419. p0,
  420. p1,
  421. granularity,
  422. ellipsoid,
  423. h0,
  424. h1,
  425. newPositions,
  426. offset
  427. );
  428. }
  429. subdivideHeightsScratchArray.length = 0;
  430. var lastPoint = positions[length - 1];
  431. var carto = ellipsoid.cartesianToCartographic(lastPoint, carto1);
  432. carto.height = hasHeightArray ? height[length - 1] : height;
  433. var cart = ellipsoid.cartographicToCartesian(carto, cartesian);
  434. Cartesian2.Cartesian3.pack(cart, newPositions, arrayLength - 3);
  435. return newPositions;
  436. };
  437. /**
  438. * Subdivides polyline and raises all points to the specified height. Returns an array of new {Cartesian3} positions.
  439. * @param {Object} options Object with the following properties:
  440. * @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
  441. * @param {Number|Number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
  442. * @param {Number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
  443. * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
  444. * @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
  445. *
  446. * @example
  447. * var positions = Cesium.Cartesian3.fromDegreesArray([
  448. * -105.0, 40.0,
  449. * -100.0, 38.0,
  450. * -105.0, 35.0,
  451. * -100.0, 32.0
  452. * ]);
  453. * var surfacePositions = Cesium.PolylinePipeline.generateCartesianArc({
  454. * positons: positions
  455. * });
  456. */
  457. PolylinePipeline.generateCartesianArc = function (options) {
  458. var numberArray = PolylinePipeline.generateArc(options);
  459. var size = numberArray.length / 3;
  460. var newPositions = new Array(size);
  461. for (var i = 0; i < size; i++) {
  462. newPositions[i] = Cartesian2.Cartesian3.unpack(numberArray, i * 3);
  463. }
  464. return newPositions;
  465. };
  466. /**
  467. * Subdivides polyline and raises all points to the specified height using Rhumb Lines. Returns an array of new {Cartesian3} positions.
  468. * @param {Object} options Object with the following properties:
  469. * @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
  470. * @param {Number|Number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
  471. * @param {Number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
  472. * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
  473. * @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
  474. *
  475. * @example
  476. * var positions = Cesium.Cartesian3.fromDegreesArray([
  477. * -105.0, 40.0,
  478. * -100.0, 38.0,
  479. * -105.0, 35.0,
  480. * -100.0, 32.0
  481. * ]);
  482. * var surfacePositions = Cesium.PolylinePipeline.generateCartesianRhumbArc({
  483. * positons: positions
  484. * });
  485. */
  486. PolylinePipeline.generateCartesianRhumbArc = function (options) {
  487. var numberArray = PolylinePipeline.generateRhumbArc(options);
  488. var size = numberArray.length / 3;
  489. var newPositions = new Array(size);
  490. for (var i = 0; i < size; i++) {
  491. newPositions[i] = Cartesian2.Cartesian3.unpack(numberArray, i * 3);
  492. }
  493. return newPositions;
  494. };
  495. exports.PolylinePipeline = PolylinePipeline;
  496. });