Implements
Constructors
Methods
- add
Axis Rotation Handle - add
Axis Translation Handle - add
Handles - add
Mapping - add
Plane Translation Handle - add
Tracked Point - add
View Plane Translation Handle - clear
Mapping - clear
Tracked Points - generate
Group Id - get
Node Ids - get
Position - get
Tracked Points - get
Translation - is
Enabled - remove
Handles - set
Axis Mesh Data - set
Handle Size - set
Mapping - set
Node Ids - set
Plane Mesh Data - set
Rotate Mesh Data - set
View Plane Mesh Data - show
Handles - update
Position
Constructors
constructor
-
Parameters
-
viewer: WebViewer
Returns HandleOperator
-
Methods
addAxisRotationHandle
-
Adds a handle that rotates around an axis
Parameters
-
position: Point3
center of the handle.
-
axis: Point3
axis to rotate around
-
color: Color
color of the handle geometry
-
Optional positionNormal: Point3 | null
optional vector to control the orientation of the handle geometry.
-
Optional groupId: number | null
optional parameter to associate this handle with a group of NodeIds
Returns Promise<NodeId>
-
addAxisTranslationHandle
-
Adds a handle that moves along an axis.
Parameters
-
position: Point3
center of the handle.
-
axis: Point3
axis to move along
-
color: Color
color of the handle geometry
-
Optional positionNormal: Point3 | null
optional vector to control the orientation of the handle geometry.
-
Optional groupId: number | null
optional parameter to associate this handle with a group of NodeIds
Returns Promise<NodeId>
-
addHandles
-
Adds all handles into the scene, oriented along the primary axes
Parameters
-
nodeIds: NodeId[]
corresponding to the parts that will move with the handles
-
Optional position: Point3 | null
world space coordinates the the handle position
-
Optional groupId: number | null
Returns Promise<void>
-
addMapping
-
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.
Parameters
-
button: Button
-
Optional modifier: KeyModifiers
Returns void
-
addPlaneTranslationHandle
-
Adds a handle that restricts movement to a plane.
Parameters
-
position: Point3
center of the handle.
-
normal: Point3
normal of the plane
-
faceColor: Color
face color of the handle geometry
-
lineColor: Color
outline color of the handle geometry
-
Optional positionNormal: Point3 | null
optional vector to control the orientation of the handle geometry.
-
Optional groupId: number | null
optional parameter to associate this handle with a group of NodeIds
Returns Promise<NodeId>
-
addTrackedPoint
-
Add a point to the tracked points list. When the handle moves, these points will update in world space.
Parameters
-
point: Point3
Returns number
point index
-
addViewPlaneTranslationHandle
clearMapping
-
Clears any button and key modifier mappings for the operator.
Returns void
clearTrackedPoints
-
Clear the list of tracked points.
Returns void
generateGroupId
-
This will generate a unique id to associate a group of handles with a group of NodeIds.
Returns number
getNodeIds
-
Gets the NodeIds that the handles in the scene will move.
Parameters
-
Optional groupId: number | null
optional paramater that specifies if the NodeIds to retrieve are part of a group.
Returns NodeId[]
-
getPosition
-
Returns Point3 | null
the current handle position or null if not currently active.
getTrackedPoints
-
Gets the tracked point list.
Returns Point3[]
getTranslation
-
Returns Point3
the total translation applied to the handles.
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.
Returns boolean
removeHandles
-
Removes all handles from the scene.
Returns Promise<void>
setAxisMeshData
-
Sets the mesh data for axis handles.
Parameters
-
meshData: MeshData
Returns Promise<void>
-
setHandleSize
-
Takes a scale value to change the handle size with 1 representing the default size
Parameters
-
size: number
Returns void
-
setMapping
-
Sets the button and key modifier mapping for the operator.
Parameters
-
button: Button
-
Optional modifier: KeyModifiers
Returns void
-
setNodeIds
-
Sets the NodeIds that any handles in the scene will move.
Parameters
-
nodeIds: NodeId[]
-
Optional groupId: number | null
optional parameter that associates a group of NodeIds with a group of handles.
Returns void
-
setPlaneMeshData
-
Sets the mesh data for plane handles.
Parameters
-
meshData: MeshData
Returns Promise<void>
-
setRotateMeshData
-
Sets the mesh data for rotation handles.
Parameters
-
meshData: MeshData
Returns Promise<void>
-
setViewPlaneMeshData
-
Sets the mesh data for view plane handles.
Parameters
-
meshData: MeshData
Returns Promise<void>
-
showHandles
-
Shows any handles that have been added to the scene.
Returns void
updatePosition
-
Updates the current handle position.
Parameters
-
translation: Point3
additional translation
-
rotation: Matrix
additional rotation
-
finalizePosition: boolean
keep translation and rotation. If true, added translation and rotation will not reset the next time the position is updated.
-
Optional groupId: number | null
Returns Promise<void>
-
Handles are added scene elements that can update the position of your parts through user interaction. Find more information here.