园林绿化
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
16 KiB

  1. /**
  2. * @license
  3. * Cesium - https://github.com/CesiumGS/cesium
  4. * Version 1.140.0
  5. *
  6. * Copyright 2011-2022 Cesium Contributors
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. *
  20. * Columbus View (Pat. Pend.)
  21. *
  22. * Portions licensed separately.
  23. * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
  24. */
  25. import{b as U}from"./chunk-UKJ254OV.js";import{a as ft}from"./chunk-QQJ4EFK2.js";import{a as i,b}from"./chunk-XXWWJ3QU.js";import{a as y}from"./chunk-N6SIW7ZL.js";import{a as w,b as tt}from"./chunk-K35RPNUR.js";import{e as g}from"./chunk-RTRJ3LVQ.js";var nt={};nt.computeDiscriminant=function(t,n,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof n!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");return n*n-4*t*r};function mt(t,n,r){let e=t+n;return y.sign(t)!==y.sign(n)&&Math.abs(e/Math.max(Math.abs(t),Math.abs(n)))<r?0:e}nt.computeRealRoots=function(t,n,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof n!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");let e;if(t===0)return n===0?[]:[-r/n];if(n===0){if(r===0)return[0,0];let u=Math.abs(r),f=Math.abs(t);if(u<f&&u/f<y.EPSILON14)return[0,0];if(u>f&&f/u<y.EPSILON14)return[];if(e=-r/t,e<0)return[];let h=Math.sqrt(e);return[-h,h]}else if(r===0)return e=-n/t,e<0?[e,0]:[0,e];let o=n*n,s=4*t*r,c=mt(o,-s,y.EPSILON14);if(c<0)return[];let a=-.5*mt(n,y.sign(n)*Math.sqrt(c),y.EPSILON14);return n>0?[a/t,r/a]:[r/a,a/t]};var z=nt;var rt={};rt.computeDiscriminant=function(t,n,r,e){if(typeof t!="number")throw new w("a is a required number.");if(typeof n!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof e!="number")throw new w("d is a required number.");let o=t*t,s=n*n,c=r*r,a=e*e;return 18*t*n*r*e+s*c-27*o*a-4*(t*c*r+s*n*e)};function et(t,n,r,e){let o=t,s=n/3,c=r/3,a=e,u=o*c,f=s*a,h=s*s,d=c*c,p=o*c-h,q=o*a-s*c,m=s*a-d,l=4*p*m-q*q,E,x;if(l<0){let J,k,G;h*f>=u*d?(J=o,k=p,G=-2*s*p+o*q):(J=a,k=m,G=-a*q+2*c*m);let ut=-(G<0?-1:1)*Math.abs(J)*Math.sqrt(-l);x=-G+ut;let K=x/2,Y=K<0?-Math.pow(-K,1/3):Math.pow(K,1/3),$=x===ut?-Y:-k/Y;return E=k<=0?Y+$:-G/(Y*Y+$*$+k),h*f>=u*d?[(E-s)/o]:[-a/(E+c)]}let v=p,W=-2*s*p+o*q,L=m,B=-a*q+2*c*m,I=Math.sqrt(l),C=Math.sqrt(3)/2,P=Math.abs(Math.atan2(o*I,-W)/3);E=2*Math.sqrt(-v);let R=Math.cos(P);x=E*R;let S=E*(-R/2-C*Math.sin(P)),M=x+S>2*s?x-s:S-s,N=o,D=M/N;P=Math.abs(Math.atan2(a*I,-B)/3),E=2*Math.sqrt(-L),R=Math.cos(P),x=E*R,S=E*(-R/2-C*Math.sin(P));let _=-a,Z=x+S<2*c?x+c:S+c,A=_/Z,Rt=N*Z,at=-M*Z-N*_,bt=M*_,V=(c*at-s*bt)/(-s*at+c*Rt);return D<=V?D<=A?V<=A?[D,V,A]:[D,A,V]:[A,D,V]:D<=A?[V,D,A]:V<=A?[V,A,D]:[A,V,D]}rt.computeRealRoots=function(t,n,r,e){if(typeof t!="number")throw new w("a is a required number.");if(typeof n!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof e!="number")throw new w("d is a required number.");let o,s;if(t===0)return z.computeRealRoots(n,r,e);if(n===0){if(r===0){if(e===0)return[0,0,0];s=-e/t;let c=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3);return[c,c,c]}else if(e===0)return o=z.computeRealRoots(t,0,r),o.Length===0?[0]:[o[0],0,o[1]];return et(t,0,r,e)}else{if(r===0)return e===0?(s=-n/t,s<0?[s,0,0]:[0,0,s]):et(t,n,0,e);if(e===0)return o=z.computeRealRoots(t,n,r),o.length===0?[0]:o[1]<=0?[o[0],o[1],0]:o[0]>=0?[0,o[0],o[1]]:[o[0],0,o[1]]}return et(t,n,r,e)};var H=rt;var ot={};ot.computeDiscriminant=function(t,n,r,e,o){if(typeof t!="number")throw new w("a is a required number.");if(typeof n!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof e!="number")throw new w("d is a required number.");if(typeof o!="number")throw new w("e is a required number.");let s=t*t,c=s*t,a=n*n,u=a*n,f=r*r,h=f*r,d=e*e,p=d*e,q=o*o,m=q*o;return a*f*d-4*u*p-4*t*h*d+18*t*n*r*p-27*s*d*d+256*c*m+o*(18*u*r*e-4*a*h+16*t*f*f-80*t*n*f*e-6*t*a*d+144*s*r*d)+q*(144*t*a*r-27*a*a-128*s*f-192*s*n*e)};function T(t,n,r,e){let o=t*t,s=n-3*o/8,c=r-n*t/2+o*t/8,a=e-r*t/4+n*o/16-3*o*o/256,u=H.computeRealRoots(1,2*s,s*s-4*a,-c*c);if(u.length>0){let f=-t/4,h=u[u.length-1];if(Math.abs(h)<y.EPSILON14){let d=z.computeRealRoots(1,s,a);if(d.length===2){let p=d[0],q=d[1],m;if(p>=0&&q>=0){let l=Math.sqrt(p),E=Math.sqrt(q);retur