|
@@ -36,11 +36,11 @@ export class ExtendPointCloudOctree extends PointCloudOctree{
|
|
|
this.transformInvMatrix = new THREE.Matrix4;
|
|
|
this.rotateInvMatrix = new THREE.Matrix4;
|
|
|
|
|
|
-
|
|
|
+ this.material.spacing = this.pcoGeometry.spacing;//初始化一下 以便于设置pointsize
|
|
|
this.nodeMaxLevelPredict = this.predictNodeMaxLevel()//预测maxNodeLevel
|
|
|
this.testMaxNodeCount = this.testMaxNodeCount2 = 0
|
|
|
|
|
|
- this.material.spacing = this.pcoGeometry.spacing;//初始化一下 以便于设置pointsize
|
|
|
+
|
|
|
this._visible = true;
|
|
|
this.pcoGeometry.addEventListener('updateNodeMaxLevel', this.updateNodeMaxLevel.bind(this))
|
|
|
this.isPointcloud = true //add
|
|
@@ -188,12 +188,13 @@ export class ExtendPointCloudOctree extends PointCloudOctree{
|
|
|
//预测可能的nodeMaxLevel:
|
|
|
|
|
|
predictNodeMaxLevel(){//预测maxNodeLevel。 可能只适用于我们相机拍的点云
|
|
|
- let spacing = {min:0.005, max:0.014};//最小节的两点间的距离 ,获得方法:spacing / Math.pow(2, nodeMaxLevel)。 目前观测的我们自己拍的这个数值的范围大概是这样
|
|
|
- let min = Math.log2(this.material.spacing / spacing.max); //有见过最大是0.01368
|
|
|
- let max = Math.log2(this.material.spacing / spacing.min); //大部分是 0.006
|
|
|
+ //let spacing = {min:0.005, max:0.014};//最小节的两点间的距离 ,获得方法:spacing / Math.pow(2, nodeMaxLevel)。 目前观测的我们自己拍的这个数值的范围大概是这样
|
|
|
+ let spacing = {min:0.006, max:0.0082}; //0.006743906065821648 0.0080347936
|
|
|
+ let min = Math.log2(this.material.spacing / spacing.max);
|
|
|
+ let max = Math.log2(this.material.spacing / spacing.min);
|
|
|
//console.log('predictNodeMaxLevel:', this.name , min, max )
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
return {min, max}
|
|
|
}
|
|
|
|