fix geo controls

This commit is contained in:
mschuetz 2015-11-02 14:33:23 +01:00
parent c71674008f
commit e3104d70c1
4 changed files with 40 additions and 40 deletions

View File

@ -3062,8 +3062,8 @@ Potree.GeoControls = function ( object, domElement ) {
var te = this.object.matrix.elements;
// get Y column of matrix
//panOffset.set( te[ 8 ], te[ 9 ], te[ 10 ] );
panOffset.set( te[ 8 ], 0, te[ 10 ] );
panOffset.set( te[ 8 ], te[ 9 ], te[ 10 ] );
//panOffset.set( te[ 8 ], 0, te[ 10 ] );
panOffset.multiplyScalar( distance );
pan.add( panOffset );
@ -5792,7 +5792,7 @@ Potree.PointCloudOctree.prototype.pick = function(renderer, camera, ray, params)
continue;
}
material.pcIndex = i;
material.pcIndex = i + 1;
if(material.program){
var program = material.program.program;
@ -5830,21 +5830,21 @@ Potree.PointCloudOctree.prototype.pick = function(renderer, camera, ray, params)
renderer.context.RGBA, renderer.context.UNSIGNED_BYTE, pixels);
//{ // show big render target for debugging purposes
// var br = new ArrayBuffer(width*height*4);
// var bp = new Uint8Array(br);
// renderer.context.readPixels( 0, 0, width, height,
// renderer.context.RGBA, renderer.context.UNSIGNED_BYTE, bp);
//
// var img = pixelsArrayToImage(bp, width, height);
// img.style.boder = "2px solid red";
// img.style.position = "absolute";
// img.style.top = "0px";
// img.style.width = width + "px";
// img.style.height = height + "px";
// img.onclick = function(){document.body.removeChild(img)};
// document.body.appendChild(img);
//}
//{ // show big render target for debugging purposes
// var br = new ArrayBuffer(width*height*4);
// var bp = new Uint8Array(br);
// renderer.context.readPixels( 0, 0, width, height,
// renderer.context.RGBA, renderer.context.UNSIGNED_BYTE, bp);
//
// var img = pixelsArrayToImage(bp, width, height);
// img.style.boder = "2px solid red";
// img.style.position = "absolute";
// img.style.top = "0px";
// img.style.width = width + "px";
// img.style.height = height + "px";
// img.onclick = function(){document.body.removeChild(img)};
// document.body.appendChild(img);
//}
@ -5865,7 +5865,7 @@ Potree.PointCloudOctree.prototype.pick = function(renderer, camera, ray, params)
hit = {
pIndex: pIndex,
pcIndex: pcIndex
pcIndex: pcIndex - 1
};
min = distance;
}

File diff suppressed because one or more lines are too long

View File

@ -124,8 +124,8 @@ Potree.GeoControls = function ( object, domElement ) {
var te = this.object.matrix.elements;
// get Y column of matrix
//panOffset.set( te[ 8 ], te[ 9 ], te[ 10 ] );
panOffset.set( te[ 8 ], 0, te[ 10 ] );
panOffset.set( te[ 8 ], te[ 9 ], te[ 10 ] );
//panOffset.set( te[ 8 ], 0, te[ 10 ] );
panOffset.multiplyScalar( distance );
pan.add( panOffset );

View File

@ -1145,7 +1145,7 @@ Potree.PointCloudOctree.prototype.pick = function(renderer, camera, ray, params)
continue;
}
material.pcIndex = i;
material.pcIndex = i + 1;
if(material.program){
var program = material.program.program;
@ -1183,21 +1183,21 @@ Potree.PointCloudOctree.prototype.pick = function(renderer, camera, ray, params)
renderer.context.RGBA, renderer.context.UNSIGNED_BYTE, pixels);
//{ // show big render target for debugging purposes
// var br = new ArrayBuffer(width*height*4);
// var bp = new Uint8Array(br);
// renderer.context.readPixels( 0, 0, width, height,
// renderer.context.RGBA, renderer.context.UNSIGNED_BYTE, bp);
//
// var img = pixelsArrayToImage(bp, width, height);
// img.style.boder = "2px solid red";
// img.style.position = "absolute";
// img.style.top = "0px";
// img.style.width = width + "px";
// img.style.height = height + "px";
// img.onclick = function(){document.body.removeChild(img)};
// document.body.appendChild(img);
//}
//{ // show big render target for debugging purposes
// var br = new ArrayBuffer(width*height*4);
// var bp = new Uint8Array(br);
// renderer.context.readPixels( 0, 0, width, height,
// renderer.context.RGBA, renderer.context.UNSIGNED_BYTE, bp);
//
// var img = pixelsArrayToImage(bp, width, height);
// img.style.boder = "2px solid red";
// img.style.position = "absolute";
// img.style.top = "0px";
// img.style.width = width + "px";
// img.style.height = height + "px";
// img.onclick = function(){document.body.removeChild(img)};
// document.body.appendChild(img);
//}
@ -1218,7 +1218,7 @@ Potree.PointCloudOctree.prototype.pick = function(renderer, camera, ray, params)
hit = {
pIndex: pIndex,
pcIndex: pcIndex
pcIndex: pcIndex - 1
};
min = distance;
}