Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

2 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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.PositionEditor
  46. > Position Editor Tool
  47. ### example
  48. ```js
  49. let positionEditor = new DC.PositionEditor(viewer)
  50. ```
  51. ### creation
  52. - **_constructor(viewer,[options])_**
  53. - parameters
  54. - `{Viewer} viewer`
  55. - `{Object} options`
  56. - returns `positionEditor`
  57. ```json
  58. // options(optional)
  59. {
  60. "arrow": true, // whether the auxiliary axis is an arrow
  61. "width": 8, // auxiliary axis width
  62. "depthFail": true, // whether the auxiliary axis supports depth test
  63. "axisLineScale": 1 // auxiliary axis scale
  64. }
  65. ```
  66. ### properties
  67. - `{Overlay} overlay` **_`readonly`_**
  68. ### methods
  69. - **_activate(type, callback)_**
  70. - parameters
  71. - `{String} type`
  72. - `{Function} callback` parameter :position
  73. - returns `this`
  74. - **_deactivate()_**
  75. - returns `this`
  76. ## DC.ModelManager
  77. > Model Manager Tool
  78. ### example
  79. ```js
  80. let manager = new DC.ModelManager(viewer, layer.getOverlays())
  81. ```
  82. ### creation
  83. - **_constructor(viewer,models,[options])_**
  84. - parameters
  85. - `{Viewer} viewer`
  86. - `{Array} models`
  87. - `{Object} options`
  88. - returns `manager`
  89. ```json
  90. // options(optional)
  91. {
  92. "disappearHeight": 1000,
  93. "disappearSeconds": 0.5,
  94. "appearSeconds": 0.5
  95. }
  96. ```
  97. ### properties
  98. - `{Array} models`
  99. ### methods
  100. - **_spread(height, seconds)_**
  101. - parameters
  102. - `{Number} height`
  103. - `{Number} seconds`
  104. - returns `this`
  105. - **_combine(seconds)_**
  106. - parameters
  107. - `{Number} seconds`
  108. - returns `this`
  109. - **_showModel(modelIndex)_**
  110. - parameters
  111. - `{Number} modelIndex`
  112. - returns `this`
  113. - **_restore()_**
  114. - returns `this`