FreeMat: vtkPointWidget

FreeMat

- Main Page
- Related Pages

vtkPointWidget

Section: Visualization Toolkit Widget Classes

# Usage

This 3D widget allows the user to position a point in 3D space using a 3D cursor. The cursor has an outline bounding box, axes-aligned cross-hairs, and axes shadows. (The outline and shadows can be turned off.) Any of these can be turned off. A nice feature of the object is that the vtkPointWidget, like any 3D widget, will work with the current interactor style. That is, if vtkPointWidget does not handle an event, then all other registered observers (including the interactor style) have an opportunity to process the event. Otherwise, the vtkPointWidget will terminate the processing of the event that it handles.

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

# Methods

The class vtkPointWidget has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `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.