[name]
A loader for PCD files. Loads ascii and binary. Compressed binary files are not suported.
Constructor
[name]( [page:LoadingManager manager] )
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
Creates a new [name].
Properties
[page:Boolean littleEndian]
Default value is true.
Methods
[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )
[page:String url] — required
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Object3D].
[page:Function onProgress] — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .[page:Integer total] and .[page:Integer loaded] bytes.
[page:Function onError] — Will be called when load errors.
Begin loading from url and call onLoad with the parsed response content.
[method:Object3D parse]( [page:Arraybuffer data],[page:String url] )
[page:Arraybuffer data] — The binary structure to parse.
[page:String url] — The file name or file url.
Parse an pcd binary structure and return an [page:Object3D].
The object is converted to [page:Points] with a [page:BufferGeometry] and a [page:PointsMaterial].
Example
// instantiate a loader
var loader = new THREE.PCDLoader();
// load a resource
loader.load(
// resource URL
'pointcloud.pcd' ,
// Function when resource is loaded
function ( mesh ) {
scene.add( mesh );
}
);
[example:webgl_loader_pcd]
Source
[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PCDLoader.js examples/js/loaders/PCDLoader.js]