VTK  9.4.20241230
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
vtkInteractorObserver Class Reference

an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor More...

#include <vtkInteractorObserver.h>

Inheritance diagram for vtkInteractorObserver:
[legend]
Collaboration diagram for vtkInteractorObserver:
[legend]

Public Types

typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
vtkInteractorObserverNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
virtual void SetEnabled (int)
 Methods for turning the interactor observer on and off, and determining its state.
 
int GetEnabled ()
 
void EnabledOn ()
 
void EnabledOff ()
 
void On ()
 
void Off ()
 
virtual void OnChar ()
 Sets up the keypress-i event.
 
virtual void SetInteractor (vtkRenderWindowInteractor *iren)
 This method is used to associate the widget with the render window interactor.
 
virtual vtkRenderWindowInteractorGetInteractor ()
 This method is used to associate the widget with the render window interactor.
 
virtual void SetPriority (float)
 Set/Get the priority at which events are processed.
 
virtual float GetPriority ()
 Set/Get the priority at which events are processed.
 
virtual void PickingManagedOn ()
 Enable/Disable the use of a manager to process the picking.
 
virtual void PickingManagedOff ()
 Enable/Disable the use of a manager to process the picking.
 
virtual void SetPickingManaged (bool managed)
 Enable/Disable the use of a manager to process the picking.
 
virtual bool GetPickingManaged ()
 Enable/Disable the use of a manager to process the picking.
 
virtual void SetKeyPressActivation (vtkTypeBool)
 Enable/Disable of the use of a keypress to turn on and off the interactor observer.
 
virtual vtkTypeBool GetKeyPressActivation ()
 Enable/Disable of the use of a keypress to turn on and off the interactor observer.
 
virtual void KeyPressActivationOn ()
 Enable/Disable of the use of a keypress to turn on and off the interactor observer.
 
virtual void KeyPressActivationOff ()
 Enable/Disable of the use of a keypress to turn on and off the interactor observer.
 
virtual void SetKeyPressActivationValue (char)
 Specify which key press value to use to activate the interactor observer (if key press activation is enabled).
 
virtual char GetKeyPressActivationValue ()
 Specify which key press value to use to activate the interactor observer (if key press activation is enabled).
 
virtual vtkRendererGetDefaultRenderer ()
 Set/Get the default renderer to use when activating the interactor observer.
 
virtual void SetDefaultRenderer (vtkRenderer *)
 Set/Get the default renderer to use when activating the interactor observer.
 
virtual vtkRendererGetCurrentRenderer ()
 Set/Get the current renderer.
 
virtual void SetCurrentRenderer (vtkRenderer *)
 Set/Get the current renderer.
 
void GrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods enable an interactor observer to exclusively grab all events invoked by its associated vtkRenderWindowInteractor.
 
void ReleaseFocus ()
 These methods enable an interactor observer to exclusively grab all events invoked by its associated vtkRenderWindowInteractor.
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on.
 
virtual void DebugOff ()
 Turn debugging output off.
 
bool GetDebug ()
 Get the value of the debug flag.
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag.
 
virtual void Modified ()
 Update the modification time for this object.
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time.
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
vtkTypeBool InvokeEvent (unsigned long event)
 
vtkTypeBool InvokeEvent (const char *event)
 
std::string GetObjectDescription () const override
 The object description printed in messages and PrintSelf output.
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method.
 
vtkTypeBool InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
vtkTypeBool InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
 
virtual void SetObjectName (const std::string &objectName)
 Set/get the name of this object for reporting purposes.
 
virtual std::string GetObjectName () const
 Set/get the name of this object for reporting purposes.
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string.
 
virtual std::string GetObjectDescription () const
 The object description printed in messages and PrintSelf output.
 
virtual vtkTypeBool IsA (const char *name)
 Return 1 if this class is the same type of (or a subclass of) the named class.
 
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
 
virtual void Delete ()
 Delete a VTK object.
 
virtual void FastDelete ()
 Delete a reference to this object.
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream.
 
void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object).
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object).
 
int GetReferenceCount ()
 Return the current reference count of this object.
 
void SetReferenceCount (int)
 Sets the reference count.
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space.
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
 
virtual bool UsesGarbageCollector () const
 Indicate whether the class uses vtkGarbageCollector or not.
 

Static Public Member Functions

static vtkTypeBool IsTypeOf (const char *type)
 
static vtkInteractorObserverSafeDownCast (vtkObjectBase *o)
 
static void ComputeDisplayToWorld (vtkRenderer *ren, double x, double y, double z, double worldPt[4])
 Convenience methods for outside classes.
 
static void ComputeWorldToDisplay (vtkRenderer *ren, double x, double y, double z, double displayPt[3])
 Convenience methods for outside classes.
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes.
 
static void SetGlobalWarningDisplay (vtkTypeBool val)
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
static vtkTypeBool GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class.
 
static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within.
 
static bool GetUsingMemkind ()
 A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space.
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkInteractorObserver ()
 
 ~vtkInteractorObserver () override
 
virtual void RegisterPickers ()
 Register internal Pickers in the Picking Manager.
 
void UnRegisterPickers ()
 Unregister internal pickers from the Picking Manager.
 
vtkPickingManagerGetPickingManager ()
 Return the picking manager associated on the context on which the observer currently belong.
 
vtkAssemblyPathGetAssemblyPath (double X, double Y, double Z, vtkAbstractPropPicker *picker)
 Proceed to a pick, whether through the PickingManager if the picking is managed or directly using the picker, and return the assembly path.
 
int RequestCursorShape (int requestedShape)
 
virtual void StartInteraction ()
 Utility routines used to start and end interaction.
 
virtual void EndInteraction ()
 Utility routines used to start and end interaction.
 
void ComputeDisplayToWorld (double x, double y, double z, double worldPt[4])
 Helper method for subclasses.
 
void ComputeWorldToDisplay (double x, double y, double z, double displayPt[3])
 Helper method for subclasses.
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events.
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events.
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void RegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
virtual void ObjectFinalize ()
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Static Protected Member Functions

static void ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 Handles the char widget activation event.
 
- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

Protected Attributes

int Enabled
 
vtkCallbackCommandEventCallbackCommand
 
vtkCallbackCommandKeyPressCallbackCommand
 
float Priority
 
bool PickingManaged
 
vtkTypeBool KeyPressActivation
 
char KeyPressActivationValue
 
vtkRenderWindowInteractorInteractor
 
vtkRendererCurrentRenderer
 
vtkRendererDefaultRenderer
 
unsigned long CharObserverTag
 
unsigned long DeleteObserverTag
 
vtkObserverMediatorObserverMediator
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
std::string ObjectName
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

an abstract superclass for classes observing events invoked by vtkRenderWindowInteractor

vtkInteractorObserver is an abstract superclass for subclasses that observe events invoked by vtkRenderWindowInteractor. These subclasses are typically things like 3D widgets; objects that interact with actors in the scene, or interactively probe the scene for information.

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.

See also
vtk3DWidget vtkBoxWidget vtkLineWidget
Events:
vtkCommand::CursorChangedEvent
Examples:
vtkInteractorObserver (Examples)
Online Examples:

Definition at line 104 of file vtkInteractorObserver.h.

Member Typedef Documentation

◆ Superclass

Definition at line 107 of file vtkInteractorObserver.h.

Constructor & Destructor Documentation

◆ vtkInteractorObserver()

vtkInteractorObserver::vtkInteractorObserver ( )
protected

◆ ~vtkInteractorObserver()

vtkInteractorObserver::~vtkInteractorObserver ( )
overrideprotected

Member Function Documentation

◆ IsTypeOf()

static vtkTypeBool vtkInteractorObserver::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkInteractorObserver::IsA ( const char *  name)
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 vtkObjectBase.

Reimplemented in vtkQWidgetWidget, vtkInteractorStyleDrawPolygon, vtkInteractorStyleFlight, vtkInteractorStyleImage, vtkInteractorStyleJoystickActor, vtkInteractorStyleJoystickCamera, vtkInteractorStyleMultiTouchCamera, vtkInteractorStyleRubberBand2D, vtkInteractorStyleRubberBand3D, vtkInteractorStyleRubberBandPick, vtkInteractorStyleRubberBandZoom, vtkInteractorStyleSwitch, vtkInteractorStyleTerrain, vtkInteractorStyleTrackball, vtkInteractorStyleTrackballActor, vtkInteractorStyleTrackballCamera, vtkInteractorStyleUnicam, vtkInteractorStyleUser, vtkParallelCoordinatesInteractorStyle, vtk3DCursorWidget, vtk3DWidget, vtkAbstractWidget, vtkAffineWidget, vtkAngleWidget, vtkAxesTransformWidget, vtkBalloonWidget, vtkBiDimensionalWidget, vtkBorderWidget, vtkBoxWidget, vtkBoxWidget2, vtkBrokenLineWidget, vtkButtonWidget, vtkCamera3DWidget, vtkCameraOrientationWidget, vtkCameraPathWidget, vtkCameraWidget, vtkCaptionWidget, vtkCenteredSliderWidget, vtkCheckerboardWidget, vtkCompassWidget, vtkContinuousValueWidget, vtkContourWidget, vtkCoordinateFrameWidget, vtkDisplaySizedImplicitPlaneWidget, vtkDistanceWidget, vtkFinitePlaneWidget, vtkHandleWidget, vtkHoverWidget, vtkImageCroppingRegionsWidget, vtkImagePlaneWidget, vtkImageTracerWidget, vtkImplicitAnnulusWidget, vtkImplicitConeWidget, vtkImplicitCylinderWidget, vtkImplicitFrustumWidget, vtkImplicitPlaneWidget, vtkImplicitPlaneWidget2, vtkLightWidget, vtkLineWidget, vtkLineWidget2, vtkLogoWidget, vtkMagnifierWidget, vtkOrientationMarkerWidget, vtkOrientationWidget, vtkParallelopipedWidget, vtkPlaneWidget, vtkPlaybackWidget, vtkPointCloudWidget, vtkPointWidget, vtkPolyDataSourceWidget, vtkPolyLineWidget, vtkProgressBarWidget, vtkRectilinearWipeWidget, vtkResliceCursorWidget, vtkScalarBarWidget, vtkSeedWidget, vtkSliderWidget, vtkSphereWidget, vtkSphereWidget2, vtkSplineWidget, vtkSplineWidget2, vtkTensorProbeWidget, vtkTensorWidget, vtkTextWidget, vtkXYPlotWidget, vtkAnariTestInteractor, vtkInteractorEventRecorder, vtkInteractorStyle, vtkInteractorStyle3D, vtkInteractorStyleSwitchBase, vtkOpenVRInteractorStyle, vtkOpenXRInteractorStyle, vtkOSPRayTestInteractor, vtkVRInteractorStyle, vtkVRMenuWidget, vtkVRPanelWidget, vtkZSpaceInteractorStyle, vtkContextInteractorStyle, vtkInteractorStyleAreaSelectHover, and vtkInteractorStyleTreeMapHover.

◆ SafeDownCast()

static vtkInteractorObserver * vtkInteractorObserver::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkInteractorObserver::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented in vtkQWidgetWidget, vtkInteractorStyleDrawPolygon, vtkInteractorStyleFlight, vtkInteractorStyleImage, vtkInteractorStyleJoystickActor, vtkInteractorStyleJoystickCamera, vtkInteractorStyleMultiTouchCamera, vtkInteractorStyleRubberBand2D, vtkInteractorStyleRubberBand3D, vtkInteractorStyleRubberBandPick, vtkInteractorStyleRubberBandZoom, vtkInteractorStyleSwitch, vtkInteractorStyleTerrain, vtkInteractorStyleTrackball, vtkInteractorStyleTrackballActor, vtkInteractorStyleTrackballCamera, vtkInteractorStyleUnicam, vtkInteractorStyleUser, vtkParallelCoordinatesInteractorStyle, vtk3DCursorWidget, vtk3DWidget, vtkAbstractWidget, vtkAffineWidget, vtkAngleWidget, vtkAxesTransformWidget, vtkBalloonWidget, vtkBiDimensionalWidget, vtkBorderWidget, vtkBoxWidget, vtkBoxWidget2, vtkBrokenLineWidget, vtkButtonWidget, vtkCamera3DWidget, vtkCameraOrientationWidget, vtkCameraPathWidget, vtkCameraWidget, vtkCaptionWidget, vtkCenteredSliderWidget, vtkCheckerboardWidget, vtkCompassWidget, vtkContinuousValueWidget, vtkContourWidget, vtkCoordinateFrameWidget, vtkDisplaySizedImplicitPlaneWidget, vtkDistanceWidget, vtkFinitePlaneWidget, vtkHandleWidget, vtkHoverWidget, vtkImageCroppingRegionsWidget, vtkImagePlaneWidget, vtkImageTracerWidget, vtkImplicitAnnulusWidget, vtkImplicitConeWidget, vtkImplicitCylinderWidget, vtkImplicitFrustumWidget, vtkImplicitPlaneWidget, vtkImplicitPlaneWidget2, vtkLightWidget, vtkLineWidget, vtkLineWidget2, vtkLogoWidget, vtkMagnifierWidget, vtkOrientationMarkerWidget, vtkOrientationWidget, vtkParallelopipedWidget, vtkPlaneWidget, vtkPlaybackWidget, vtkPointCloudWidget, vtkPointWidget, vtkPolyDataSourceWidget, vtkPolyLineWidget, vtkProgressBarWidget, vtkRectilinearWipeWidget, vtkResliceCursorWidget, vtkScalarBarWidget, vtkSeedWidget, vtkSliderWidget, vtkSphereWidget, vtkSphereWidget2, vtkSplineWidget, vtkSplineWidget2, vtkTensorProbeWidget, vtkTensorWidget, vtkTextWidget, vtkXYPlotWidget, vtkAnariTestInteractor, vtkInteractorEventRecorder, vtkInteractorStyle, vtkInteractorStyle3D, vtkInteractorStyleSwitchBase, vtkOpenVRInteractorStyle, vtkOpenXRInteractorStyle, vtkOSPRayTestInteractor, vtkVRInteractorStyle, vtkVRMenuWidget, vtkVRPanelWidget, vtkZSpaceInteractorStyle, vtkContextInteractorStyle, vtkInteractorStyleAreaSelectHover, and vtkInteractorStyleTreeMapHover.

◆ NewInstance()

vtkInteractorObserver * vtkInteractorObserver::NewInstance ( ) const

◆ PrintSelf()

void vtkInteractorObserver::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

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

Reimplemented in vtkQWidgetWidget, vtkInteractorStyleDrawPolygon, vtkInteractorStyleFlight, vtkInteractorStyleImage, vtkInteractorStyleJoystickActor, vtkInteractorStyleJoystickCamera, vtkInteractorStyleMultiTouchCamera, vtkInteractorStyleRubberBand2D, vtkInteractorStyleRubberBand3D, vtkInteractorStyleRubberBandPick, vtkInteractorStyleRubberBandZoom, vtkInteractorStyleSwitch, vtkInteractorStyleTerrain, vtkInteractorStyleTrackball, vtkInteractorStyleTrackballActor, vtkInteractorStyleTrackballCamera, vtkInteractorStyleUnicam, vtkInteractorStyleUser, vtkParallelCoordinatesInteractorStyle, vtkLightWidget, vtkLineWidget, vtkLineWidget2, vtkLogoWidget, vtkMagnifierWidget, vtkOrientationMarkerWidget, vtkParallelopipedWidget, vtkPlaneWidget, vtkPlaybackWidget, vtkPointCloudWidget, vtkPointWidget, vtkPolyDataSourceWidget, vtkPolyLineWidget, vtkProgressBarWidget, vtkRectilinearWipeWidget, vtkResliceCursorWidget, vtkScalarBarWidget, vtkSeedWidget, vtkSliderWidget, vtkSphereWidget, vtkSphereWidget2, vtkSplineWidget, vtkSplineWidget2, vtkTensorProbeWidget, vtkTensorWidget, vtkTextWidget, vtkXYPlotWidget, vtkInteractorStyle, vtkInteractorStyle3D, vtkInteractorStyleSwitchBase, vtkVRInteractorStyle, vtkVRMenuWidget, vtkVRPanelWidget, vtkZSpaceInteractorStyle, vtkInteractorStyleAreaSelectHover, and vtkInteractorStyleTreeMapHover.

◆ SetInteractor()

virtual void vtkInteractorObserver::SetInteractor ( vtkRenderWindowInteractor iren)
virtual

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. It automatically registers available pickers to the Picking Manager.

Reimplemented in vtkSeedWidget, vtkInteractorStyle, vtkInteractorStyleSwitch, vtkInteractorEventRecorder, vtkVRInteractorStyle, vtkInteractorStyleAreaSelectHover, and vtkInteractorStyleTreeMapHover.

◆ GetInteractor()

virtual vtkRenderWindowInteractor * vtkInteractorObserver::GetInteractor ( )
virtual

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. It automatically registers available pickers to the Picking Manager.

Reimplemented in vtkInteractorStyleSwitchBase.

◆ SetEnabled()

virtual void vtkInteractorObserver::SetEnabled ( int  )
inlinevirtual

◆ GetEnabled()

int vtkInteractorObserver::GetEnabled ( )
inline

Definition at line 132 of file vtkInteractorObserver.h.

◆ EnabledOn()

void vtkInteractorObserver::EnabledOn ( )
inline

Definition at line 133 of file vtkInteractorObserver.h.

◆ EnabledOff()

void vtkInteractorObserver::EnabledOff ( )
inline

Definition at line 134 of file vtkInteractorObserver.h.

◆ On()

void vtkInteractorObserver::On ( )
inline

Definition at line 135 of file vtkInteractorObserver.h.

◆ Off()

void vtkInteractorObserver::Off ( )
inline

Definition at line 136 of file vtkInteractorObserver.h.

◆ SetPriority()

virtual void vtkInteractorObserver::SetPriority ( float  )
virtual

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

Reimplemented in vtkAbstractWidget.

◆ GetPriority()

virtual float vtkInteractorObserver::GetPriority ( )
virtual

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

◆ PickingManagedOn()

virtual void vtkInteractorObserver::PickingManagedOn ( )
virtual

Enable/Disable the use of a manager to process the picking.

Enabled by default.

◆ PickingManagedOff()

virtual void vtkInteractorObserver::PickingManagedOff ( )
virtual

Enable/Disable the use of a manager to process the picking.

Enabled by default.

◆ SetPickingManaged()

virtual void vtkInteractorObserver::SetPickingManaged ( bool  managed)
virtual

Enable/Disable the use of a manager to process the picking.

Enabled by default.

◆ GetPickingManaged()

virtual bool vtkInteractorObserver::GetPickingManaged ( )
virtual

Enable/Disable the use of a manager to process the picking.

Enabled by default.

◆ SetKeyPressActivation()

virtual void vtkInteractorObserver::SetKeyPressActivation ( vtkTypeBool  )
virtual

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

◆ GetKeyPressActivation()

virtual vtkTypeBool vtkInteractorObserver::GetKeyPressActivation ( )
virtual

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

◆ KeyPressActivationOn()

virtual void vtkInteractorObserver::KeyPressActivationOn ( )
virtual

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

◆ KeyPressActivationOff()

virtual void vtkInteractorObserver::KeyPressActivationOff ( )
virtual

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

◆ SetKeyPressActivationValue()

virtual void vtkInteractorObserver::SetKeyPressActivationValue ( char  )
virtual

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.

◆ GetKeyPressActivationValue()

virtual char vtkInteractorObserver::GetKeyPressActivationValue ( )
virtual

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.

◆ GetDefaultRenderer()

virtual vtkRenderer * vtkInteractorObserver::GetDefaultRenderer ( )
virtual

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.

◆ SetDefaultRenderer()

virtual void vtkInteractorObserver::SetDefaultRenderer ( vtkRenderer )
virtual

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.

Reimplemented in vtkInteractorStyleSwitch, and vtkCameraOrientationWidget.

◆ GetCurrentRenderer()

virtual vtkRenderer * vtkInteractorObserver::GetCurrentRenderer ( )
virtual

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. This is especially true with multiple viewports (renderers). 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).

◆ SetCurrentRenderer()

virtual void vtkInteractorObserver::SetCurrentRenderer ( vtkRenderer )
virtual

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. This is especially true with multiple viewports (renderers). 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).

Reimplemented in vtkInteractorStyleSwitch, and vtkSeedWidget.

◆ OnChar()

virtual void vtkInteractorObserver::OnChar ( )
virtual

◆ ComputeDisplayToWorld() [1/2]

static void vtkInteractorObserver::ComputeDisplayToWorld ( vtkRenderer ren,
double  x,
double  y,
double  z,
double  worldPt[4] 
)
static

Convenience methods for outside classes.

Make sure that the parameter "ren" is not-null.

◆ ComputeWorldToDisplay() [1/2]

static void vtkInteractorObserver::ComputeWorldToDisplay ( vtkRenderer ren,
double  x,
double  y,
double  z,
double  displayPt[3] 
)
static

Convenience methods for outside classes.

Make sure that the parameter "ren" is not-null.

◆ GrabFocus()

void vtkInteractorObserver::GrabFocus ( vtkCommand mouseEvents,
vtkCommand keypressEvents = nullptr 
)

These methods enable an interactor observer to exclusively grab all events invoked by its associated vtkRenderWindowInteractor.

(This method is typically used by widgets to grab events once an event sequence begins.) The GrabFocus() signature takes up to two vtkCommands corresponding to mouse events and keypress events. (These two commands are separated so that the widget can listen for its activation keypress, as well as listening for DeleteEvents, without actually having to process mouse events.)

◆ ReleaseFocus()

void vtkInteractorObserver::ReleaseFocus ( )

These methods enable an interactor observer to exclusively grab all events invoked by its associated vtkRenderWindowInteractor.

(This method is typically used by widgets to grab events once an event sequence begins.) The GrabFocus() signature takes up to two vtkCommands corresponding to mouse events and keypress events. (These two commands are separated so that the widget can listen for its activation keypress, as well as listening for DeleteEvents, without actually having to process mouse events.)

◆ StartInteraction()

virtual void vtkInteractorObserver::StartInteraction ( )
protectedvirtual

Utility routines used to start and end interaction.

For example, it switches the display update rate. It does not invoke the corresponding events.

◆ EndInteraction()

virtual void vtkInteractorObserver::EndInteraction ( )
protectedvirtual

Utility routines used to start and end interaction.

For example, it switches the display update rate. It does not invoke the corresponding events.

Reimplemented in vtkOrientationMarkerWidget.

◆ ProcessEvents()

static void vtkInteractorObserver::ProcessEvents ( vtkObject object,
unsigned long  event,
void *  clientdata,
void *  calldata 
)
staticprotected

Handles the char widget activation event.

Also handles the delete event.

◆ ComputeDisplayToWorld() [2/2]

void vtkInteractorObserver::ComputeDisplayToWorld ( double  x,
double  y,
double  z,
double  worldPt[4] 
)
protected

Helper method for subclasses.

◆ ComputeWorldToDisplay() [2/2]

void vtkInteractorObserver::ComputeWorldToDisplay ( double  x,
double  y,
double  z,
double  displayPt[3] 
)
protected

Helper method for subclasses.

◆ RegisterPickers()

virtual void vtkInteractorObserver::RegisterPickers ( )
protectedvirtual

Register internal Pickers in the Picking Manager.

Must be reimplemented by concrete widgets to register their pickers.

Reimplemented in vtkBalloonWidget, vtkBoxWidget, vtkBrokenLineWidget, vtkImagePlaneWidget, vtkImageTracerWidget, vtkImplicitPlaneWidget, vtkLineWidget, vtkPlaneWidget, vtkPointWidget, vtkSphereWidget, and vtkSplineWidget.

◆ UnRegisterPickers()

void vtkInteractorObserver::UnRegisterPickers ( )
protected

Unregister internal pickers from the Picking Manager.

◆ GetPickingManager()

vtkPickingManager * vtkInteractorObserver::GetPickingManager ( )
protected

Return the picking manager associated on the context on which the observer currently belong.

◆ GetAssemblyPath()

vtkAssemblyPath * vtkInteractorObserver::GetAssemblyPath ( double  X,
double  Y,
double  Z,
vtkAbstractPropPicker picker 
)
protected

Proceed to a pick, whether through the PickingManager if the picking is managed or directly using the picker, and return the assembly path.

◆ RequestCursorShape()

int vtkInteractorObserver::RequestCursorShape ( int  requestedShape)
protected

Member Data Documentation

◆ Enabled

int vtkInteractorObserver::Enabled
protected

Definition at line 276 of file vtkInteractorObserver.h.

◆ EventCallbackCommand

vtkCallbackCommand* vtkInteractorObserver::EventCallbackCommand
protected

Definition at line 279 of file vtkInteractorObserver.h.

◆ KeyPressCallbackCommand

vtkCallbackCommand* vtkInteractorObserver::KeyPressCallbackCommand
protected

Definition at line 280 of file vtkInteractorObserver.h.

◆ Priority

float vtkInteractorObserver::Priority
protected

Definition at line 283 of file vtkInteractorObserver.h.

◆ PickingManaged

bool vtkInteractorObserver::PickingManaged
protected

Definition at line 287 of file vtkInteractorObserver.h.

◆ KeyPressActivation

vtkTypeBool vtkInteractorObserver::KeyPressActivation
protected

Definition at line 314 of file vtkInteractorObserver.h.

◆ KeyPressActivationValue

char vtkInteractorObserver::KeyPressActivationValue
protected

Definition at line 315 of file vtkInteractorObserver.h.

◆ Interactor

vtkRenderWindowInteractor* vtkInteractorObserver::Interactor
protected

Definition at line 318 of file vtkInteractorObserver.h.

◆ CurrentRenderer

vtkRenderer* vtkInteractorObserver::CurrentRenderer
protected

Definition at line 321 of file vtkInteractorObserver.h.

◆ DefaultRenderer

vtkRenderer* vtkInteractorObserver::DefaultRenderer
protected

Definition at line 322 of file vtkInteractorObserver.h.

◆ CharObserverTag

unsigned long vtkInteractorObserver::CharObserverTag
protected

Definition at line 324 of file vtkInteractorObserver.h.

◆ DeleteObserverTag

unsigned long vtkInteractorObserver::DeleteObserverTag
protected

Definition at line 325 of file vtkInteractorObserver.h.

◆ ObserverMediator

vtkObserverMediator* vtkInteractorObserver::ObserverMediator
protected

Definition at line 328 of file vtkInteractorObserver.h.


The documentation for this class was generated from the following file: