fixed a bug with occasionally floating nodes...hopefully

This commit is contained in:
mschuetz 2015-09-09 16:13:01 +02:00
parent 3f7a3cf495
commit 38963757a6
5 changed files with 7 additions and 5 deletions

View File

@ -1420,7 +1420,7 @@ Potree.BinaryLoader.prototype.parse = function(node, buffer){
geometry.boundingBox = node.boundingBox;
//geometry.boundingBox = tightBoundingBox;
node.geometry = geometry;
node.boundingBox = tightBoundingBox;
//node.boundingBox = tightBoundingBox;
node.tightBoundingBox = tightBoundingBox;
node.loaded = true;
node.loading = false;
@ -1651,7 +1651,7 @@ Potree.LasLazBatcher = function(node){
geometry.boundingBox = new THREE.Box3(mins, maxs);
//geometry.boundingBox = tightBoundingBox;
node.boundingBox = geometry.boundingBox;
//node.boundingBox = geometry.boundingBox;
node.tightBoundingBox = tightBoundingBox;
node.geometry = geometry;
@ -4157,6 +4157,7 @@ Potree.PointCloudOctree.prototype.updateVisibility = function(camera, renderer){
var parent = element.parent;
var box = node.boundingBox;
var insideFrustum = frustum.intersectsBox(box);
var visible = insideFrustum;
visible = visible && !(this.numVisiblePoints + node.numPoints > this.visiblePointsTarget);

File diff suppressed because one or more lines are too long

View File

@ -79,6 +79,7 @@ Potree.PointCloudOctree.prototype.updateVisibility = function(camera, renderer){
var parent = element.parent;
var box = node.boundingBox;
var insideFrustum = frustum.intersectsBox(box);
var visible = insideFrustum;
visible = visible && !(this.numVisiblePoints + node.numPoints > this.visiblePointsTarget);

View File

@ -99,7 +99,7 @@ Potree.BinaryLoader.prototype.parse = function(node, buffer){
geometry.boundingBox = node.boundingBox;
//geometry.boundingBox = tightBoundingBox;
node.geometry = geometry;
node.boundingBox = tightBoundingBox;
//node.boundingBox = tightBoundingBox;
node.tightBoundingBox = tightBoundingBox;
node.loaded = true;
node.loading = false;

View File

@ -209,7 +209,7 @@ Potree.LasLazBatcher = function(node){
geometry.boundingBox = new THREE.Box3(mins, maxs);
//geometry.boundingBox = tightBoundingBox;
node.boundingBox = geometry.boundingBox;
//node.boundingBox = geometry.boundingBox;
node.tightBoundingBox = tightBoundingBox;
node.geometry = geometry;