2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
/* 2020-9-22 15:23:24 | 版权所有 军懋国兴 */
|
|
define(["exports","./when-cbf8cd21","./Check-35e1a91d","./Math-69007a69","./Cartesian2-43e3a3be","./Transforms-2d1ac5ec"],function(e,x,P,z,T,U){"use strict";var W={};function d(e,r,t){var a=e+r;return z.CesiumMath.sign(e)!==z.CesiumMath.sign(r)&&Math.abs(a/Math.max(Math.abs(e),Math.abs(r)))<t?0:a}W.computeDiscriminant=function(e,r,t){if("number"!=typeof e)throw new P.DeveloperError("a is a required number.");if("number"!=typeof r)throw new P.DeveloperError("b is a required number.");if("number"!=typeof t)throw new P.DeveloperError("c is a required number.");return r*r-4*e*t},W.computeRealRoots=function(e,r,t){if("number"!=typeof e)throw new P.DeveloperError("a is a required number.");if("number"!=typeof r)throw new P.DeveloperError("b is a required number.");if("number"!=typeof t)throw new P.DeveloperError("c is a required number.");var a;if(0===e)return 0===r?[]:[-t/r];if(0===r){if(0===t)return[0,0];var i=Math.abs(t),n=Math.abs(e);if(i<n&&i/n<z.CesiumMath.EPSILON14)return[0,0];if(n<i&&n/i<z.CesiumMath.EPSILON14)return[];if((a=-t/e)<0)return[];var o=Math.sqrt(a);return[-o,o]}if(0===t)return(a=-r/e)<0?[a,0]:[0,a];var s=d(r*r,-(4*e*t),z.CesiumMath.EPSILON14);if(s<0)return[];var u=-.5*d(r,z.CesiumMath.sign(r)*Math.sqrt(s),z.CesiumMath.EPSILON14);return 0<r?[u/e,t/u]:[t/u,u/e]};var O={};function s(e,r,t,a){var i=e,n=r/3,o=t/3,s=a,u=i*o,d=n*s,f=n*n,l=o*o,h=i*o-f,m=i*s-n*o,p=n*s-l,c=4*h*p-m*m;if(c<0){var C,w,v,M=u*l<=f*d?-2*n*(w=h)+(C=i)*m:-(C=s)*m+2*o*(w=p),b=-(M<0?-1:1)*Math.abs(C)*Math.sqrt(-c),g=(v=b-M)/2,q=g<0?-Math.pow(-g,1/3):Math.pow(g,1/3),E=v===b?-q:-w/q,y=w<=0?q+E:-M/(q*q+E*E+w);return u*l<=f*d?[(y-n)/i]:[-s/(y+o)]}var D=h,R=-2*n*h+i*m,S=p,O=-s*m+2*o*p,x=Math.sqrt(c),P=Math.sqrt(3)/2,N=Math.abs(Math.atan2(i*x,-R)/3);y=2*Math.sqrt(-D);var L=Math.cos(N);v=y*L;var I=y*(-L/2-P*Math.sin(N)),z=2*n<v+I?v-n:I-n,T=i,U=z/T,N=Math.abs(Math.atan2(s*x,-O)/3),W=-s,B=(v=(y=2*Math.sqrt(-S))*(L=Math.cos(N)))+(I=y*(-L/2-P*Math.sin(N)))<2*o?v+o:I+o,V=W/B,Z=-z*B-T*W,k=(o*Z-n*(z*W))/(-n*Z+o*(T*B));return U<=k?U<=V?k<=V?[U,k,V]:[U,V,k]:[V,U,k]:U<=V?[k,U,V]:k<=V?[k,V,U]:[V,k,U]}O.computeDiscriminant=function(e,r,t,a){if("number"!=typeof e)throw new P.DeveloperError("a is a required number.");if("number"!=typeof r)throw new P.DeveloperError("b is a required number.");if("number"!=typeof t)throw new P.DeveloperError("c is a required number.");if("number"!=typeof a)throw new P.DeveloperError("d is a required number.");var i=r*r,n=t*t;return 18*e*r*t*a+i*n-27*(e*e)*(a*a)-4*(e*n*t+i*r*a)},O.computeRealRoots=function(e,r,t,a){if("number"!=typeof e)throw new P.DeveloperError("a is a required number.");if("number"!=typeof r)throw new P.DeveloperError("b is a required number.");if("number"!=typeof t)throw new P.DeveloperError("c is a required number.");if("number"!=typeof a)throw new P.DeveloperError("d is a required number.");var i,n;if(0===e)return W.computeRealRoots(r,t,a);if(0!==r)return 0===t?0===a?(n=-r/e)<0?[n,0,0]:[0,0,n]:s(e,r,0,a):0===a?0===(i=W.computeRealRoots(e,r,t)).length?[0]:i[1]<=0?[i[0],i[1],0]:0<=i[0]?[0,i[0],i[1]]:[i[0],0,i[1]]:s(e,r,t,a);if(0!==t)return 0===a?0===(i=W.computeRealRoots(e,0,t)).Length?[0]:[i[0],0,i[1]]:s(e,0,t,a);if(0===a)return[0,0,0];var o=(n=-a/e)<0?-Math.pow(-n,1/3):Math.pow(n,1/3);return[o,o,o]};var B={};function f(e,r,t,a){var i=e*e,n=r-3*i/8,o=t-r*e/2+i*e/8,s=a-t*e/4+r*i/16-3*i*i/256,u=O.computeRealRoots(1,2*n,n*n-4*s,-o*o);if(0<u.length){var d=-e/4,f=u[u.length-1];if(Math.abs(f)<z.CesiumMath.EPSILON14){var l=W.computeRealRoots(1,n,s);if(2===l.length){var h,m=l[0],p=l[1];if(0<=m&&0<=p){var c=Math.sqrt(m),C=Math.sqrt(p);return[d-C,d-c,d+c,d+C]}if(0<=m&&p<0)return[d-(h=Math.sqrt(m)),d+h];if(m<0&&0<=p)return[d-(h=Math.sqrt(p)),d+h]}return[]}if(0<f){var w=Math.sqrt(f),v=(n+f-o/w)/2,M=(n+f+o/w)/2,b=W.computeRealRoots(1,w,v),g=W.computeRealRoots(1,-w,M);return 0!==b.length?(b[0]+=d,b[1]+=d,0!==g.length?(g[0]+=d,g[1]+=d,b[1]<=g[0]?[b[0],b[1],g[0],g[1]]:g[1]<=b[0]?[g[0],g[1],b[0],b[1]]:b[0]>=g[0]&&b[1]<=g[1]?[g[0],b[0],b[1],g[1]]:g[0]>=b[0]&&g[1]<=b[1]?[b[0],g[0],g[1],b[1]]:b[0]>g[0]&&b[0]<g[1]?[g[0],b[0],g[1],b[1]]:[b[0],g[0],b[1],g[1]]):b):0!==g.length?(g[0]+=d,g[1]+=d,g):[]}}return[]}function l(e,r,t,a){var i=e*e,n=-2*r,o=t*e+r*r-4*a,s=i*a-t*r*e+t*t,u=O.computeRealRoots(1,n,o,s);if(0<u.length){var d,f,l,h,m,p,c,C,w=u[0],v=r-w,M=v*v,b=e/2,g=v/2,q=M-4*a,E=M+4*Math.abs(a),y=i-4*w,D=i+4*Math.abs(w);l=w<0||q*D<y*E?(f=(d=Math.sqrt(y))/2,0===d?0:(e*g-t)/d):(f=0===(h=Math.sqrt(q))?0:(e*g-t)/h,h/2),0==b&&0===f?p=m=0:z.CesiumMath.sign(b)===z.CesiumMath.sign(f)?p=w/(m=b+f):m=w/(p=b-f),0==g&&0===l?C=c=0:z.CesiumMath.sign(g)===z.CesiumMath.sign(l)?C=a/(c=g+l):c=a/(C=g-l);var R=W.computeRealRoots(1,m,c),S=W.computeRealRoots(1,p,C);if(0!==R.length)return 0!==S.length?R[1]<=S[0]?[R[0],R[1],S[0],S[1]]:S[1]<=R[0]?[S[0],S[1],R[0],R[1]]:R[0]>=S[0]&&R[1]<=S[1]?[S[0],R[0],R[1],S[1]]:S[0]>=R[0]&&S[1]<=R[1]?[R[0],S[0],S[1],R[1]]:R[0]>S[0]&&R[0]<S[1]?[S[0],R[0],S[1],R[1]]:[R[0],S[0],R[1],S[1]]:R;if(0!==S.length)return S}return[]}function t(e,r){r=T.Cartesian3.clone(x.defaultValue(r,T.Cartesian3.ZERO)),T.Cartesian3.equals(r,T.Cartesian3.ZERO)||T.Cartesian3.normalize(r,r),this.origin=T.Cartesian3.clone(x.defaultValue(e,T.Cartesian3.ZERO)),this.direction=r}B.computeDiscriminant=function(e,r,t,a,i){if("number"!=typeof e)throw new P.DeveloperError("a is a required number.");if("number"!=typeof r)throw new P.DeveloperError("b is a required number.");if("number"!=typeof t)throw new P.DeveloperError("c is a required number.");if("number"!=typeof a)throw new P.DeveloperError("d is a required number.");if("number"!=typeof i)throw new P.DeveloperError("e is a required number.");var n=e*e,o=r*r,s=o*r,u=t*t,d=u*t,f=a*a,l=f*a,h=i*i;return o*u*f-4*s*l-4*e*d*f+18*e*r*t*l-27*n*f*f+256*(n*e)*(h*i)+i*(18*s*t*a-4*o*d+16*e*u*u-80*e*r*u*a-6*e*o*f+144*n*t*f)+h*(144*e*o*t-27*o*o-128*n*u-192*n*r*a)},B.computeRealRoots=function(e,r,t,a,i){if("number"!=typeof e)throw new P.DeveloperError("a is a required number.");if("number"!=typeof r)throw new P.DeveloperError("b is a required number.");if("number"!=typeof t)throw new P.DeveloperError("c is a required number.");if("number"!=typeof a)throw new P.DeveloperError("d is a required number.");if("number"!=typeof i)throw new P.DeveloperError("e is a required number.");if(Math.abs(e)<z.CesiumMath.EPSILON15)return O.computeRealRoots(r,t,a,i);var n=r/e,o=t/e,s=a/e,u=i/e,d=n<0?1:0;switch(d+=o<0?d+1:d,d+=s<0?d+1:d,d+=u<0?d+1:d){case 0:return f(n,o,s,u);case 1:case 2:return l(n,o,s,u);case 3:case 4:return f(n,o,s,u);case 5:return l(n,o,s,u);case 6:case 7:return f(n,o,s,u);case 8:return l(n,o,s,u);case 9:case 10:return f(n,o,s,u);case 11:return l(n,o,s,u);case 12:case 13:case 14:case 15:return f(n,o,s,u);default:return}},t.clone=function(e,r){if(x.defined(e))return x.defined(r)?(r.origin=T.Cartesian3.clone(e.origin),r.direction=T.Cartesian3.clone(e.direction),r):new t(e.origin,e.direction)},t.getPoint=function(e,r,t){return P.Check.typeOf.object("ray",e),P.Check.typeOf.number("t",r),x.defined(t)||(t=new T.Cartesian3),t=T.Cartesian3.multiplyByScalar(e.direction,r,t),T.Cartesian3.add(e.origin,t,t)};var h={rayPlane:function(e,r,t){if(!x.defined(e))throw new P.DeveloperError("ray is required.");if(!x.defined(r))throw new P.DeveloperError("plane is required.");x.defined(t)||(t=new T.Cartesian3);var a=e.origin,i=e.direction,n=r.normal,o=T.Cartesian3.dot(n,i);if(!(Math.abs(o)<z.CesiumMath.EPSILON15)){var s=(-r.distance-T.Cartesian3.dot(n,a))/o;if(!(s<0))return t=T.Cartesian3.multiplyByScalar(i,s,t),T.Cartesian3.add(a,t,t)}}},w=new T.Cartesian3,v=new T.Cartesian3,M=new T.Cartesian3,b=new T.Cartesian3,g=new T.Cartesian3;h.rayTriangleParametric=function(e,r,t,a,i){if(!x.defined(e))throw new P.DeveloperError("ray is required.");if(!x.defined(r))throw new P.DeveloperError("p0 is required.");if(!x.defined(t))throw new P.DeveloperError("p1 is required.");if(!x.defined(a))throw new P.DeveloperError("p2 is required.");i=x.defaultValue(i,!1);var n,o,s,u=e.origin,d=e.direction,f=T.Cartesian3.subtract(t,r,w),l=T.Cartesian3.subtract(a,r,v),h=T.Cartesian3.cross(d,l,M),m=T.Cartesian3.dot(f,h);if(i){if(m<z.CesiumMath.EPSILON6)return;if(C=T.Cartesian3.subtract(u,r,b),(p=T.Cartesian3.dot(C,h))<0||m<p)return;if(n=T.Cartesian3.cross(C,f,g),(o=T.Cartesian3.dot(d,n))<0||m<p+o)return;s=T.Cartesian3.dot(l,n)/m}else{if(Math.abs(m)<z.CesiumMath.EPSILON6)return;var p,c=1/m,C=T.Cartesian3.subtract(u,r,b);if((p=T.Cartesian3.dot(C,h)*c)<0||1<p)return;if(n=T.Cartesian3.cross(C,f,g),(o=T.Cartesian3.dot(d,n)*c)<0||1<p+o)return;s=T.Cartesian3.dot(l,n)*c}return s},h.rayTriangle=function(e,r,t,a,i,n){var o=h.rayTriangleParametric(e,r,t,a,i);if(x.defined(o)&&!(o<0))return x.defined(n)||(n=new T.Cartesian3),T.Cartesian3.multiplyByScalar(e.direction,o,n),T.Cartesian3.add(e.origin,n,n)};var m=new t;h.lineSegmentTriangle=function(e,r,t,a,i,n,o){if(!x.defined(e))throw new P.DeveloperError("v0 is required.");if(!x.defined(r))throw new P.DeveloperError("v1 is required.");if(!x.defined(t))throw new P.DeveloperError("p0 is required.");if(!x.defined(a))throw new P.DeveloperError("p1 is required.");if(!x.defined(i))throw new P.DeveloperError("p2 is required.");var s=m;T.Cartesian3.clone(e,s.origin),T.Cartesian3.subtract(r,e,s.direction),T.Cartesian3.normalize(s.direction,s.direction);var u=h.rayTriangleParametric(s,t,a,i,n);if(!(!x.defined(u)||u<0||u>T.Cartesian3.distance(e,r)))return x.defined(o)||(o=new T.Cartesian3),T.Cartesian3.multiplyByScalar(s.direction,u,o),T.Cartesian3.add(s.origin,o,o)};var p={root0:0,root1:0};function u(e,r,t){x.defined(t)||(t=new U.Interval);var a=e.origin,i=e.direction,n=r.center,o=r.radius*r.radius,s=T.Cartesian3.subtract(a,n,M),u=function(e,r,t,a){var i=r*r-4*e*t;if(!(i<0)){if(0<i){var n=1/(2*e),o=Math.sqrt(i),s=(-r+o)*n,u=(-r-o)*n;return s<u?(a.root0=s,a.root1=u):(a.root0=u,a.root1=s),a}var d=-r/(2*e);if(0!=d)return a.root0=a.root1=d,a}}(T.Cartesian3.dot(i,i),2*T.Cartesian3.dot(i,s),T.Cartesian3.magnitudeSquared(s)-o,p);if(x.defined(u))return t.start=u.root0,t.stop=u.root1,t}h.raySphere=function(e,r,t){if(!x.defined(e))throw new P.DeveloperError("ray is required.");if(!x.defined(r))throw new P.DeveloperError("sphere is required.");if(t=u(e,r,t),x.defined(t)&&!(t.stop<0))return t.start=Math.max(t.start,0),t};var c=new t;h.lineSegmentSphere=function(e,r,t,a){if(!x.defined(e))throw new P.DeveloperError("p0 is required.");if(!x.defined(r))throw new P.DeveloperError("p1 is required.");if(!x.defined(t))throw new P.DeveloperError("sphere is required.");var i=c;T.Cartesian3.clone(e,i.origin);var n=T.Cartesian3.subtract(r,e,i.direction),o=T.Cartesian3.magnitude(n);if(T.Cartesian3.normalize(n,n),a=u(i,t,a),!(!x.defined(a)||a.stop<0||a.start>o))return a.start=Math.max(a.start,0),a.stop=Math.min(a.stop,o),a};var C=new T.Cartesian3,q=new T.Cartesian3;function V(e,r,t){var a=e+r;return z.CesiumMath.sign(e)!==z.CesiumMath.sign(r)&&Math.abs(a/Math.max(Math.abs(e),Math.abs(r)))<t?0:a}h.rayEllipsoid=function(e,r){if(!x.defined(e))throw new P.DeveloperError("ray is required.");if(!x.defined(r))throw new P.DeveloperError("ellipsoid is required.");var t,a,i=r.oneOverRadii,n=T.Cartesian3.multiplyComponents(i,e.origin,C),o=T.Cartesian3.multiplyComponents(i,e.direction,q),s=T.Cartesian3.magnitudeSquared(n),u=T.Cartesian3.dot(n,o);if(1<s){if(0<=u)return;var d,f,l=u*u,h=s-1;if(l<(f=(d=T.Cartesian3.magnitudeSquared(o))*h))return;if(f<l){t=u*u-f;var m=(a=-u+Math.sqrt(t))/d,p=h/a;return m<p?new U.Interval(m,p):{start:p,stop:m}}var c=Math.sqrt(h/d);return new U.Interval(c,c)}return s<1?(h=s-1,t=u*u-(f=(d=T.Cartesian3.magnitudeSquared(o))*h),a=-u+Math.sqrt(t),new U.Interval(0,a/d)):u<0?(d=T.Cartesian3.magnitudeSquared(o),new U.Interval(0,-u/d)):void 0};var N=new T.Cartesian3,L=new T.Cartesian3,I=new T.Cartesian3,Z=new T.Cartesian3,k=new T.Cartesian3,A=new U.Matrix3,j=new U.Matrix3,F=new U.Matrix3,G=new U.Matrix3,Y=new U.Matrix3,_=new U.Matrix3,H=new U.Matrix3,J=new T.Cartesian3,K=new T.Cartesian3,Q=new T.Cartographic;h.grazingAltitudeLocation=function(e,r){if(!x.defined(e))throw new P.DeveloperError("ray is required.");if(!x.defined(r))throw new P.DeveloperError("ellipsoid is required.");var t=e.origin,a=e.direction;if(!T.Cartesian3.equals(t,T.Cartesian3.ZERO)){var i=r.geodeticSurfaceNormal(t,N);if(0<=T.Cartesian3.dot(a,i))return t}var n=x.defined(this.rayEllipsoid(e,r)),o=r.transformPositionToScaledSpace(a,N),s=T.Cartesian3.normalize(o,o),u=T.Cartesian3.mostOrthogonalAxis(o,Z),d=T.Cartesian3.normalize(T.Cartesian3.cross(u,s,L),L),f=T.Cartesian3.normalize(T.Cartesian3.cross(s,d,I),I),l=A;l[0]=s.x,l[1]=s.y,l[2]=s.z,l[3]=d.x,l[4]=d.y,l[5]=d.z,l[6]=f.x,l[7]=f.y,l[8]=f.z;var h=U.Matrix3.transpose(l,j),m=U.Matrix3.fromScale(r.radii,F),p=U.Matrix3.fromScale(r.oneOverRadii,G),c=Y;c[0]=0,c[1]=-a.z,c[2]=a.y,c[3]=a.z,c[4]=0,c[5]=-a.x,c[6]=-a.y,c[7]=a.x,c[8]=0;var C,w=U.Matrix3.multiply(U.Matrix3.multiply(h,p,_),c,_),v=U.Matrix3.multiply(U.Matrix3.multiply(w,m,H),l,H),M=U.Matrix3.multiplyByVector(w,t,k),b=function(e,r,t,a,i){var n,o=a*a,s=i*i,u=(e[U.Matrix3.COLUMN1ROW1]-e[U.Matrix3.COLUMN2ROW2])*s,d=i*(a*V(e[U.Matrix3.COLUMN1ROW0],e[U.Matrix3.COLUMN0ROW1],z.CesiumMath.EPSILON15)+r.y),f=e[U.Matrix3.COLUMN0ROW0]*o+e[U.Matrix3.COLUMN2ROW2]*s+a*r.x+t,l=s*V(e[U.Matrix3.COLUMN2ROW1],e[U.Matrix3.COLUMN1ROW2],z.CesiumMath.EPSILON15),h=i*(a*V(e[U.Matrix3.COLUMN2ROW0],e[U.Matrix3.COLUMN0ROW2])+r.z),m=[];if(0==h&&0==l){if(0===(n=W.computeRealRoots(u,d,f)).length)return m;var p,c,C=n[0],w=Math.sqrt(Math.max(1-C*C,0));return m.push(new T.Cartesian3(a,i*C,i*-w)),m.push(new T.Cartesian3(a,i*C,i*w)),2===n.length&&(p=n[1],c=Math.sqrt(Math.max(1-p*p,0)),m.push(new T.Cartesian3(a,i*p,i*-c)),m.push(new T.Cartesian3(a,i*p,i*c))),m}var v=h*h,M=l*l,b=h*l,g=u*u+M,q=2*(d*u+b),E=2*f*u+d*d-M+v,y=2*(f*d-b),D=f*f-v;if(0==g&&0==q&&0==E&&0==y)return m;var R=(n=B.computeRealRoots(g,q,E,y,D)).length;if(0===R)return m;for(var S=0;S<R;++S){var O=n[S],x=O*O,P=Math.max(1-x,0),N=Math.sqrt(P),L=z.CesiumMath.sign(u)===z.CesiumMath.sign(f)?V(u*x+f,d*O,z.CesiumMath.EPSILON12):z.CesiumMath.sign(f)===z.CesiumMath.sign(d*O)?V(u*x,d*O+f,z.CesiumMath.EPSILON12):V(u*x+d*O,f,z.CesiumMath.EPSILON12),I=L*V(l*O,h,z.CesiumMath.EPSILON15);I<0?m.push(new T.Cartesian3(a,i*O,i*N)):0<I?m.push(new T.Cartesian3(a,i*O,i*-N)):0!==N?(m.push(new T.Cartesian3(a,i*O,i*-N)),m.push(new T.Cartesian3(a,i*O,i*N)),++S):m.push(new T.Cartesian3(a,i*O,i*N))}return m}(v,T.Cartesian3.negate(M,N),0,0,1),g=b.length;if(0<g){for(var q=T.Cartesian3.clone(T.Cartesian3.ZERO,K),E=Number.NEGATIVE_INFINITY,y=0;y<g;++y){C=U.Matrix3.multiplyByVector(m,U.Matrix3.multiplyByVector(l,b[y],J),J);var D=T.Cartesian3.normalize(T.Cartesian3.subtract(C,t,Z),Z),R=T.Cartesian3.dot(D,a);E<R&&(E=R,q=T.Cartesian3.clone(C,q))}var S=r.cartesianToCartographic(q,Q),E=z.CesiumMath.clamp(E,0,1),O=T.Cartesian3.magnitude(T.Cartesian3.subtract(q,t,Z))*Math.sqrt(1-E*E);return O=n?-O:O,S.height=O,r.cartographicToCartesian(S,new T.Cartesian3)}};var E=new T.Cartesian3;h.lineSegmentPlane=function(e,r,t,a){if(!x.defined(e))throw new P.DeveloperError("endPoint0 is required.");if(!x.defined(r))throw new P.DeveloperError("endPoint1 is required.");if(!x.defined(t))throw new P.DeveloperError("plane is required.");x.defined(a)||(a=new T.Cartesian3);var i=T.Cartesian3.subtract(r,e,E),n=t.normal,o=T.Cartesian3.dot(n,i);if(!(Math.abs(o)<z.CesiumMath.EPSILON6)){var s=T.Cartesian3.dot(n,e),u=-(t.distance+s)/o;if(!(u<0||1<u))return T.Cartesian3.multiplyByScalar(i,u,a),T.Cartesian3.add(e,a,a),a}},h.trianglePlaneIntersection=function(e,r,t,a){if(!(x.defined(e)&&x.defined(r)&&x.defined(t)&&x.defined(a)))throw new P.DeveloperError("p0, p1, p2, and plane are required.");var i,n,o=a.normal,s=a.distance,u=T.Cartesian3.dot(o,e)+s<0,d=T.Cartesian3.dot(o,r)+s<0,f=T.Cartesian3.dot(o,t)+s<0,l=0;if(l+=u?1:0,l+=d?1:0,1!=(l+=f?1:0)&&2!=l||(i=new T.Cartesian3,n=new T.Cartesian3),1==l){if(u)return h.lineSegmentPlane(e,r,a,i),h.lineSegmentPlane(e,t,a,n),{positions:[e,r,t,i,n],indices:[0,3,4,1,2,4,1,4,3]};if(d)return h.lineSegmentPlane(r,t,a,i),h.lineSegmentPlane(r,e,a,n),{positions:[e,r,t,i,n],indices:[1,3,4,2,0,4,2,4,3]};if(f)return h.lineSegmentPlane(t,e,a,i),h.lineSegmentPlane(t,r,a,n),{positions:[e,r,t,i,n],indices:[2,3,4,0,1,4,0,4,3]}}else if(2==l){if(!u)return h.lineSegmentPlane(r,e,a,i),h.lineSegmentPlane(t,e,a,n),{positions:[e,r,t,i,n],indices:[1,2,4,1,4,3,0,3,4]};if(!d)return h.lineSegmentPlane(t,r,a,i),h.lineSegmentPlane(e,r,a,n),{positions:[e,r,t,i,n],indices:[2,0,4,2,4,3,1,3,4]};if(!f)return h.lineSegmentPlane(e,t,a,i),h.lineSegmentPlane(r,t,a,n),{positions:[e,r,t,i,n],indices:[0,1,4,0,4,3,2,3,4]}}},e.IntersectionTests=h,e.Ray=t}); |