2
0

PCDLoader.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <div class="desc">A loader for <em>PCD</em> files. Loads ascii and binary. Compressed binary files are not suported.</div>
  13. <h2>Constructor</h2>
  14. <h3>[name]( [page:LoadingManager manager] )</h3>
  15. <div>
  16. [page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
  17. </div>
  18. <div>
  19. Creates a new [name].
  20. </div>
  21. <h2>Properties</h2>
  22. <h3>[page:Boolean littleEndian]</h3>
  23. <div>
  24. Default value is true.
  25. </div>
  26. <h2>Methods</h2>
  27. <h3>[method:null load]( [page:String url], [page:Function onLoad], [page:Function onProgress], [page:Function onError] )</h3>
  28. <div>
  29. [page:String url] — required<br />
  30. [page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Object3D].<br />
  31. [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.<br />
  32. [page:Function onError] — Will be called when load errors.<br />
  33. </div>
  34. <div>
  35. Begin loading from url and call onLoad with the parsed response content.
  36. </div>
  37. <h3>[method:Object3D parse]( [page:Arraybuffer data],[page:String url] )</h3>
  38. <div>
  39. [page:Arraybuffer data] — The binary structure to parse.
  40. </div>
  41. <div>
  42. [page:String url] — The file name or file url.
  43. </div>
  44. <div>
  45. Parse an <em>pcd</em> binary structure and return an [page:Object3D].<br />
  46. The object is converted to [page:Points] with a [page:BufferGeometry] and a [page:PointsMaterial].
  47. </div>
  48. <h2>Example</h2>
  49. <code>
  50. // instantiate a loader
  51. var loader = new THREE.PCDLoader();
  52. // load a resource
  53. loader.load(
  54. // resource URL
  55. 'pointcloud.pcd' ,
  56. // Function when resource is loaded
  57. function ( mesh ) {
  58. scene.add( mesh );
  59. }
  60. );
  61. </code>
  62. [example:webgl_loader_pcd]
  63. <h2>Source</h2>
  64. [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PCDLoader.js examples/js/loaders/PCDLoader.js]
  65. </body>
  66. </html>