PolylinePipeline-7608e667.js 20 KB

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