|
@@ -96,12 +96,15 @@ export class ExtendPointCloudOctree extends PointCloudOctree{
|
|
|
|
|
|
|
|
|
if( this.nodeMaxLevel==0 )return true
|
|
|
- if(camera.type == "OrthographicCamera"){
|
|
|
- if(!Potree.Utils.isInsideFrustum(this.pcoGeometry.tightBoundingBox, camera)){
|
|
|
+ if(camera.type == "OrthographicCamera" || this.testMaxNodeCount < 50){
|
|
|
+ if(!Potree.Utils.isInsideFrustum(this.bound, camera)){
|
|
|
return true
|
|
|
}
|
|
|
}else if( !viewer.atDatasets.includes(this))return true //否则老远就count++
|
|
|
+
|
|
|
+
|
|
|
|
|
|
+
|
|
|
let levels = this.visibleNodes.map(e=>e.getLevel())
|
|
|
let actMaxLevel = Math.max.apply(null, levels) //实际加载到的最高的node level
|
|
|
if(actMaxLevel < this.maxLevel)return true// 还没加载到能加载到的最高。 但在细节设置较低时,排除作用微弱。
|
|
@@ -125,7 +128,14 @@ export class ExtendPointCloudOctree extends PointCloudOctree{
|
|
|
this.testMaxNodeCount ++
|
|
|
viewer.testMaxNodeCount ++
|
|
|
|
|
|
- //console.log('this.testMaxNodeCount', this.testMaxNodeCount)
|
|
|
+ //console.log('testMaxNodeCount', this.dataset_id, this.testMaxNodeCount, 'nodeMaxLevel', this.nodeMaxLevel )
|
|
|
+
|
|
|
+
|
|
|
+ if( this.testMaxNodeCount == Potree.config.testNodeCount1 ){//差不多等当前所在数据集nodeMaxLevel加载出来
|
|
|
+ this.changePointSize() //重新更新一下大小。因之前用的是nodeMaxLevelPredict (防止刚开始因nodeMaxLevel没涨完,导致过大的点云突然出现
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
if(this.testMaxNodeCount > 100){
|
|
|
console.log('testMaxNodeLevel次数超出,强制结束:',this.dataset_id, this.nodeMaxLevel, this.nodeMaxLevelPredict.min)
|
|
@@ -136,9 +146,7 @@ export class ExtendPointCloudOctree extends PointCloudOctree{
|
|
|
|
|
|
this.testMaxNodeCount2 ++; // 已经> this.nodeMaxLevelPredict.min 后,开始计数。因为min可能低于真实nodeMaxLevel所以要再试几次
|
|
|
|
|
|
- /* if(this.name == 'SS-t-CWmVgzP4XU'){
|
|
|
- console.log('SS-t-CWmVgzP4XU count++')
|
|
|
- } */
|
|
|
+
|
|
|
|
|
|
if(this.testMaxNodeCount2 < 50) return true //再试几次 ( 主要是细节调得低时需要多测几次才加载到
|
|
|
this.testMaxNodeLevelDone = true
|
|
@@ -547,7 +555,7 @@ export class ExtendPointCloudOctree extends PointCloudOctree{
|
|
|
num_ = Math.pow(num_, 1.05) * 6
|
|
|
|
|
|
|
|
|
- nodeMaxLevel = this.testMaxNodeCount > Potree.config.testNodeCount1 ? this.nodeMaxLevel : this.nodeMaxLevelPredict.max //防止刚开始因nodeMaxLevel没涨完,导致过大的点云突然出现
|
|
|
+ nodeMaxLevel = this.testMaxNodeCount >= Potree.config.testNodeCount1 ? this.nodeMaxLevel : this.nodeMaxLevelPredict.max //防止刚开始因nodeMaxLevel没涨完,导致过大的点云突然出现
|
|
|
|
|
|
if(sizeFitToLevel || Potree.settings.sizeFitToLevel){//按照点云质量来调整的版本: 近似将pointSizeType换成ADAPTIVE
|
|
|
let str = this.temp.pointSize+':'+this.maxLevel+':'+ nodeMaxLevel
|