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

vtk3DWidget Class Reference

#include <vtk3DWidget.h>

Inheritance diagram for vtk3DWidget:

Inheritance graph
[legend]
Collaboration diagram for vtk3DWidget:

Collaboration graph
[legend]
List of all members.

Detailed Description

an abstract superclass for 3D widgets

Date:
2002/09/10 18:02:27
Revision:
1.14

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
Created by:
  • Schroeder, Will
CVS contributions (if > 5%):
  • Schroeder, Will (92%)
CVS logs (CVSweb):
  • .cxx (/Hybrid/vtk3DWidget.cxx)
  • .h (/Hybrid/vtk3DWidget.h)

Definition at line 80 of file vtk3DWidget.h.

Public Types

typedef vtkInteractorObserver Superclass

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void PlaceWidget (float bounds[6])=0
void PlaceWidget ()
void PlaceWidget (float xmin, float xmax, float ymin, float ymax, float zmin, float zmax)
virtual void SetProp3D (vtkProp3D *)
virtual vtkProp3DGetProp3D ()
virtual void SetInput (vtkDataSet *)
virtual vtkDataSetGetInput ()
virtual void SetPlaceFactor (float)
virtual float GetPlaceFactor ()
virtual void SetHandleSize (float)
virtual float GetHandleSize ()

Static Public Methods

int IsTypeOf (const char *type)
vtk3DWidget * SafeDownCast (vtkObject *o)

Protected Methods

 vtk3DWidget ()
 ~vtk3DWidget ()
void AdjustBounds (float bounds[6], float newBounds[6], float center[3])
float SizeHandles (float factor)
virtual void SizeHandles ()

Protected Attributes

vtkProp3DProp3D
vtkDataSetInput
float PlaceFactor
int Placed
float InitialBounds [6]
float InitialLength
float HandleSize
int ValidPick
float LastPickPosition [3]


Member Typedef Documentation

typedef vtkInteractorObserver vtk3DWidget::Superclass
 

Reimplemented from vtkInteractorObserver.

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

Definition at line 83 of file vtk3DWidget.h.


Constructor & Destructor Documentation

vtk3DWidget::vtk3DWidget   [protected]
 

vtk3DWidget::~vtk3DWidget   [protected]
 


Member Function Documentation

virtual const char* vtk3DWidget::GetClassName   [virtual]
 

Reimplemented from vtkInteractorObserver.

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

int vtk3DWidget::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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkInteractorObserver.

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

virtual int vtk3DWidget::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 vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkInteractorObserver.

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

vtk3DWidget* vtk3DWidget::SafeDownCast vtkObject   o [static]
 

Reimplemented from vtkInteractorObserver.

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

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

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

virtual void vtk3DWidget::PlaceWidget float    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 vtkBoxWidget, vtkImagePlaneWidget, vtkImplicitPlaneWidget, vtkLineWidget, vtkPlaneWidget, vtkPointWidget, vtkPolyDataSourceWidget, vtkSphereWidget, and vtkSplineWidget.

void vtk3DWidget::PlaceWidget  
 

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 vtkBoxWidget, vtkImagePlaneWidget, vtkImplicitPlaneWidget, vtkLineWidget, vtkPlaneWidget, vtkPointWidget, vtkPolyDataSourceWidget, vtkSphereWidget, and vtkSplineWidget.

void vtk3DWidget::PlaceWidget float    xmin,
float    xmax,
float    ymin,
float    ymax,
float    zmin,
float    zmax
 

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 vtkBoxWidget, vtkImagePlaneWidget, vtkLineWidget, vtkPointWidget, vtkPolyDataSourceWidget, vtkSphereWidget, and vtkSplineWidget.

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::SetInput 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.

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 float    [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 float 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 float    [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 float 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 float    bounds[6],
float    newBounds[6],
float    center[3]
[protected]
 

float vtk3DWidget::SizeHandles float    factor [protected]
 

virtual void vtk3DWidget::SizeHandles   [inline, protected, virtual]
 

Reimplemented in vtkBoxWidget, vtkImplicitPlaneWidget, vtkLineWidget, vtkPlaneWidget, vtkSphereWidget, and vtkSplineWidget.

Definition at line 154 of file vtk3DWidget.h.


Member Data Documentation

vtkProp3D* vtk3DWidget::Prop3D [protected]
 

Definition at line 141 of file vtk3DWidget.h.

vtkDataSet* vtk3DWidget::Input [protected]
 

Definition at line 142 of file vtk3DWidget.h.

float vtk3DWidget::PlaceFactor [protected]
 

Definition at line 145 of file vtk3DWidget.h.

int vtk3DWidget::Placed [protected]
 

Definition at line 146 of file vtk3DWidget.h.

float vtk3DWidget::InitialBounds[6] [protected]
 

Definition at line 150 of file vtk3DWidget.h.

float vtk3DWidget::InitialLength [protected]
 

Definition at line 151 of file vtk3DWidget.h.

float vtk3DWidget::HandleSize [protected]
 

Definition at line 152 of file vtk3DWidget.h.

int vtk3DWidget::ValidPick [protected]
 

Definition at line 157 of file vtk3DWidget.h.

float vtk3DWidget::LastPickPosition[3] [protected]
 

Definition at line 158 of file vtk3DWidget.h.


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