|
@@ -139524,14 +139524,17 @@ ENDSEC
|
|
|
boundSize.x = Math.max(min, boundSize.x);
|
|
|
boundSize.y = Math.max(min, boundSize.y);
|
|
|
}
|
|
|
- if(camera.type == 'OrthographicCamera'){
|
|
|
- //dis = boundSize.length()
|
|
|
- o.dontChangeCamDir = true; //强制不改方向
|
|
|
- //必须在模型外部
|
|
|
- this.mainViewport.targetPlane.setFromNormalAndCoplanarPoint(this.mainViewport.view.direction, this.bound.center );
|
|
|
- this.mainViewport.targetPlane.projectPoint(target, this.mainViewport.shiftTarget ); //得到target在中心面的投影
|
|
|
- let pos = this.splitScreen.getPosOutOfModel(this.mainViewport, this.bound.size); //得到观察位置(shiftTarget投影到模型外部)
|
|
|
- dis = pos.distanceTo(target);
|
|
|
+ if(camera.type == 'OrthographicCamera'){
|
|
|
+ if(o.dontChangeCamDir) {
|
|
|
+ //必须在模型外部(如点击测量线时)
|
|
|
+ this.mainViewport.targetPlane.setFromNormalAndCoplanarPoint(this.mainViewport.view.direction, this.bound.center );
|
|
|
+ this.mainViewport.targetPlane.projectPoint(target, this.mainViewport.shiftTarget ); //得到target在中心面的投影
|
|
|
+ let pos = this.splitScreen.getPosOutOfModel(this.mainViewport, this.bound.size); //得到观察位置(shiftTarget投影到模型外部)
|
|
|
+ dis = pos.distanceTo(target);
|
|
|
+ }else {
|
|
|
+ dis = boundSize.length();
|
|
|
+ }
|
|
|
+
|
|
|
}else {
|
|
|
let aspect = boundSize.x / boundSize.y;
|
|
|
if(camera.aspect > aspect){//视野更宽则用bound的纵向来决定
|