@@ -191,7 +191,6 @@ export default class AnalysisManager {
191191 constructor ( options ) {
192192 this . _viewer = Cesium . defaultValue ( options . viewer , undefined ) ;
193193 this . _scene = this . _viewer . scene ;
194- this . _commFun = new CommonFuncManager ( options ) ;
195194 }
196195
197196 /**
@@ -335,7 +334,7 @@ export default class AnalysisManager {
335334 for ( let j = 0 ; j < cartesianArr . length - 1 ; j += 1 ) {
336335 len += Math . sqrt ( ( cartesianArr [ j ] . x - cartesianArr [ j + 1 ] . x ) ** 2 + ( cartesianArr [ j ] . y - cartesianArr [ j + 1 ] . y ) ** 2 ) ;
337336 }
338- const pnts = this . _commFun . linearInterpolate3D ( cartesianArr , len / 300 ) ;
337+ const pnts = CommonFuncManager . linearInterpolate3D ( cartesianArr , len / 300 ) ;
339338
340339 let cartographicsArr = this . _viewer . scene . globe . ellipsoid . cartesianArrayToCartographicArray ( cartesianArr ) ;
341340 cartographicsArr = cartographicsArr . concat ( this . _viewer . scene . globe . ellipsoid . cartesianArrayToCartographicArray ( pnts ) ) ;
@@ -556,20 +555,20 @@ export default class AnalysisManager {
556555 * @function module:客户端可视化分析.AnalysisManager.prototype.createDynamicCutting
557556 * @param {Object } tileset 图层集
558557 * @param {Array } planes 平面集
559- * @param {Object } optionsParam 动态剖切参数
560- * @param {Color } [optionsParam .color] 材质
561- * @param {Boolean } [optionsParam .interaction] 交互
558+ * @param {Object } options 动态剖切参数
559+ * @param {Color } [options .color] 材质
560+ * @param {Boolean } [options .interaction] 交互
562561 */
563- createDynamicCutting ( tilesets , planes , optionsParam ) {
562+ createDynamicCutting ( tilesets , planes , options ) {
564563 if ( ! Cesium . defined ( tilesets ) && tilesets . length > 0 ) {
565564 return undefined ;
566565 }
567566 let material = Cesium . Color . WHITE . withAlpha ( 0.02 ) ;
568567 let interaction = false ;
569- const options = Cesium . defaultValue ( optionsParam , { } ) ;
568+ const optionsParam = Cesium . defaultValue ( options , { } ) ;
570569
571- material = Cesium . defaultValue ( options . color , material ) ;
572- interaction = Cesium . defaultValue ( options . interaction , false ) ;
570+ material = Cesium . defaultValue ( optionsParam . color , material ) ;
571+ interaction = Cesium . defaultValue ( optionsParam . interaction , false ) ;
573572
574573 const that = this ;
575574 const cutPlanes = [ ] ;
@@ -693,27 +692,27 @@ export default class AnalysisManager {
693692 * @param {Array } planeArray 用于卷帘分析的两个面
694693 * @param {Number } distance 平面一的距离
695694 * @param {Number } distance1 平面二的距离
696- * @param {Object } optionsParam 剖切面材质参数
697- * @param {Color } [optionsParam .color] 剖切一的颜色
698- * @param {Color } [optionsParam .color1] 剖切二的颜色
695+ * @param {Object } options 剖切面材质参数
696+ * @param {Color } [options .color] 剖切一的颜色
697+ * @param {Color } [options .color1] 剖切二的颜色
699698 * @example
700699 * 调用方法
701700 * analysisManager.createRollershutters([tileset],distance,distance2);
702701 */
703- createRollershutters ( tileset , planeArray , distance , distance1 , optionsParam ) {
704- const options = Cesium . defaultValue ( optionsParam , { } ) ;
702+ createRollershutters ( tileset , planeArray , distance , distance1 , options ) {
703+ const optionsParam = Cesium . defaultValue ( options , { } ) ;
705704 const plane = Cesium . defaultValue ( planeArray [ 0 ] , new Cesium . ClippingPlane ( new Cesium . Cartesian3 ( 1 , 0 , 0 ) , - 200.0 ) ) ;
706705 const plane1 = Cesium . defaultValue ( planeArray [ 1 ] , new Cesium . ClippingPlane ( new Cesium . Cartesian3 ( - 1 , 0 , 0 ) , - 200.0 ) ) ;
707706 const dynaCut = this . createDynamicCutting ( tileset , [ plane ] , {
708- color : Cesium . defaultValue ( options . color , new Cesium . Color ( 1.0 , 1.0 , 1.0 , 0.3 ) )
707+ color : Cesium . defaultValue ( optionsParam . color , new Cesium . Color ( 1.0 , 1.0 , 1.0 , 0.3 ) )
709708 } ) ;
710709 const planetEntity = dynaCut . planes [ 0 ] ;
711710 planetEntity . plane . plane = new Cesium . CallbackProperty ( ( ) => {
712711 plane . distance = distance ;
713712 return Cesium . Plane . transform ( plane , tileset [ 0 ] . modelMatrix , new Cesium . ClippingPlane ( Cesium . Cartesian3 . UNIT_X , 0.0 ) ) ;
714713 } , false ) ;
715714 const dynaCut1 = this . createDynamicCutting ( tileset , [ plane1 ] , {
716- color : Cesium . defaultValue ( options . color1 , new Cesium . Color ( 1.0 , 1.0 , 1.0 , 0.3 ) )
715+ color : Cesium . defaultValue ( optionsParam . color1 , new Cesium . Color ( 1.0 , 1.0 , 1.0 , 0.3 ) )
717716 } ) ;
718717 const planetEntity1 = dynaCut1 . planes [ 0 ] ;
719718 planetEntity1 . plane . plane = new Cesium . CallbackProperty ( ( ) => {
@@ -726,31 +725,31 @@ export default class AnalysisManager {
726725 * @function module:客户端可视化分析.AnalysisManager.prototype.startCustomDisplay
727726 * @param {Array<layer> } layerList 图层列表
728727 * @param {Array<id> } idList id列表
729- * @param {Object } optionsParam 扩展属性
730- * @param {Color } [optionsParam .color = new Cesium.Color(1.0,0,0,0.5)] 高亮颜色
731- * @param {Cesium3DTileColorBlendMode } [optionsParam .colorBlendMode = Cesium.Cesium3DTileColorBlendMode.HIGHLIGHT] 高亮模式
732- * @param {Number } [optionsParam .colorBlendAmount = 0.5] 混合系数
733- * @param {Boolean } [optionsParam .applyForLayer = false] 是否应用至图层
734- * @param {Color } [optionsParam .negate = true] 是否取反 ——意思是除了id列表中的要素应用color
735- * @param {Color } [optionsParam .negateColor = new Cesium.Color.WHITE] 取反的颜色 只有在negate=true 的时候才起作用
736- * @param {String } [optionsParam .style='EdgeHighlight'] 高亮模式//'EdgeHighlight'高亮+描边 'Edge'//描边
737- * @param {Color } [optionsParam .edgeColor=new Cesium.Color(0, 0, 1,1.0)] //描边颜色 默认红色
728+ * @param {Object } options 扩展属性
729+ * @param {Color } [options .color = new Cesium.Color(1.0,0,0,0.5)] 高亮颜色
730+ * @param {Cesium3DTileColorBlendMode } [options .colorBlendMode = Cesium.Cesium3DTileColorBlendMode.HIGHLIGHT] 高亮模式
731+ * @param {Number } [options .colorBlendAmount = 0.5] 混合系数
732+ * @param {Boolean } [options .applyForLayer = false] 是否应用至图层
733+ * @param {Color } [options .negate = true] 是否取反 ——意思是除了id列表中的要素应用color
734+ * @param {Color } [options .negateColor = new Cesium.Color.WHITE] 取反的颜色 只有在negate=true 的时候才起作用
735+ * @param {String } [options .style='EdgeHighlight'] 高亮模式//'EdgeHighlight'高亮+描边 'Edge'//描边
736+ * @param {Color } [options .edgeColor=new Cesium.Color(0, 0, 1,1.0)] //描边颜色 默认红色
738737 *
739738 */
740- startCustomDisplay ( layerList , idList , optionsParam ) {
739+ startCustomDisplay ( layerList , idList , options ) {
741740 if ( ! Cesium . defined ( layerList ) || ! Cesium . defined ( idList ) ) {
742741 return ;
743742 }
744- const options = Cesium . defaultValue ( optionsParam , { } ) ;
743+ const optionsParam = Cesium . defaultValue ( options , { } ) ;
745744 const that = this ;
746- let colorUse = Cesium . defaultValue ( options . color , new Cesium . Color ( 1 , 0 , 0 , 0.5 ) ) ;
747- const edgeColorUse = Cesium . defaultValue ( options . edgeColor , new Cesium . Color ( 1 , 0 , 0 , 1.0 ) ) ;
748- const negate = Cesium . defaultValue ( options . negate , false ) ;
749- const negateColor = Cesium . defaultValue ( options . negateColor , Cesium . Color . WHITE ) ;
750- const applyForLayer = Cesium . defaultValue ( options . applyForLayer , false ) ;
751- const style = Cesium . defaultValue ( options . style , '' ) ;
752- const colorBlendMode = Cesium . defaultValue ( options . colorBlendMode , Cesium . Cesium3DTileColorBlendMode . HIGHLIGHT ) ;
753- const colorBlendAmount = Cesium . defaultValue ( options . colorBlendAmount , 0.5 ) ;
745+ let colorUse = Cesium . defaultValue ( optionsParam . color , new Cesium . Color ( 1 , 0 , 0 , 0.5 ) ) ;
746+ const edgeColorUse = Cesium . defaultValue ( optionsParam . edgeColor , new Cesium . Color ( 1 , 0 , 0 , 1.0 ) ) ;
747+ const negate = Cesium . defaultValue ( optionsParam . negate , false ) ;
748+ const negateColor = Cesium . defaultValue ( optionsParam . negateColor , Cesium . Color . WHITE ) ;
749+ const applyForLayer = Cesium . defaultValue ( optionsParam . applyForLayer , false ) ;
750+ const style = Cesium . defaultValue ( optionsParam . style , '' ) ;
751+ const colorBlendMode = Cesium . defaultValue ( optionsParam . colorBlendMode , Cesium . Cesium3DTileColorBlendMode . HIGHLIGHT ) ;
752+ const colorBlendAmount = Cesium . defaultValue ( optionsParam . colorBlendAmount , 0.5 ) ;
754753 if ( style === 'Edge' && ! Cesium . defined ( this . _edgeDetectionStageCD ) ) {
755754 this . _edgeDetectionStageCD = Cesium . PostProcessStageLibrary . createEdgeDetectionStage ( ) ;
756755 this . _edgeDetectionStageCD . uniforms . color = edgeColorUse ; // Color.BLUE;
0 commit comments