You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.4KB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. ---
  2. sidebar: auto
  3. ---
  4. # Tools 🌎
  5. Auxiliary tools in 3D scenes to facilitate various measurements and markings in the scene
  6. ## DC.Plot
  7. > PLot Tool
  8. ### example
  9. ```js
  10. let plot = new DC.Plot(viewer, {})
  11. plot.draw(DC.OverlayType.POINT, (overlay) => {}, {})
  12. ```
  13. ### creation
  14. - **_constructor(viewer,[options])_**
  15. - parameters
  16. - `{Viewer} viewer`:场景
  17. - `{Object} options`:属性
  18. - returns `plot`
  19. ```json
  20. // options(optional)
  21. {
  22. "icon_center": "**.png",
  23. "icon_anchor": "**.png",
  24. "icon_midAnchor": "**.png",
  25. "icon_size": [12, 12],
  26. "clampToModel":false
  27. }
  28. ```
  29. ### methods
  30. - **_draw(type,callback,[style],[clampToModel])_**
  31. - parameters
  32. - `{String} type` [OverlayType](../base/#overlaytype)
  33. - `{Function} callback`
  34. - `{Object} style`
  35. - `{Boolean} clampToModel`: Whether the point gets the surface coordinates, if false, it will get the current 3D coordinates of the mouse
  36. - returns `this`
  37. - **_edit(overlay,callback,[clampToModel])_**
  38. - parameters
  39. - `{Overlay} overlay`
  40. - `{Function} callback`
  41. - `{Boolean} clampToModel`: Whether the point gets the surface coordinates, if false, it will get the current 3D coordinates of the mouse
  42. - returns `this`
  43. - **_stop()_**
  44. - returns `this`
  45. ## DC.Measure
  46. > viewer measure
  47. ### example
  48. ```js
  49. let measure = new DC.Measure(viewer)
  50. ```
  51. ### creation
  52. - **_constructor()_**
  53. - returns `measure`
  54. ### methods
  55. - **_angle([options])_**
  56. - parameters
  57. - `{Object} options`
  58. - returns `this`
  59. - **_area([options])_**
  60. - parameters
  61. - `{Object} options`
  62. - returns `this`
  63. - **_areaSurface([options])_**
  64. - parameters
  65. - `{Object} options`
  66. - returns `this`
  67. - **_distance([options])_**
  68. - parameters
  69. - `{Object} options`
  70. - returns `this`
  71. - **_distanceSurface([options])_**
  72. - parameters
  73. - `{Object} options`
  74. - returns `this`
  75. - **_heading([options])_**
  76. - parameters
  77. - `{Object} options`
  78. - returns `this`
  79. - **_height([options])_**
  80. - parameters
  81. - `{Object} options`
  82. - returns `this`
  83. - **_triangleHeight([options])_**
  84. - parameters
  85. - `{Object} options`
  86. - returns `this`
  87. - **_activate(type,[options])_**
  88. - parameters
  89. - `{String} type`
  90. - `{Object} options`
  91. - returns `this`
  92. ```js
  93. // options(optional)
  94. {
  95. "icon_center": "**.png",
  96. "icon_anchor": "**.png",
  97. "icon_midAnchor": "**.png",
  98. "icon_size": [12, 12],
  99. "clampToModel": false
  100. }
  101. ```
  102. - **_deactivate()_**
  103. - returns `this`