/** * Cesium - https://github.com/AnalyticalGraphicsInc/cesium * * Copyright 2011-2017 Cesium Contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * * 该版本修改了部分代码,主要是汉化、优化功能、添加接口 等 by 火星科技 http://marsgis.cn * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Columbus View (Pat. Pend.) * * Portions licensed separately. * See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details. */ define(["exports","./defined-b9ff0e39","./Check-e6691f86","./freezeObject-2d5b18ce","./defaultValue-199f5aa8","./Math-92bd3539","./Cartesian2-8fa798b8","./WebGLConstants-554ddbe2","./ComponentDatatype-569c1e3e","./GeometryAttribute-928dddaf","./EllipsoidRhumbLine-fb5cc30d"],function(e,T,t,n,W,P,I,r,B,N,U){"use strict";function a(e,t,n){n=n||2;var r,a,i,u,x,o,s,p=t&&t.length,f=p?t[0]*n:e.length,h=y(e,0,f,n,!0),l=[];if(!h)return l;if(p&&(h=function(e,t,n,r){var a,i,u,x,o,s=[];for(a=0,i=t.length;a80*n){r=i=e[0],a=u=e[1];for(var v=n;vi.x?a.x>u.x?a.x:u.x:i.x>u.x?i.x:u.x,p=a.y>i.y?a.y>u.y?a.y:u.y:i.y>u.y?i.y:u.y,f=v(x,o,t,n,r),h=v(s,p,t,n,r),l=e.nextZ;l&&l.z<=h;){if(l!==e.prev&&l!==e.next&&b(a.x,a.y,i.x,i.y,u.x,u.y,l.x,l.y)&&0<=w(l.prev,l,l.next))return!1;l=l.nextZ}for(l=e.prevZ;l&&l.z>=f;){if(l!==e.prev&&l!==e.next&&b(a.x,a.y,i.x,i.y,u.x,u.y,l.x,l.y)&&0<=w(l.prev,l,l.next))return!1;l=l.prevZ}return!0}function h(e,t,n){var r=e;do{var a=r.prev,i=r.next.next;!x(a,i)&&E(a,r,r.next,i)&&Z(a,i)&&Z(i,a)&&(t.push(a.i/n),t.push(r.i/n),t.push(i.i/n),S(r),S(r.next),r=e=i),r=r.next}while(r!==e);return r}function l(e,t,n,r,a,i){var u,x,o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&(x=s,(u=o).next.i!==x.i&&u.prev.i!==x.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&E(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(u,x)&&Z(u,x)&&Z(x,u)&&function(e,t){var n=e,r=!1,a=(e.x+t.x)/2,i=(e.y+t.y)/2;for(;n.y>i!=n.next.y>i&&a<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next,n!==e;);return r}(u,x))){var p=M(o,s);return o=c(o,o.next),p=c(p,p.next),d(o,t,n,r,a,i),void d(p,t,n,r,a,i)}s=s.next}o=o.next}while(o!==e)}function C(e,t){return e.x-t.x}function m(e,t){if(t=function(e,t){var n,r=t,a=e.x,i=e.y,u=-1/0;do{if(i<=r.y&&i>=r.next.y){var x=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(x<=a&&u=r.x&&r.x>=p&&b(in.x)&&Z(r,e)&&(n=r,h=o),r=r.next;return n}(e,t)){var n=M(t,e);c(n,n.next)}}function v(e,t,n,r,a){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)/a)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)/a)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function g(e){for(var t=e,n=e;t.x