# Tools 🌎
Auxiliary tools in 3D scenes to facilitate various measurements and markings in the scene
# DC.Plot
PLot Tool
# example
let plot = new DC.Plot(viewer, {})
plot.draw(DC.OverlayType.POINT, (overlay) => {}, {})
# creation
constructor(viewer,[options])
- parameters
{Viewer} viewer
:场景{Object} options
:属性
- returns
plot
- parameters
// options(optional)
{
"icon_center": "**.png",
"icon_anchor": "**.png",
"icon_midAnchor": "**.png",
"icon_size": [12, 12],
"clampToModel":false
}
# methods
draw(type,callback,[style],[clampToModel])
- parameters
{String} type
OverlayType{Function} callback
{Object} style
{Boolean} clampToModel
: Whether the point gets the surface coordinates, if false, it will get the current 3D coordinates of the mouse
- returns
this
- parameters
edit(overlay,callback,[clampToModel])
- parameters
{Overlay} overlay
{Function} callback
{Boolean} clampToModel
: Whether the point gets the surface coordinates, if false, it will get the current 3D coordinates of the mouse
- returns
this
- parameters
stop()
- returns
this
- returns
# DC.PositionEditor
Position Editor Tool
# example
let positionEditor = new DC.PositionEditor(viewer)
# creation
constructor(viewer,[options])
- parameters
{Viewer} viewer
{Object} options
- returns
positionEditor
- parameters
// options(optional)
{
"arrow": true, // whether the auxiliary axis is an arrow
"width": 8, // auxiliary axis width
"depthFail": true, // whether the auxiliary axis supports depth test
"axisLineScale": 1 // auxiliary axis scale
}
# properties
{Overlay} overlay
readonly
# methods
activate(type, callback)
- parameters
{String} type
{Function} callback
parameter :position
- returns
this
- parameters
deactivate()
- returns
this
- returns
# DC.ModelManager
Model Manager Tool
# example
let manager = new DC.ModelManager(viewer, layer.getOverlays())
# creation
constructor(viewer,models,[options])
- parameters
{Viewer} viewer
{Array} models
{Object} options
- returns
manager
- parameters
// options(optional)
{
"disappearHeight": 1000,
"disappearSeconds": 0.5,
"appearSeconds": 0.5
}
# properties
{Array} models
# methods
spread(height, seconds)
- parameters
{Number} height
{Number} seconds
- returns
this
- parameters
combine(seconds)
- parameters
{Number} seconds
- returns
this
- parameters
showModel(modelIndex)
- parameters
{Number} modelIndex
- returns
this
- parameters
restore()
- returns
this
- returns