LineWidget
Introduction
vtkLineWidget places a line between two handles, each of which can take one of the shapes of Constants.ShapeType, and measures its length.
Methods
getDistance
The world distance between the two tips of the line. Returns 0 until both tips are placed.
getHandle
The handle state at the given index.
| Argument | Type | Required | Description |
|---|---|---|---|
handleIndex | Yes | 0 for handle1, 1 for handle2, 2 for the move handle |
getHandleIndex
The index of the given handle state, or -1 when it is not one of the widget's handles.
getManipulator
The manipulator the handles are driven by.
getPosOnLine
Where the text sits along the line, from 0 at handle1 to 1 at handle2.
getRepresentationsForViewType
The representation builders the widget uses in the given view type.
isPlaced
True once both tips of the line have been placed.
placeHandle
Place the given handle at the current position of the move handle.
reset
Reset the widget to its unplaced state.
rotateHandlesToFaceCamera
Make the two tip handles face the camera.
setManipulator
Set the manipulator on the widget and on each of its handles.
setText
Set the text displayed by the SVG layer and re-render.
updateHandleOrientations
Orient every handle along the direction of the line.
updateHandleVisibility
Update the visibility flags of the given handle's representation from the handle state's visibility and shape.