Merge remote-tracking branch 'origin/develop'

This commit is contained in:
mschuetz 2014-08-25 17:54:32 +02:00
commit eed89c0bfb
7 changed files with 5126 additions and 43199 deletions

View File

@ -1707,8 +1707,8 @@ Potree.PointCloudOctreeGeometryNode.prototype.load = function(){
colors[3*i+2] = color.b / 255;
}
geometry.addAttribute('position', new THREE.Float32Attribute(positions, 3));
geometry.addAttribute('color', new THREE.Float32Attribute(colors, 3));
geometry.addAttribute('position', new THREE.BufferAttribute(positions, 3));
geometry.addAttribute('color', new THREE.BufferAttribute(colors, 3));
geometry.boundingBox = node.boundingBox;
node.geometry = geometry;
node.loaded = true;
@ -1789,10 +1789,10 @@ Potree.LasLazBatcher = function(node, url){
box.expandByPoint(new THREE.Vector3(fPositions[3*i+0], fPositions[3*i+1], fPositions[3*i+2]));
}
geometry.addAttribute('position', new THREE.Float32Attribute(positions, 3));
geometry.addAttribute('color', new THREE.Float32Attribute(colors, 3));
geometry.addAttribute('intensity', new THREE.Float32Attribute(intensities, 1));
geometry.addAttribute('classification', new THREE.Float32Attribute(classifications_f, 1));
geometry.addAttribute('position', new THREE.BufferAttribute(new Float32Array(positions), 3));
geometry.addAttribute('color', new THREE.BufferAttribute(new Float32Array(colors), 3));
geometry.addAttribute('intensity', new THREE.BufferAttribute(new Float32Array(intensities), 1));
geometry.addAttribute('classification', new THREE.BufferAttribute(new Float32Array(classifications_f), 1));
//geometry.boundingBox = node.boundingBox;
geometry.boundingBox = new THREE.Box3(mins, maxs);
node.boundingBox = geometry.boundingBox;
@ -1828,6 +1828,8 @@ Potree.PointCloudOctreeGeometryNode.prototype.dispose = function(){
this.loaded = false;
}
Potree.utils = function(){
};

File diff suppressed because one or more lines are too long

View File

@ -174,9 +174,9 @@
var I = intersects[0];
if(placeStartMode){
spStart.position = I.point;
spStart.position.copy(I.point);
}else if(placeEndMode){
spEnd.position = I.point;
spEnd.position.copy(I.point);
}
sConnection.geometry.vertices[0].copy(spStart.position);
sConnection.geometry.vertices[1].copy(spEnd.position);

View File

@ -49,8 +49,8 @@ function generatePointcloud(){
}
}
geometry.addAttribute('position', new THREE.Float32Attribute(positions, 3));
geometry.addAttribute('color', new THREE.Float32Attribute(colors, 3));
geometry.addAttribute('position', new THREE.BufferAttribute(positions, 3));
geometry.addAttribute('color', new THREE.BufferAttribute(colors, 3));
var material = new THREE.PointCloudMaterial({ size: 0.01, vertexColors: true });
var pointcloud = new THREE.PointCloud(geometry, material);
@ -106,7 +106,7 @@ function render() {
var intersects = raycaster.intersectObject(pointcloud);
if(intersects.length > 0){
var I = intersects[0];
pickLocation.position = I.point;
pickLocation.position.copy(I.point);
}
renderer.render(scene, camera);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -79,8 +79,8 @@ Potree.PointCloudOctreeGeometryNode.prototype.load = function(){
colors[3*i+2] = color.b / 255;
}
geometry.addAttribute('position', new THREE.Float32Attribute(positions, 3));
geometry.addAttribute('color', new THREE.Float32Attribute(colors, 3));
geometry.addAttribute('position', new THREE.BufferAttribute(positions, 3));
geometry.addAttribute('color', new THREE.BufferAttribute(colors, 3));
geometry.boundingBox = node.boundingBox;
node.geometry = geometry;
node.loaded = true;
@ -161,10 +161,10 @@ Potree.LasLazBatcher = function(node, url){
box.expandByPoint(new THREE.Vector3(fPositions[3*i+0], fPositions[3*i+1], fPositions[3*i+2]));
}
geometry.addAttribute('position', new THREE.Float32Attribute(positions, 3));
geometry.addAttribute('color', new THREE.Float32Attribute(colors, 3));
geometry.addAttribute('intensity', new THREE.Float32Attribute(intensities, 1));
geometry.addAttribute('classification', new THREE.Float32Attribute(classifications_f, 1));
geometry.addAttribute('position', new THREE.BufferAttribute(new Float32Array(positions), 3));
geometry.addAttribute('color', new THREE.BufferAttribute(new Float32Array(colors), 3));
geometry.addAttribute('intensity', new THREE.BufferAttribute(new Float32Array(intensities), 1));
geometry.addAttribute('classification', new THREE.BufferAttribute(new Float32Array(classifications_f), 1));
//geometry.boundingBox = node.boundingBox;
geometry.boundingBox = new THREE.Box3(mins, maxs);
node.boundingBox = geometry.boundingBox;
@ -198,4 +198,5 @@ Potree.LasLazBatcher = function(node, url){
Potree.PointCloudOctreeGeometryNode.prototype.dispose = function(){
delete this.geometry;
this.loaded = false;
}
}