Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Related Pages  

vtkInteractorStyle Class Reference

provide event-driven interface to the rendering window (defines trackball mode). More...

#include <vtkInteractorStyle.h>

Inheritance diagram for vtkInteractorStyle:

Inheritance graph
[legend]
Collaboration diagram for vtkInteractorStyle:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetInteractor (vtkRenderWindowInteractor *interactor)
virtual vtkRenderWindowInteractorGetInteractor ()
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

vtkRenderWindowInteractorInteractor
vtkCameraCurrentCamera
vtkLightCurrentLight
vtkRendererCurrentRenderer
float Center [2]
float DeltaAzimuth
float DeltaElevation
int CtrlKey
int ShiftKey
int LastPos [2]
int State
int AnimState
float FocalDepth
vtkOutlineSourceOutline
vtkPolyDataMapperOutlineMapper
vtkActorOutlineActor
vtkRendererPickedRenderer
vtkPropCurrentProp
int PropPicked
float PickColor [3]
vtkActor2DPickedActor2D
unsigned long LeftButtonPressTag
unsigned long LeftButtonReleaseTag
unsigned long MiddleButtonPressTag
unsigned long MiddleButtonReleaseTag
unsigned long RightButtonPressTag
unsigned long RightButtonReleaseTag

Detailed Description

provide event-driven interface to the rendering window (defines trackball mode).

Date:
2000/12/10 20:08:40
Revision:
1.22

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.

See also:
vtkInteractorStyleTrackball


Member Function Documentation

void vtkInteractorStyle::FindPokedCamera int   ,
int   
 

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.

virtual const char* vtkInteractorStyle::GetClassName   [virtual]
 

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.

virtual void vtkInteractorStyle::HighlightProp vtkProp   prop [virtual]
 

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.

virtual int vtkInteractorStyle::IsA const char *    type [virtual]
 

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.

int vtkInteractorStyle::IsTypeOf const char *    type [static]
 

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.

vtkInteractorStyle* vtkInteractorStyle::New   [static]
 

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.

virtual void vtkInteractorStyle::OnChar int    ctrl,
int    shift,
char    keycode,
int    repeatcount
[virtual]
 

OnChar implements keyboard functions, but subclasses can override this behavior

Reimplemented in vtkInteractorStyleFlight.

virtual void vtkInteractorStyle::OnConfigure int    width,
int    height
[virtual]
 

These are more esoteric events, but are useful in some cases.

Reimplemented in vtkInteractorStyleUser.

virtual void vtkInteractorStyle::OnMouseMove int    ctrl,
int    shift,
int    X,
int    Y
[virtual]
 

Generic event bindings must be overridden in subclasses

Reimplemented in vtkInteractorStyleFlight.

virtual void vtkInteractorStyle::OnTimer   [virtual]
 

OnTimer calls RotateCamera, RotateActor etc which should be overridden by style subclasses.

Reimplemented in vtkInteractorStyleFlight.

void vtkInteractorStyle::PrintSelf ostream &    os,
vtkIndent    indent
[virtual]
 

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.

vtkInteractorStyle* vtkInteractorStyle::SafeDownCast vtkObject   o [static]
 

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.

virtual void vtkInteractorStyle::SetInteractor vtkRenderWindowInteractor   interactor [virtual]
 

Set/Get the Interactor wrapper being controlled by this object.

void vtkInteractorStyle::SetLeftButtonPressMethod void(*    f)(void *),
void *    arg
 

Callbacks so that the application can override the default behaviour.

virtual void vtkInteractorStyle::SetPickColor float   ,
float   ,
float   
[virtual]
 

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).


The documentation for this class was generated from the following file:
Generated on Tue Mar 19 13:27:34 2002 for VTK by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002