plasio icon indicating copy to clipboard operation
plasio copied to clipboard

Editing point cloud

Open mghildiy opened this issue 7 years ago • 5 comments

Hi,

I want to customize this repo to tinker with point cloud rendered from a LAS/LAZ file. Which code files should I start to look into in particular?

Manish

@verma @hobu

mghildiy avatar Apr 23 '18 07:04 mghildiy

Going through the code, I can see files lazlaz.js and renderer.js playing important roles in bigger picture. laslaz.js loads the las/laz file. And going by the name,renderer.js must be displaying the data in laz/laz file using three.js. But where do we give input(data read from laz/laz file) to renderer.js?

mghildiy avatar Apr 23 '18 13:04 mghildiy

I would start here:

https://github.com/verma/plasio/blob/master/js/ui.js#L657

This is where the loading happens, it takes a function which returns a promise which resolve with the loaded data (either local or remote), eventually if you trace this function, it should call another function called loadData which will eventually link stuff to Three.js.

verma avatar Apr 23 '18 20:04 verma

Thanks a lot @verma.

mghildiy avatar Apr 24 '18 05:04 mghildiy

I was able to link up three modules(lazlaz.js,ui.js,render.js) and understand the flow. I then made a small change in render.js right at end of ParticleSystemBatcher.prototype.push.

var object = new THREE.Mesh(geometry, new THREE.MeshBasicMaterial( 0xff0000 ) ); var box = new THREE.BoxHelper( object, 0xffff00 ); scene.add(box);

My objective is to add bounding box for the point cloud. It did add a wireframe box, but orientation is perpendicular to the expected direction.

boundingbox

Am I doing it wrongly?

@verma , do you have any insight on this behaviour?

mghildiy avatar Apr 25 '18 08:04 mghildiy

@verma,any input here? I added a wireframe box as bounding box for point cloud.But alignment is totally unexpected, as shown in above figure.

mghildiy avatar Apr 27 '18 16:04 mghildiy