FreeMat
|
Section: Visualization Toolkit Rendering Classes
vtkInteractorStyle is a base class implementing the majority of motion control routines and defines an event driven interface to support vtkRenderWindowInteractor. vtkRenderWindowInteractor implements platform dependent key/mouse routing and timer control, which forwards events in a neutral form to vtkInteractorStyle.
vtkInteractorStyle implements the "joystick" style of interaction. That is, holding down the mouse keys generates a stream of events that cause continuous actions (e.g., rotate, translate, pan, zoom). (The class vtkInteractorStyleTrackball implements a grab and move style.) The event bindings for this class include the following:
vtkInteractorStyle can be subclassed to provide new interaction styles and a facility to override any of the default mouse/key operations which currently handle trackball or joystick styles is provided. Note that this class will fire a variety of events that can be watched using an observer, such as LeftButtonPressEvent, LeftButtonReleaseEvent, MiddleButtonPressEvent, MiddleButtonReleaseEvent, RightButtonPressEvent, RightButtonReleaseEvent, EnterEvent, LeaveEvent, KeyPressEvent, KeyReleaseEvent, CharEvent, ExposeEvent, ConfigureEvent, TimerEvent, MouseMoveEvent,
To create an instance of class vtkInteractorStyle, simply invoke its constructor as follows
obj = vtkInteractorStyle
The class vtkInteractorStyle 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 vtkInteractorStyle class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkInteractorStyle = obj.NewInstance ()
vtkInteractorStyle = obj.SafeDownCast (vtkObject o)
obj.SetInteractor (vtkRenderWindowInteractor interactor)
- Set/Get the Interactor wrapper being controlled by this object. (Satisfy superclass API.) obj.SetEnabled (int )
- Turn on/off this interactor. Interactor styles operate a little bit differently than other types of interactor observers. When the SetInteractor() method is invoked, the automatically enable themselves. This is a legacy requirement, and convenient for the user. obj.SetAutoAdjustCameraClippingRange (int )
- If AutoAdjustCameraClippingRange is on, then before each render the camera clipping range will be adjusted to "fit" the whole scene. Clipping will still occur if objects in the scene are behind the camera or come very close. If AutoAdjustCameraClippingRange is off, no adjustment will be made per render, but the camera clipping range will still be reset when the camera is reset. int = obj.GetAutoAdjustCameraClippingRangeMinValue ()
- If AutoAdjustCameraClippingRange is on, then before each render the camera clipping range will be adjusted to "fit" the whole scene. Clipping will still occur if objects in the scene are behind the camera or come very close. If AutoAdjustCameraClippingRange is off, no adjustment will be made per render, but the camera clipping range will still be reset when the camera is reset. int = obj.GetAutoAdjustCameraClippingRangeMaxValue ()
- If AutoAdjustCameraClippingRange is on, then before each render the camera clipping range will be adjusted to "fit" the whole scene. Clipping will still occur if objects in the scene are behind the camera or come very close. If AutoAdjustCameraClippingRange is off, no adjustment will be made per render, but the camera clipping range will still be reset when the camera is reset. int = obj.GetAutoAdjustCameraClippingRange ()
- If AutoAdjustCameraClippingRange is on, then before each render the camera clipping range will be adjusted to "fit" the whole scene. Clipping will still occur if objects in the scene are behind the camera or come very close. If AutoAdjustCameraClippingRange is off, no adjustment will be made per render, but the camera clipping range will still be reset when the camera is reset. obj.AutoAdjustCameraClippingRangeOn ()
- If AutoAdjustCameraClippingRange is on, then before each render the camera clipping range will be adjusted to "fit" the whole scene. Clipping will still occur if objects in the scene are behind the camera or come very close. If AutoAdjustCameraClippingRange is off, no adjustment will be made per render, but the camera clipping range will still be reset when the camera is reset. obj.AutoAdjustCameraClippingRangeOff ()
- If AutoAdjustCameraClippingRange is on, then before each render the camera clipping range will be adjusted to "fit" the whole scene. Clipping will still occur if objects in the scene are behind the camera or come very close. If AutoAdjustCameraClippingRange is off, no adjustment will be made per render, but the camera clipping range will still be reset when the camera is reset. obj.FindPokedRenderer (int , int )
- When an event occurs, we must determine which Renderer the event occurred within, since one RenderWindow may contain multiple renderers. int = obj.GetState ()
- Some useful information for interaction int = obj.GetUseTimers ()
- Set/Get timer hint obj.SetUseTimers (int )
- Set/Get timer hint obj.UseTimersOn ()
- Set/Get timer hint obj.UseTimersOff ()
- Set/Get timer hint obj.SetTimerDuration (long )
- If using timers, specify the default timer interval (in milliseconds). Care must be taken when adjusting the timer interval from the default value of 10 milliseconds–it may adversely affect the interactors. GetTimerDurationMinValue = obj.()
- If using timers, specify the default timer interval (in milliseconds). Care must be taken when adjusting the timer interval from the default value of 10 milliseconds–it may adversely affect the interactors. GetTimerDurationMaxValue = obj.()
- If using timers, specify the default timer interval (in milliseconds). Care must be taken when adjusting the timer interval from the default value of 10 milliseconds–it may adversely affect the interactors. long = obj.GetTimerDuration ()
- If using timers, specify the default timer interval (in milliseconds). Care must be taken when adjusting the timer interval from the default value of 10 milliseconds–it may adversely affect the interactors. obj.SetHandleObservers (int )
- Does ProcessEvents handle observers on this class or not int = obj.GetHandleObservers ()
- Does ProcessEvents handle observers on this class or not obj.HandleObserversOn ()
- Does ProcessEvents handle observers on this class or not obj.HandleObserversOff ()
- Does ProcessEvents handle observers on this class or not obj.OnMouseMove ()
- Generic event bindings can be overridden in subclasses obj.OnLeftButtonDown ()
- Generic event bindings can be overridden in subclasses obj.OnLeftButtonUp ()
- Generic event bindings can be overridden in subclasses obj.OnMiddleButtonDown ()
- Generic event bindings can be overridden in subclasses obj.OnMiddleButtonUp ()
- Generic event bindings can be overridden in subclasses obj.OnRightButtonDown ()
- Generic event bindings can be overridden in subclasses obj.OnRightButtonUp ()
- Generic event bindings can be overridden in subclasses obj.OnMouseWheelForward ()
- Generic event bindings can be overridden in subclasses obj.OnMouseWheelBackward ()
- Generic event bindings can be overridden in subclasses obj.OnChar ()
- OnChar is triggered when an ASCII key is pressed. Some basic key presses are handled here ('q' for Quit, 'p' for Pick, etc) obj.OnKeyDown ()
obj.OnKeyUp ()
obj.OnKeyPress ()
obj.OnKeyRelease ()
obj.OnExpose ()
- These are more esoteric events, but are useful in some cases. obj.OnConfigure ()
- These are more esoteric events, but are useful in some cases. obj.OnEnter ()
- These are more esoteric events, but are useful in some cases. obj.OnLeave ()
- These are more esoteric events, but are useful in some cases. obj.OnTimer ()
- OnTimer calls Rotate, Rotate etc which should be overridden by style subclasses. obj.Rotate ()
- These methods for the different interactions in different modes are overridden in subclasses to perform the correct motion. Since they might be called from OnTimer, they do not have mouse coord parameters (use interactor's GetEventPosition and GetLastEventPosition) obj.Spin ()
- These methods for the different interactions in different modes are overridden in subclasses to perform the correct motion. Since they might be called from OnTimer, they do not have mouse coord parameters (use interactor's GetEventPosition and GetLastEventPosition) obj.Pan ()
- These methods for the different interactions in different modes are overridden in subclasses to perform the correct motion. Since they might be called from OnTimer, they do not have mouse coord parameters (use interactor's GetEventPosition and GetLastEventPosition) obj.Dolly ()
- These methods for the different interactions in different modes are overridden in subclasses to perform the correct motion. Since they might be called from OnTimer, they do not have mouse coord parameters (use interactor's GetEventPosition and GetLastEventPosition) obj.Zoom ()
- These methods for the different interactions in different modes are overridden in subclasses to perform the correct motion. Since they might be called from OnTimer, they do not have mouse coord parameters (use interactor's GetEventPosition and GetLastEventPosition) obj.UniformScale ()
- These methods for the different interactions in different modes are overridden in subclasses to perform the correct motion. Since they might be called from OnTimer, they do not have mouse coord parameters (use interactor's GetEventPosition and GetLastEventPosition) obj.StartState (int newstate)
- utility routines used by state changes obj.StopState ()
- utility routines used by state changes obj.StartAnimate ()
- Interaction mode entry points used internally. obj.StopAnimate ()
- Interaction mode entry points used internally. obj.StartRotate ()
- Interaction mode entry points used internally. obj.EndRotate ()
- Interaction mode entry points used internally. obj.StartZoom ()
- Interaction mode entry points used internally. obj.EndZoom ()
- Interaction mode entry points used internally. obj.StartPan ()
- Interaction mode entry points used internally. obj.EndPan ()
- Interaction mode entry points used internally. obj.StartSpin ()
- Interaction mode entry points used internally. obj.EndSpin ()
- Interaction mode entry points used internally. obj.StartDolly ()
- Interaction mode entry points used internally. obj.EndDolly ()
- Interaction mode entry points used internally. obj.StartUniformScale ()
- Interaction mode entry points used internally. obj.EndUniformScale ()
- Interaction mode entry points used internally. obj.StartTimer ()
- Interaction mode entry points used internally. obj.EndTimer ()
- Interaction mode entry points used internally. obj.HighlightProp (vtkProp prop)
- When picking successfully selects an actor, this method highlights the picked prop appropriately. Currently this is done by placing a bounding box around a picked vtkProp3D, and using the PickColor to highlight a vtkProp2D. obj.HighlightActor2D (vtkActor2D actor2D)
- When picking successfully selects an actor, this method highlights the picked prop appropriately. Currently this is done by placing a bounding box around a picked vtkProp3D, and using the PickColor to highlight a vtkProp2D. obj.HighlightProp3D (vtkProp3D prop3D)
- When picking successfully selects an actor, this method highlights the picked prop appropriately. Currently this is done by placing a bounding box around a picked vtkProp3D, and using the PickColor to highlight a vtkProp2D. obj.SetPickColor (double , double , double )
- Set/Get the pick color (used by default to color vtkActor2D's). The color is expressed as red/green/blue values between (0.0,1.0). obj.SetPickColor (double a[3])
- Set/Get the pick color (used by default to color vtkActor2D's). The color is expressed as red/green/blue values between (0.0,1.0). double = obj. GetPickColor ()
- Set/Get the pick color (used by default to color vtkActor2D's). The color is expressed as red/green/blue values between (0.0,1.0). obj.SetMouseWheelMotionFactor (double )
- Set/Get the mouse wheel motion factor. Default to 1.0. Set it to a different value to emphasize or de-emphasize the action triggered by mouse wheel motion. double = obj.GetMouseWheelMotionFactor ()
- Set/Get the mouse wheel motion factor. Default to 1.0. Set it to a different value to emphasize or de-emphasize the action triggered by mouse wheel motion. vtkTDxInteractorStyle = obj.GetTDxStyle ()
- 3Dconnexion device interactor style. Initial value is a pointer to an object of class vtkTdxInteractorStyleCamera. obj.SetTDxStyle (vtkTDxInteractorStyle tdxStyle)
- 3Dconnexion device interactor style. Initial value is a pointer to an object of class vtkTdxInteractorStyleCamera.