HandleOperator
Constructors
Methods
Constructors
- HandleOperator.constructor(viewer)
- Arguments
viewer (
WebViewer()
) –
- Return type
Methods
addAxisRotationHandle
- HandleOperator.addAxisRotationHandle(position, axis, color[, positionNormal[, groupId]])
Adds a handle that rotates around an axis
- Arguments
position (
Point3()
) – center of the handle.axis (
Point3()
) – axis to rotate aroundcolor (
Color()
) – color of the handle geometrypositionNormal (
Point3()
| null) – optional optional vector to control the orientation of the handle geometry.groupId (
number | null()
) – optional optional parameter to associate this handle with a group of NodeIds
- Return type
Promise <NodeId>
addAxisTranslationHandle
- HandleOperator.addAxisTranslationHandle(position, axis, color[, positionNormal[, groupId]])
Adds a handle that moves along an axis.
- Arguments
position (
Point3()
) – center of the handle.axis (
Point3()
) – axis to move alongcolor (
Color()
) – color of the handle geometrypositionNormal (
Point3()
| null) – optional optional vector to control the orientation of the handle geometry.groupId (
number | null()
) – optional optional parameter to associate this handle with a group of NodeIds
- Return type
Promise <NodeId>
addHandles
- HandleOperator.addHandles(nodeIds[, position[, groupId]])
Adds all handles into the scene, oriented along the primary axes
addMapping
- HandleOperator.addMapping(button[, modifier])
Adds a button and key modifier mapping for the operator. If no mapping is provided, all combinations are considered valid. All mappings require a mouse button, but a key modifier is optional.
- Arguments
button (Button) –
modifier (KeyModifiers) – optional
- Return type
void
addPlaneTranslationHandle
- HandleOperator.addPlaneTranslationHandle(position, normal, faceColor, lineColor[, positionNormal[, groupId]])
Adds a handle that restricts movement to a plane.
- Arguments
position (
Point3()
) – center of the handle.normal (
Point3()
) – normal of the planefaceColor (
Color()
) – face color of the handle geometrylineColor (
Color()
) – outline color of the handle geometrypositionNormal (
Point3()
| null) – optional optional vector to control the orientation of the handle geometry.groupId (
number | null()
) – optional optional parameter to associate this handle with a group of NodeIds
- Return type
Promise <NodeId>
addTrackedPoint
addViewPlaneTranslationHandle
- HandleOperator.addViewPlaneTranslationHandle(position, color[, groupId])
Adds a handle that restricts movement to the viewplane.
clearMapping
- HandleOperator.clearMapping()
Clears any button and key modifier mappings for the operator.
- Return type
void
clearTrackedPoints
- HandleOperator.clearTrackedPoints()
Clear the list of tracked points.
- Return type
void
generateGroupId
- HandleOperator.generateGroupId()
This will generate a unique id to associate a group of handles with a group of NodeIds.
- Return type
number
getNodeIds
getPosition
getTrackedPoints
getTranslation
isEnabled
- HandleOperator.isEnabled()
Returns a boolean value indicating if handles are available to be added to the scene If there is an active explode, active measure, or the model is a 2d drawing. this will be false.
- Return type
boolean
removeHandles
- HandleOperator.removeHandles()
Removes all handles from the scene.
- Return type
Promise <void>
setAxisMeshData
- HandleOperator.setAxisMeshData(meshData)
Sets the mesh data for axis handles.
- Arguments
meshData (
MeshData()
) –
- Return type
Promise <void>
setHandleSize
- HandleOperator.setHandleSize(size)
Takes a scale value to change the handle size with 1 representing the default size
- Arguments
size (
number()
) –
- Return type
void
setMapping
- HandleOperator.setMapping(button[, modifier])
Sets the button and key modifier mapping for the operator.
- Arguments
button (Button) –
modifier (KeyModifiers) – optional
- Return type
void
setNodeIds
setPlaneMeshData
- HandleOperator.setPlaneMeshData(meshData)
Sets the mesh data for plane handles.
- Arguments
meshData (
MeshData()
) –
- Return type
Promise <void>
setRotateMeshData
- HandleOperator.setRotateMeshData(meshData)
Sets the mesh data for rotation handles.
- Arguments
meshData (
MeshData()
) –
- Return type
Promise <void>
setViewPlaneMeshData
- HandleOperator.setViewPlaneMeshData(meshData)
Sets the mesh data for view plane handles.
- Arguments
meshData (
MeshData()
) –
- Return type
Promise <void>
showHandles
- HandleOperator.showHandles()
Shows any handles that have been added to the scene.
- Return type
void
updatePosition
- HandleOperator.updatePosition(translation, rotation, finalizePosition[, groupId])
Updates the current handle position.
- Arguments
- Return type
Promise <void>