Section: Visualization Toolkit Rendering Classes
vtkInteractorObserver defines the method SetInteractor() and enables and disables the processing of events by the vtkInteractorObserver. Use the methods EnabledOn() or SetEnabled(1) to turn on the interactor observer, and the methods EnabledOff() or SetEnabled(0) to turn off the interactor. Initial value is 0.
To support interactive manipulation of objects, this class (and subclasses) invoke the events StartInteractionEvent, InteractionEvent, and EndInteractionEvent. These events are invoked when the vtkInteractorObserver enters a state where rapid response is desired: mouse motion, etc. The events can be used, for example, to set the desired update frame rate (StartInteractionEvent), operate on data or update a pipeline (InteractionEvent), and set the desired frame rate back to normal values (EndInteractionEvent). Two other events, EnableEvent and DisableEvent, are invoked when the interactor observer is enabled or disabled.
To create an instance of class vtkInteractorObserver, simply invoke its constructor as follows
obj = vtkInteractorObserver
obj
is an instance of the vtkInteractorObserver class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkInteractorObserver = obj.NewInstance ()
vtkInteractorObserver = obj.SafeDownCast (vtkObject o)
obj.SetEnabled (int )
- Methods for turning the interactor observer on and off, and determining
its state. All subclasses must provide the SetEnabled() method.
Enabling a vtkInteractorObserver has the side effect of adding
observers; disabling it removes the observers. Prior to enabling the
vtkInteractorObserver you must set the render window interactor (via
SetInteractor()). Initial value is 0.
int = obj.GetEnabled ()
- Methods for turning the interactor observer on and off, and determining
its state. All subclasses must provide the SetEnabled() method.
Enabling a vtkInteractorObserver has the side effect of adding
observers; disabling it removes the observers. Prior to enabling the
vtkInteractorObserver you must set the render window interactor (via
SetInteractor()). Initial value is 0.
obj.EnabledOn ()
- Methods for turning the interactor observer on and off, and determining
its state. All subclasses must provide the SetEnabled() method.
Enabling a vtkInteractorObserver has the side effect of adding
observers; disabling it removes the observers. Prior to enabling the
vtkInteractorObserver you must set the render window interactor (via
SetInteractor()). Initial value is 0.
obj.EnabledOff ()
- Methods for turning the interactor observer on and off, and determining
its state. All subclasses must provide the SetEnabled() method.
Enabling a vtkInteractorObserver has the side effect of adding
observers; disabling it removes the observers. Prior to enabling the
vtkInteractorObserver you must set the render window interactor (via
SetInteractor()). Initial value is 0.
obj.On ()
- Methods for turning the interactor observer on and off, and determining
its state. All subclasses must provide the SetEnabled() method.
Enabling a vtkInteractorObserver has the side effect of adding
observers; disabling it removes the observers. Prior to enabling the
vtkInteractorObserver you must set the render window interactor (via
SetInteractor()). Initial value is 0.
obj.Off ()
- This method is used to associate the widget with the render window
interactor. Observers of the appropriate events invoked in the render
window interactor are set up as a result of this method invocation.
The SetInteractor() method must be invoked prior to enabling the
vtkInteractorObserver.
obj.SetInteractor (vtkRenderWindowInteractor iren)
- This method is used to associate the widget with the render window
interactor. Observers of the appropriate events invoked in the render
window interactor are set up as a result of this method invocation.
The SetInteractor() method must be invoked prior to enabling the
vtkInteractorObserver.
vtkRenderWindowInteractor = obj.GetInteractor ()
- This method is used to associate the widget with the render window
interactor. Observers of the appropriate events invoked in the render
window interactor are set up as a result of this method invocation.
The SetInteractor() method must be invoked prior to enabling the
vtkInteractorObserver.
obj.SetPriority (float )
- Set/Get the priority at which events are processed. This is used when
multiple interactor observers are used simultaneously. The default value
is 0.0 (lowest priority.) Note that when multiple interactor observer
have the same priority, then the last observer added will process the
event first. (Note: once the SetInteractor() method has been called,
changing the priority does not effect event processing. You will have
to SetInteractor(NULL), change priority, and then SetInteractor(iren)
to have the priority take effect.)
float = obj.GetPriorityMinValue ()
- Set/Get the priority at which events are processed. This is used when
multiple interactor observers are used simultaneously. The default value
is 0.0 (lowest priority.) Note that when multiple interactor observer
have the same priority, then the last observer added will process the
event first. (Note: once the SetInteractor() method has been called,
changing the priority does not effect event processing. You will have
to SetInteractor(NULL), change priority, and then SetInteractor(iren)
to have the priority take effect.)
float = obj.GetPriorityMaxValue ()
- Set/Get the priority at which events are processed. This is used when
multiple interactor observers are used simultaneously. The default value
is 0.0 (lowest priority.) Note that when multiple interactor observer
have the same priority, then the last observer added will process the
event first. (Note: once the SetInteractor() method has been called,
changing the priority does not effect event processing. You will have
to SetInteractor(NULL), change priority, and then SetInteractor(iren)
to have the priority take effect.)
float = obj.GetPriority ()
- Set/Get the priority at which events are processed. This is used when
multiple interactor observers are used simultaneously. The default value
is 0.0 (lowest priority.) Note that when multiple interactor observer
have the same priority, then the last observer added will process the
event first. (Note: once the SetInteractor() method has been called,
changing the priority does not effect event processing. You will have
to SetInteractor(NULL), change priority, and then SetInteractor(iren)
to have the priority take effect.)
obj.SetKeyPressActivation (int )
- Enable/Disable of the use of a keypress to turn on and off the
interactor observer. (By default, the keypress is 'i' for "interactor
observer".) Set the KeyPressActivationValue to change which key
activates the widget.)
int = obj.GetKeyPressActivation ()
- Enable/Disable of the use of a keypress to turn on and off the
interactor observer. (By default, the keypress is 'i' for "interactor
observer".) Set the KeyPressActivationValue to change which key
activates the widget.)
obj.KeyPressActivationOn ()
- Enable/Disable of the use of a keypress to turn on and off the
interactor observer. (By default, the keypress is 'i' for "interactor
observer".) Set the KeyPressActivationValue to change which key
activates the widget.)
obj.KeyPressActivationOff ()
- Enable/Disable of the use of a keypress to turn on and off the
interactor observer. (By default, the keypress is 'i' for "interactor
observer".) Set the KeyPressActivationValue to change which key
activates the widget.)
obj.SetKeyPressActivationValue (char )
- Specify which key press value to use to activate the interactor observer
(if key press activation is enabled). By default, the key press
activation value is 'i'. Note: once the SetInteractor() method is
invoked, changing the key press activation value will not affect the key
press until SetInteractor(NULL)/SetInteractor(iren) is called.
char = obj.GetKeyPressActivationValue ()
- Specify which key press value to use to activate the interactor observer
(if key press activation is enabled). By default, the key press
activation value is 'i'. Note: once the SetInteractor() method is
invoked, changing the key press activation value will not affect the key
press until SetInteractor(NULL)/SetInteractor(iren) is called.
vtkRenderer = obj.GetDefaultRenderer ()
- Set/Get the default renderer to use when activating the interactor
observer. Normally when the widget is activated (SetEnabled(1) or when
keypress activation takes place), the renderer over which the mouse
pointer is positioned is used. Alternatively, you can specify the
renderer to bind the interactor to when the interactor observer is
activated.
obj.SetDefaultRenderer (vtkRenderer )
- Set/Get the default renderer to use when activating the interactor
observer. Normally when the widget is activated (SetEnabled(1) or when
keypress activation takes place), the renderer over which the mouse
pointer is positioned is used. Alternatively, you can specify the
renderer to bind the interactor to when the interactor observer is
activated.
vtkRenderer = obj.GetCurrentRenderer ()
- Set/Get the current renderer. Normally when the widget is activated
(SetEnabled(1) or when keypress activation takes place), the renderer
over which the mouse pointer is positioned is used and assigned to
this Ivar. Alternatively, you might want to set the CurrentRenderer
explicitly.
WARNING: note that if the DefaultRenderer Ivar is set (see above),
it will always override the parameter passed to SetCurrentRenderer,
unless it is NULL.
(i.e., SetCurrentRenderer(foo) = SetCurrentRenderer(DefaultRenderer).
obj.SetCurrentRenderer (vtkRenderer )
- Set/Get the current renderer. Normally when the widget is activated
(SetEnabled(1) or when keypress activation takes place), the renderer
over which the mouse pointer is positioned is used and assigned to
this Ivar. Alternatively, you might want to set the CurrentRenderer
explicitly.
WARNING: note that if the DefaultRenderer Ivar is set (see above),
it will always override the parameter passed to SetCurrentRenderer,
unless it is NULL.
(i.e., SetCurrentRenderer(foo) = SetCurrentRenderer(DefaultRenderer).
obj.OnChar ()
- Sets up the keypress-i event.