#include <vtkInteractorStyle.h>
Inheritance diagram for vtkInteractorStyle:
Public Methods | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | SetInteractor (vtkRenderWindowInteractor *interactor) |
virtual vtkRenderWindowInteractor * | GetInteractor () |
void | FindPokedCamera (int, int) |
void | FindPokedRenderer (int, int) |
virtual void | HighlightProp (vtkProp *prop) |
virtual void | HighlightActor2D (vtkActor2D *actor2D) |
virtual void | HighlightProp3D (vtkProp3D *prop3D) |
virtual void | SetPickColor (float, float, float) |
virtual void | SetPickColor (float[3]) |
virtual float * | GetPickColor () |
virtual void | GetPickColor (float data[3]) |
virtual void | OnMouseMove (int ctrl, int shift, int X, int Y) |
virtual void | OnLeftButtonDown (int ctrl, int shift, int X, int Y) |
virtual void | OnLeftButtonUp (int ctrl, int shift, int X, int Y) |
virtual void | OnMiddleButtonDown (int ctrl, int shift, int X, int Y) |
virtual void | OnMiddleButtonUp (int ctrl, int shift, int X, int Y) |
virtual void | OnRightButtonDown (int ctrl, int shift, int X, int Y) |
virtual void | OnRightButtonUp (int ctrl, int shift, int X, int Y) |
virtual void | OnChar (int ctrl, int shift, char keycode, int repeatcount) |
virtual void | OnKeyDown (int ctrl, int shift, char keycode, int repeatcount) |
virtual void | OnKeyUp (int ctrl, int shift, char keycode, int repeatcount) |
virtual void | OnKeyPress (int ctrl, int shift, char keycode, char *keysym, int repeatcount) |
virtual void | OnKeyRelease (int ctrl, int shift, char keycode, char *keysym, int repeatcount) |
virtual void | OnConfigure (int width, int height) |
virtual void | OnEnter (int ctrl, int shift, int x, int y) |
virtual void | OnLeave (int ctrl, int shift, int x, int y) |
virtual void | OnTimer () |
void | SetLeftButtonPressMethod (void(*f)(void *), void *arg) |
void | SetLeftButtonPressMethodArgDelete (void(*f)(void *)) |
void | SetLeftButtonReleaseMethod (void(*f)(void *), void *arg) |
void | SetLeftButtonReleaseMethodArgDelete (void(*f)(void *)) |
void | SetMiddleButtonPressMethod (void(*f)(void *), void *arg) |
void | SetMiddleButtonPressMethodArgDelete (void(*f)(void *)) |
void | SetMiddleButtonReleaseMethod (void(*f)(void *), void *arg) |
void | SetMiddleButtonReleaseMethodArgDelete (void(*f)(void *)) |
void | SetRightButtonPressMethod (void(*f)(void *), void *arg) |
void | SetRightButtonPressMethodArgDelete (void(*f)(void *)) |
void | SetRightButtonReleaseMethod (void(*f)(void *), void *arg) |
void | SetRightButtonReleaseMethodArgDelete (void(*f)(void *)) |
Static Public Methods | |
vtkInteractorStyle * | New () |
int | IsTypeOf (const char *type) |
vtkInteractorStyle * | SafeDownCast (vtkObject *o) |
Protected Methods | |
vtkInteractorStyle () | |
~vtkInteractorStyle () | |
vtkInteractorStyle (const vtkInteractorStyle &) | |
void | operator= (const vtkInteractorStyle &) |
virtual void | ComputeDisplayToWorld (double x, double y, double z, double *worldPt) |
virtual void | ComputeWorldToDisplay (double x, double y, double z, double *displayPt) |
virtual void | ComputeDisplayToWorld (double x, double y, double z, float *worldPt) |
virtual void | ComputeWorldToDisplay (double x, double y, double z, float *displayPt) |
virtual void | UpdateInternalState (int ctrl, int shift, int X, int Y) |
virtual void | RotateCamera (int x, int y) |
virtual void | SpinCamera (int x, int y) |
virtual void | PanCamera (int x, int y) |
virtual void | DollyCamera (int x, int y) |
virtual void | StartState (int newstate) |
virtual void | StopState () |
virtual void | StartAnimate () |
virtual void | StopAnimate () |
virtual void | StartRotate () |
virtual void | EndRotate () |
virtual void | StartZoom () |
virtual void | EndZoom () |
virtual void | StartPan () |
virtual void | EndPan () |
virtual void | StartSpin () |
virtual void | EndSpin () |
virtual void | StartDolly () |
virtual void | EndDolly () |
virtual void | StartUniformScale () |
virtual void | EndUniformScale () |
virtual void | StartTimer () |
virtual void | EndTimer () |
Protected Attributes | |
vtkRenderWindowInteractor * | Interactor |
vtkCamera * | CurrentCamera |
vtkLight * | CurrentLight |
vtkRenderer * | CurrentRenderer |
float | Center [2] |
float | DeltaAzimuth |
float | DeltaElevation |
int | CtrlKey |
int | ShiftKey |
int | LastPos [2] |
int | State |
int | AnimState |
float | FocalDepth |
vtkOutlineSource * | Outline |
vtkPolyDataMapper * | OutlineMapper |
vtkActor * | OutlineActor |
vtkRenderer * | PickedRenderer |
vtkProp * | CurrentProp |
int | PropPicked |
float | PickColor [3] |
vtkActor2D * | PickedActor2D |
unsigned long | LeftButtonPressTag |
unsigned long | LeftButtonReleaseTag |
unsigned long | MiddleButtonPressTag |
unsigned long | MiddleButtonReleaseTag |
unsigned long | RightButtonPressTag |
unsigned long | RightButtonReleaseTag |
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:
|
When an event occurs, we must determine which Renderer the event occurred within, since one RenderWindow may contain multiple renderers. We also need to know what camera to operate on. This is just the ActiveCamera of the poked renderer. |
|
Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkInteractorStyleFlight. |
|
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. |
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkInteractorStyleFlight. |
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkInteractorStyleFlight. |
|
This class must be supplied with a vtkRenderWindowInteractor wrapper or parent. This class should not normally be instantiated by application programmers. Reimplemented from vtkObject. Reimplemented in vtkInteractorStyleFlight. |
|
OnChar implements keyboard functions, but subclasses can override this behavior Reimplemented in vtkInteractorStyleFlight. |
|
These are more esoteric events, but are useful in some cases. Reimplemented in vtkInteractorStyleUser. |
|
Generic event bindings must be overridden in subclasses Reimplemented in vtkInteractorStyleFlight. |
|
OnTimer calls RotateCamera, RotateActor etc which should be overridden by style subclasses. Reimplemented in vtkInteractorStyleFlight. |
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject. Reimplemented in vtkInteractorStyleFlight. |
|
Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkInteractorStyleFlight. |
|
Set/Get the Interactor wrapper being controlled by this object. |
|
Callbacks so that the application can override the default behaviour. |
|
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). |