NAME
vtkRenderWindowInteractor - provide event driven interface to rendering window
SYNOPSIS
#include "/opt/vtk-c++/graphics/vtkRenderWindowInteractor.h"
class VTK_EXPORT vtkRenderWindowInteractor : public vtkObject
vtkRenderWindowInteractor();
~vtkRenderWindowInteractor();
static vtkRenderWindowInteractor *New();
const char *GetClassName() {return "vtkRenderWindowInteractor";};
void PrintSelf(ostream& os, vtkIndent indent);
virtual void Initialize() {this->Initialized=1;this->RenderWindow->Render();};
virtual void Start() {};
void SetRenderWindow(vtkRenderWindow *aren);
vtkRenderWindow *GetRenderWindow();
void SetLightFollowCamera(int);
int GetLightFollowCamera();
void LightFollowCameraOn();
void LightFollowCameraOff();
void SetDesiredUpdateRate(float);
float GetDesiredUpdateRate();
void SetStillUpdateRate(float);
float GetStillUpdateRate();
int GetInitialized();
void FindPokedCamera(int,int);
void FindPokedRenderer(int,int);
virtual void HighlightActor(vtkActor *actor);
void SetStartPickMethod(void (*f)(void *), void *arg);
void SetStartPickMethodArgDelete(void (*f)(void *));
void SetEndPickMethod(void (*f)(void *), void *arg);
void SetEndPickMethodArgDelete(void (*f)(void *));
void SetPicker(vtkPicker *picker);
void SetPicker(vtkPicker& picker) {this->SetPicker(&picker);};
vtkPicker *GetPicker();
virtual vtkPicker *CreateDefaultPicker();
void SetUserMethod(void (*f)(void *), void *arg);
void SetUserMethodArgDelete(void (*f)(void *));
DESCRIPTION
vtkRenderWindowInteractor is a convenience object that provides event bindings to common graphics functions. For example, camera zoom-in/zoom-out, pan, rotate, resetting; picking of actors, points, or cells; switching in/out of stereo mode; property changes such as wireframe and surface; and a toggle to force the light to be placed at camera viewpoint (pointing in view direction).
EVENT BINDINGS
Specific devices have different camera bindings. The bindings are on both mouse events as well as keyboard presses. See vtkXRenderWindowInteractor and vtkWin32RenderWindowInteractor for specific information.
void SetLightFollowCamera(int)
Turn on/off the automatic repositioning of lights as the camera moves.
void SetDesiredUpdateRate(float)
Set/Get the desired update rate. This is used by vtkLODActor's to tell them how quickly they need to render. This update is in effect only when the camera is being rotated, or zoomed. When the interactor is still, the StillUpdateRate is used instead. A value of zero indicates that the update rate is unimportant.
void SetStillUpdateRate(float)
Set/Get the desired update rate when movement has stopped. See the SetDesiredUpdateRate method.
int GetInitialized()
See whether interactor has been initialized yet.
virtual void HighlightActor(vtkActor *actor);
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.
vtkPicker *GetPicker()
Get the object used to perform pick operations.
virtual vtkPicker *CreateDefaultPicker();
Create default picker. Used to create one when none is specified.
vtkRenderWindowInteractor()
Construct object so that light follows camera motion.
void HighlightActor(vtkActor *actor)
When pick action successfully selects actor, this method highlights the actor appropriately. Currently this is done by placing a bounding box around the actor.
void SetStartPickMethod(void (*f)(void *), void *arg)
Specify a method to be executed prior to the pick operation.
void SetEndPickMethod(void (*f)(void *), void *arg)
Specify a method to be executed after the pick operation.
void SetPicker(vtkPicker *picker)
Set the object used to perform pick operations. You can use this to control what type of data is picked.
void SetUserMethod(void (*f)(void *), void *arg)
Set the user method. This method is invoked on a keypress.
void SetUserMethodArgDelete(void (*f)(void *))
Called when a void* argument is being discarded. Lets the user free it.
void SetStartPickMethodArgDelete(void (*f)(void *))
Called when a void* argument is being discarded. Lets the user free it.
void SetEndPickMethodArgDelete(void (*f)(void *))
Called when a void* argument is being discarded. Lets the user free it.