/** * 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","./defaultValue-199f5aa8","./Cartesian2-8fa798b8","./defineProperties-ae15c9d5","./Transforms-a140c8a7"],function(e,u,a,p,m,i,r){"use strict";function t(e,a){this._ellipsoid=e,this._cameraPosition=new m.Cartesian3,this._cameraPositionInScaledSpace=new m.Cartesian3,this._distanceToLimbInScaledSpaceSquared=0,u.defined(a)&&(this.cameraPosition=a)}i.defineProperties(t.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(e){var a=this._ellipsoid.transformPositionToScaledSpace(e,this._cameraPositionInScaledSpace),i=m.Cartesian3.magnitudeSquared(a)-1;m.Cartesian3.clone(e,this._cameraPosition),this._cameraPositionInScaledSpace=a,this._distanceToLimbInScaledSpaceSquared=i}}});var o=new m.Cartesian3;t.prototype.isPointVisible=function(e){var a=this._ellipsoid.transformPositionToScaledSpace(e,o);return this.isScaledSpacePointVisible(a)},t.prototype.isScaledSpacePointVisible=function(e){var a=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared,t=m.Cartesian3.subtract(e,a,o),n=-m.Cartesian3.dot(t,a);return!(i<0?0i)},t.prototype.computeHorizonCullingPoint=function(e,a,i){u.defined(i)||(i=new m.Cartesian3);for(var t=this._ellipsoid,n=h(t,e),r=0,o=0,s=a.length;o