Section: Visualization Toolkit Widget Classes
To use this object, just invoke SetInteractor() with the argument of the method a vtkRenderWindowInteractor. You may also wish to invoke "PlaceWidget()" to initially position the widget. The interactor will act normally until the "i" key (for "interactor") is pressed, at which point the vtkPointWidget will appear. (See superclass documentation for information about changing this behavior.) To move the point, the user can grab (left mouse) on any widget line and "slide" the point into position. Scaling is achieved by using the right mouse button "up" the render window (makes the widget bigger) or "down" the render window (makes the widget smaller). To translate the widget use the middle mouse button. (Note: all of the translation interactions can be constrained to one of the x-y-z axes by using the "shift" key.) The vtkPointWidget produces as output a polydata with a single point and a vertex cell.
Some additional features of this class include the ability to control the rendered properties of the widget. You can set the properties of the selected and unselected representations of the parts of the widget. For example, you can set the property of the 3D cursor in its normal and selected states.
To create an instance of class vtkPointWidget, simply invoke its constructor as follows
obj = vtkPointWidget
obj
is an instance of the vtkPointWidget class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkPointWidget = obj.NewInstance ()
vtkPointWidget = obj.SafeDownCast (vtkObject o)
obj.SetEnabled (int )
- Methods that satisfy the superclass' API.
obj.PlaceWidget (double bounds[6])
- Methods that satisfy the superclass' API.
obj.PlaceWidget ()
- Methods that satisfy the superclass' API.
obj.PlaceWidget (double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
- Grab the polydata (including points) that defines the point. A
single point and a vertex compose the vtkPolyData.
obj.GetPolyData (vtkPolyData pd)
- Grab the polydata (including points) that defines the point. A
single point and a vertex compose the vtkPolyData.
obj.SetPosition (double x, double y, double z)
- Set/Get the position of the point. Note that if the position is set
outside of the bounding box, it will be clamped to the boundary of
the bounding box.
obj.SetPosition (double x[3])
- Set/Get the position of the point. Note that if the position is set
outside of the bounding box, it will be clamped to the boundary of
the bounding box.
double = obj.GetPosition ()
- Set/Get the position of the point. Note that if the position is set
outside of the bounding box, it will be clamped to the boundary of
the bounding box.
obj.GetPosition (double xyz[3])
- Turn on/off the wireframe bounding box.
obj.SetOutline (int o)
- Turn on/off the wireframe bounding box.
int = obj.GetOutline ()
- Turn on/off the wireframe bounding box.
obj.OutlineOn ()
- Turn on/off the wireframe bounding box.
obj.OutlineOff ()
- Turn on/off the wireframe x-shadows.
obj.SetXShadows (int o)
- Turn on/off the wireframe x-shadows.
int = obj.GetXShadows ()
- Turn on/off the wireframe x-shadows.
obj.XShadowsOn ()
- Turn on/off the wireframe x-shadows.
obj.XShadowsOff ()
- Turn on/off the wireframe y-shadows.
obj.SetYShadows (int o)
- Turn on/off the wireframe y-shadows.
int = obj.GetYShadows ()
- Turn on/off the wireframe y-shadows.
obj.YShadowsOn ()
- Turn on/off the wireframe y-shadows.
obj.YShadowsOff ()
- Turn on/off the wireframe z-shadows.
obj.SetZShadows (int o)
- Turn on/off the wireframe z-shadows.
int = obj.GetZShadows ()
- Turn on/off the wireframe z-shadows.
obj.ZShadowsOn ()
- Turn on/off the wireframe z-shadows.
obj.ZShadowsOff ()
- If translation mode is on, as the widget is moved the bounding box,
shadows, and cursor are all translated simultaneously as the point
moves.
obj.SetTranslationMode (int mode)
- If translation mode is on, as the widget is moved the bounding box,
shadows, and cursor are all translated simultaneously as the point
moves.
int = obj.GetTranslationMode ()
- If translation mode is on, as the widget is moved the bounding box,
shadows, and cursor are all translated simultaneously as the point
moves.
obj.TranslationModeOn ()
- If translation mode is on, as the widget is moved the bounding box,
shadows, and cursor are all translated simultaneously as the point
moves.
obj.TranslationModeOff ()
- Convenience methods to turn outline and shadows on and off.
obj.AllOn ()
- Convenience methods to turn outline and shadows on and off.
obj.AllOff ()
- Get the handle properties (the little balls are the handles). The
properties of the handles when selected and normal can be
set.
vtkProperty = obj.GetProperty ()
- Get the handle properties (the little balls are the handles). The
properties of the handles when selected and normal can be
set.
vtkProperty = obj.GetSelectedProperty ()
- Get the handle properties (the little balls are the handles). The
properties of the handles when selected and normal can be
set.
obj.SetHotSpotSize (double )
- Set the "hot spot" size; i.e., the region around the focus, in which the
motion vector is used to control the constrained sliding action. Note the
size is specified as a fraction of the length of the diagonal of the
point widget's bounding box.
double = obj.GetHotSpotSizeMinValue ()
- Set the "hot spot" size; i.e., the region around the focus, in which the
motion vector is used to control the constrained sliding action. Note the
size is specified as a fraction of the length of the diagonal of the
point widget's bounding box.
double = obj.GetHotSpotSizeMaxValue ()
- Set the "hot spot" size; i.e., the region around the focus, in which the
motion vector is used to control the constrained sliding action. Note the
size is specified as a fraction of the length of the diagonal of the
point widget's bounding box.
double = obj.GetHotSpotSize ()
- Set the "hot spot" size; i.e., the region around the focus, in which the
motion vector is used to control the constrained sliding action. Note the
size is specified as a fraction of the length of the diagonal of the
point widget's bounding box.