VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtk3DWidget Class Referenceabstract

an abstract superclass for 3D widgets More...

#include <vtk3DWidget.h>

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

Public Types

typedef vtkInteractorObserver Superclass
 
- Public Types inherited from vtkInteractorObserver
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtk3DWidgetNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void PlaceWidget (double bounds[6])=0
 
virtual void PlaceWidget ()
 
virtual void PlaceWidget (double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
 
virtual void SetProp3D (vtkProp3D *)
 
virtual vtkProp3DGetProp3D ()
 
virtual void SetInputData (vtkDataSet *)
 
virtual void SetInputConnection (vtkAlgorithmOutput *)
 
virtual vtkDataSetGetInput ()
 
virtual void SetPlaceFactor (double)
 
virtual double GetPlaceFactor ()
 
virtual void SetHandleSize (double)
 
virtual double GetHandleSize ()
 
- Public Member Functions inherited from vtkInteractorObserver
vtkInteractorObserverNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void OnChar ()
 
virtual void SetEnabled (int)
 
int GetEnabled ()
 
void EnabledOn ()
 
void EnabledOff ()
 
void On ()
 
void Off ()
 
virtual void SetInteractor (vtkRenderWindowInteractor *iren)
 
virtual vtkRenderWindowInteractorGetInteractor ()
 
virtual void SetPriority (float)
 
virtual float GetPriority ()
 
virtual void PickingManagedOn ()
 
virtual void PickingManagedOff ()
 
virtual void SetPickingManaged (bool)
 
virtual bool GetPickingManaged ()
 
virtual void SetKeyPressActivation (int)
 
virtual int GetKeyPressActivation ()
 
virtual void KeyPressActivationOn ()
 
virtual void KeyPressActivationOff ()
 
virtual void SetKeyPressActivationValue (char)
 
virtual char GetKeyPressActivationValue ()
 
virtual vtkRendererGetDefaultRenderer ()
 
virtual void SetDefaultRenderer (vtkRenderer *)
 
virtual vtkRendererGetCurrentRenderer ()
 
virtual void SetCurrentRenderer (vtkRenderer *)
 
void GrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void ReleaseFocus ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtk3DWidgetSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkInteractorObserver
static int IsTypeOf (const char *type)
 
static vtkInteractorObserverSafeDownCast (vtkObjectBase *o)
 
static void ComputeDisplayToWorld (vtkRenderer *ren, double x, double y, double z, double worldPt[4])
 
static void ComputeWorldToDisplay (vtkRenderer *ren, double x, double y, double z, double displayPt[3])
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtk3DWidget ()
 
 ~vtk3DWidget ()
 
void AdjustBounds (double bounds[6], double newBounds[6], double center[3])
 
double SizeHandles (double factor)
 
virtual void SizeHandles ()
 
void UpdateInput ()
 
- Protected Member Functions inherited from vtkInteractorObserver
 vtkInteractorObserver ()
 
 ~vtkInteractorObserver ()
 
virtual void RegisterPickers ()
 
void UnRegisterPickers ()
 
virtual void PickersModified ()
 
vtkPickingManagerGetPickingManager ()
 
int RequestCursorShape (int requestedShape)
 
virtual void StartInteraction ()
 
virtual void EndInteraction ()
 
void ComputeDisplayToWorld (double x, double y, double z, double worldPt[4])
 
void ComputeWorldToDisplay (double x, double y, double z, double displayPt[3])
 
vtkAssemblyPathGetAssemblyPath (double X, double Y, double Z, vtkAbstractPropPicker *picker)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkProp3DProp3D
 
vtk3DWidgetConnection * ConnectionHolder
 
double PlaceFactor
 
int Placed
 
double InitialBounds [6]
 
double InitialLength
 
double HandleSize
 
int ValidPick
 
double LastPickPosition [3]
 
- Protected Attributes inherited from vtkInteractorObserver
int Enabled
 
vtkCallbackCommandEventCallbackCommand
 
vtkCallbackCommandKeyPressCallbackCommand
 
float Priority
 
bool PickingManaged
 
int KeyPressActivation
 
char KeyPressActivationValue
 
vtkRenderWindowInteractorInteractor
 
vtkRendererCurrentRenderer
 
vtkRendererDefaultRenderer
 
unsigned long CharObserverTag
 
unsigned long DeleteObserverTag
 
vtkObserverMediatorObserverMediator
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkInteractorObserver
static void ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 

Detailed Description

an abstract superclass for 3D widgets

vtk3DWidget is an abstract superclass for 3D interactor observers. These 3D widgets represent themselves in the scene, and have special callbacks associated with them that allows interactive manipulation of the widget. Inparticular, the difference between a vtk3DWidget and its abstract superclass vtkInteractorObserver is that vtk3DWidgets are "placed" in 3D space. vtkInteractorObservers have no notion of where they are placed, and may not exist in 3D space at all. 3D widgets also provide auxiliary functions like producing a transformation, creating polydata (for seeding streamlines, probes, etc.) or creating implicit functions. See the concrete subclasses for particulars.

Typically the widget is used by specifying a vtkProp3D or VTK dataset as input, and then invoking the "On" method to activate it. (You can also specify a bounding box to help position the widget.) Prior to invoking the On() method, the user may also wish to use the PlaceWidget() to initially position it. The 'i' (for "interactor") keypresses also can be used to turn the widgets on and off (methods exist to change the key value and enable keypress activiation).

To support interactive manipulation of objects, this class (and subclasses) invoke the events StartInteractionEvent, InteractionEvent, and EndInteractionEvent. These events are invoked when the vtk3DWidget 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 the vtkProp3D or other object (InteractionEvent), and set the desired frame rate back to normal values (EndInteractionEvent).

Note that the Priority attribute inherited from vtkInteractorObserver has a new default value which is now 0.5 so that all 3D widgets have a higher priority than the usual interactor styles.

See also
vtkBoxWidget vtkPlaneWidget vtkLineWidget vtkPointWidget vtkSphereWidget vtkImplicitPlaneWidget
Events:
vtkCommand::PlaceWidgetEvent

Definition at line 69 of file vtk3DWidget.h.

Member Typedef Documentation

Definition at line 72 of file vtk3DWidget.h.

Constructor & Destructor Documentation

vtk3DWidget::vtk3DWidget ( )
protected
vtk3DWidget::~vtk3DWidget ( )
protected

Member Function Documentation

static int vtk3DWidget::IsTypeOf ( const char *  type)
static
virtual int vtk3DWidget::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 vtkInteractorObserver.

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

static vtk3DWidget* vtk3DWidget::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtk3DWidget::NewInstanceInternal ( ) const
protectedvirtual
vtk3DWidget* vtk3DWidget::NewInstance ( ) const
void vtk3DWidget::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 vtkImagePlaneWidget, vtkSplineWidget, vtkBrokenLineWidget, vtkPlaneWidget, vtkBoxWidget, vtkLineWidget, vtkImplicitPlaneWidget, vtkImageTracerWidget, vtkPointWidget, vtkSphereWidget, vtkImageCroppingRegionsWidget, and vtkPolyDataSourceWidget.

virtual void vtk3DWidget::PlaceWidget ( double  bounds[6])
pure virtual

This method is used to initially place the widget. The placement of the widget depends on whether a Prop3D or input dataset is provided. If one of these two is provided, they will be used to obtain a bounding box, around which the widget is placed. Otherwise, you can manually specify a bounds with the PlaceWidget(bounds) method. Note: PlaceWidget(bounds) is required by all subclasses; the other methods are provided as convenience methods.

Implemented in vtkImagePlaneWidget, vtkSplineWidget, vtkBrokenLineWidget, vtkPlaneWidget, vtkBoxWidget, vtkLineWidget, vtkImplicitPlaneWidget, vtkImageTracerWidget, vtkPointWidget, vtkSphereWidget, vtkImageCroppingRegionsWidget, and vtkPolyDataSourceWidget.

virtual void vtk3DWidget::PlaceWidget ( )
virtual

This method is used to initially place the widget. The placement of the widget depends on whether a Prop3D or input dataset is provided. If one of these two is provided, they will be used to obtain a bounding box, around which the widget is placed. Otherwise, you can manually specify a bounds with the PlaceWidget(bounds) method. Note: PlaceWidget(bounds) is required by all subclasses; the other methods are provided as convenience methods.

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

virtual void vtk3DWidget::PlaceWidget ( double  xmin,
double  xmax,
double  ymin,
double  ymax,
double  zmin,
double  zmax 
)
virtual

This method is used to initially place the widget. The placement of the widget depends on whether a Prop3D or input dataset is provided. If one of these two is provided, they will be used to obtain a bounding box, around which the widget is placed. Otherwise, you can manually specify a bounds with the PlaceWidget(bounds) method. Note: PlaceWidget(bounds) is required by all subclasses; the other methods are provided as convenience methods.

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

virtual void vtk3DWidget::SetProp3D ( vtkProp3D )
virtual

Specify a vtkProp3D around which to place the widget. This is not required, but if supplied, it is used to initially position the widget.

virtual vtkProp3D* vtk3DWidget::GetProp3D ( )
virtual

Specify a vtkProp3D around which to place the widget. This is not required, but if supplied, it is used to initially position the widget.

virtual void vtk3DWidget::SetInputData ( vtkDataSet )
virtual

Specify the input dataset. This is not required, but if supplied, and no vtkProp3D is specified, it is used to initially position the widget.

virtual void vtk3DWidget::SetInputConnection ( vtkAlgorithmOutput )
virtual

Specify the input dataset. This is not required, but if supplied, and no vtkProp3D is specified, it is used to initially position the widget.

Reimplemented in vtkImagePlaneWidget.

virtual vtkDataSet* vtk3DWidget::GetInput ( )
virtual

Specify the input dataset. This is not required, but if supplied, and no vtkProp3D is specified, it is used to initially position the widget.

virtual void vtk3DWidget::SetPlaceFactor ( double  )
virtual

Set/Get a factor representing the scaling of the widget upon placement (via the PlaceWidget() method). Normally the widget is placed so that it just fits within the bounding box defined in PlaceWidget(bounds). The PlaceFactor will make the widget larger (PlaceFactor > 1) or smaller (PlaceFactor < 1). By default, PlaceFactor is set to 0.5.

virtual double vtk3DWidget::GetPlaceFactor ( )
virtual

Set/Get a factor representing the scaling of the widget upon placement (via the PlaceWidget() method). Normally the widget is placed so that it just fits within the bounding box defined in PlaceWidget(bounds). The PlaceFactor will make the widget larger (PlaceFactor > 1) or smaller (PlaceFactor < 1). By default, PlaceFactor is set to 0.5.

virtual void vtk3DWidget::SetHandleSize ( double  )
virtual

Set/Get the factor that controls the size of the handles that appear as part of the widget. These handles (like spheres, etc.) are used to manipulate the widget, and are sized as a fraction of the screen diagonal.

virtual double vtk3DWidget::GetHandleSize ( )
virtual

Set/Get the factor that controls the size of the handles that appear as part of the widget. These handles (like spheres, etc.) are used to manipulate the widget, and are sized as a fraction of the screen diagonal.

void vtk3DWidget::AdjustBounds ( double  bounds[6],
double  newBounds[6],
double  center[3] 
)
protected
double vtk3DWidget::SizeHandles ( double  factor)
protected
virtual void vtk3DWidget::SizeHandles ( )
inlineprotectedvirtual
void vtk3DWidget::UpdateInput ( )
protected

Member Data Documentation

vtkProp3D* vtk3DWidget::Prop3D
protected

Definition at line 131 of file vtk3DWidget.h.

vtk3DWidgetConnection* vtk3DWidget::ConnectionHolder
protected

Definition at line 133 of file vtk3DWidget.h.

double vtk3DWidget::PlaceFactor
protected

Definition at line 136 of file vtk3DWidget.h.

int vtk3DWidget::Placed
protected

Definition at line 137 of file vtk3DWidget.h.

double vtk3DWidget::InitialBounds[6]
protected

Definition at line 141 of file vtk3DWidget.h.

double vtk3DWidget::InitialLength
protected

Definition at line 142 of file vtk3DWidget.h.

double vtk3DWidget::HandleSize
protected

Definition at line 143 of file vtk3DWidget.h.

int vtk3DWidget::ValidPick
protected

Definition at line 148 of file vtk3DWidget.h.

double vtk3DWidget::LastPickPosition[3]
protected

Definition at line 149 of file vtk3DWidget.h.


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