#include <vtkSphereWidget.h>
Inheritance diagram for vtkSphereWidget:
This 3D widget defines a sphere that can be interactively placed in a scene.
To use this object, just invoke SetInteractor() with the argument of the method a vtkRenderWindowInteractor. You may also wish to invoke "PlaceWidget()" to initially position the widget. The interactor will act normally until the "i" key (for "interactor") is pressed, at which point the vtkSphereWidget will appear. (See superclass documentation for information about changing this behavior.) Events that occur outside of the widget (i.e., no part of the widget is picked) are propagated to any other registered obsevers (such as the interaction style). Turn off the widget by pressing the "i" key again (or invoke the Off() method).
The vtkSphereWidget has several methods that can be used in conjunction with other VTK objects. The Set/GetThetaResolution() and Set/GetPhiResolution() methods control the number of subdivisions of the sphere in the theta and phi directions; the GetPolyData() method can be used to get the polygonal representation and can be used for things like seeding streamlines. The GetSphere() method returns a sphere implicit function that can be used for cutting and clipping. Typical usage of the widget is to make use of the StartInteractionEvent, InteractionEvent, and EndInteractionEvent events. The InteractionEvent is called on mouse motion; the other two events are called on button down and button up (any mouse button).
Some additional features of this class include the ability to control the properties of the widget. You can set the properties of the selected and unselected representations of the sphere.
Definition at line 81 of file vtkSphereWidget.h.
Public Types | |
typedef vtk3DWidget | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | GetPolyData (vtkPolyData *pd) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | SetEnabled (int) |
virtual void | PlaceWidget (double bounds[6]) |
void | PlaceWidget () |
void | PlaceWidget (double xmin, double xmax, double ymin, double ymax, double zmin, double zmax) |
virtual void | SetRepresentation (int) |
virtual int | GetRepresentation () |
void | SetRepresentationToOff () |
void | SetRepresentationToWireframe () |
void | SetRepresentationToSurface () |
void | SetThetaResolution (int r) |
int | GetThetaResolution () |
void | SetPhiResolution (int r) |
int | GetPhiResolution () |
void | SetRadius (double r) |
double | GetRadius () |
void | SetCenter (double x, double y, double z) |
void | SetCenter (double x[3]) |
double * | GetCenter () |
void | GetCenter (double xyz[3]) |
virtual void | SetTranslation (int) |
virtual int | GetTranslation () |
virtual void | TranslationOn () |
virtual void | TranslationOff () |
virtual void | SetScale (int) |
virtual int | GetScale () |
virtual void | ScaleOn () |
virtual void | ScaleOff () |
virtual void | SetHandleVisibility (int) |
virtual int | GetHandleVisibility () |
virtual void | HandleVisibilityOn () |
virtual void | HandleVisibilityOff () |
virtual void | SetHandleDirection (double, double, double) |
virtual void | SetHandleDirection (double[3]) |
virtual double * | GetHandleDirection () |
virtual void | GetHandleDirection (double &, double &, double &) |
virtual void | GetHandleDirection (double[3]) |
virtual double * | GetHandlePosition () |
virtual void | GetHandlePosition (double &, double &, double &) |
virtual void | GetHandlePosition (double[3]) |
void | GetSphere (vtkSphere *sphere) |
virtual vtkProperty * | GetSphereProperty () |
virtual vtkProperty * | GetSelectedSphereProperty () |
virtual vtkProperty * | GetHandleProperty () |
virtual vtkProperty * | GetSelectedHandleProperty () |
Static Public Member Functions | |
static vtkSphereWidget * | New () |
static int | IsTypeOf (const char *type) |
static vtkSphereWidget * | SafeDownCast (vtkObject *o) |
Protected Types | |
enum | WidgetState { Start = 0, Moving, Scaling, Positioning, Outside } |
Protected Member Functions | |
vtkSphereWidget () | |
~vtkSphereWidget () | |
void | OnLeftButtonDown () |
void | OnLeftButtonUp () |
void | OnRightButtonDown () |
void | OnRightButtonUp () |
void | OnMouseMove () |
void | HighlightSphere (int highlight) |
void | SelectRepresentation () |
void | Translate (double *p1, double *p2) |
void | ScaleSphere (double *p1, double *p2, int X, int Y) |
void | MoveHandle (double *p1, double *p2, int X, int Y) |
void | PlaceHandle (double *center, double radius) |
void | CreateDefaultProperties () |
void | HighlightHandle (int) |
virtual void | SizeHandles () |
Static Protected Member Functions | |
static void | ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata) |
Protected Attributes | |
int | State |
vtkActor * | SphereActor |
vtkPolyDataMapper * | SphereMapper |
vtkSphereSource * | SphereSource |
int | Representation |
vtkCellPicker * | Picker |
int | Translation |
int | Scale |
vtkProperty * | SphereProperty |
vtkProperty * | SelectedSphereProperty |
vtkProperty * | HandleProperty |
vtkProperty * | SelectedHandleProperty |
vtkActor * | HandleActor |
vtkPolyDataMapper * | HandleMapper |
vtkSphereSource * | HandleSource |
int | HandleVisibility |
double | HandleDirection [3] |
double | HandlePosition [3] |
|
Reimplemented from vtk3DWidget. Definition at line 87 of file vtkSphereWidget.h. |
|
Definition at line 228 of file vtkSphereWidget.h. |
|
|
|
|
|
Instantiate the object. Reimplemented from vtkObject. |
|
Reimplemented from vtk3DWidget. |
|
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 vtk3DWidget. |
|
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 vtk3DWidget. |
|
Reimplemented from vtk3DWidget. |
|
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 vtk3DWidget. |
|
Methods that satisfy the superclass' API. Reimplemented from vtkInteractorObserver. |
|
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. Implements vtk3DWidget. |
|
Reimplemented from vtk3DWidget. Definition at line 94 of file vtkSphereWidget.h. |
|
Reimplemented from vtk3DWidget. Definition at line 96 of file vtkSphereWidget.h. |
|
Set the representation of the sphere. Different representations are useful depending on the application. |
|
Set the representation of the sphere. Different representations are useful depending on the application. |
|
Set the representation of the sphere. Different representations are useful depending on the application. Definition at line 106 of file vtkSphereWidget.h. References VTK_SPHERE_OFF. |
|
Set the representation of the sphere. Different representations are useful depending on the application. Definition at line 108 of file vtkSphereWidget.h. References VTK_SPHERE_WIREFRAME. |
|
Set the representation of the sphere. Different representations are useful depending on the application. Definition at line 110 of file vtkSphereWidget.h. References VTK_SPHERE_SURFACE. |
|
Set/Get the resolution of the sphere in the Theta direction. Definition at line 116 of file vtkSphereWidget.h. |
|
Set/Get the resolution of the sphere in the Theta direction. Definition at line 118 of file vtkSphereWidget.h. |
|
Set/Get the resolution of the sphere in the Phi direction. Definition at line 124 of file vtkSphereWidget.h. |
|
Set/Get the resolution of the sphere in the Phi direction. Definition at line 126 of file vtkSphereWidget.h. |
|
Set/Get the radius of sphere. Default is .5. Definition at line 132 of file vtkSphereWidget.h. |
|
Set/Get the radius of sphere. Default is .5. Definition at line 140 of file vtkSphereWidget.h. |
|
Set/Get the center of the sphere. Definition at line 146 of file vtkSphereWidget.h. |
|
Set/Get the center of the sphere. Definition at line 150 of file vtkSphereWidget.h. |
|
Set/Get the center of the sphere. Definition at line 154 of file vtkSphereWidget.h. |
|
Set/Get the center of the sphere. Definition at line 156 of file vtkSphereWidget.h. |
|
Enable translation and scaling of the widget. By default, the widget can be translated and rotated. |
|
Enable translation and scaling of the widget. By default, the widget can be translated and rotated. |
|
Enable translation and scaling of the widget. By default, the widget can be translated and rotated. |
|
Enable translation and scaling of the widget. By default, the widget can be translated and rotated. |
|
Enable translation and scaling of the widget. By default, the widget can be translated and rotated. |
|
Enable translation and scaling of the widget. By default, the widget can be translated and rotated. |
|
Enable translation and scaling of the widget. By default, the widget can be translated and rotated. |
|
Enable translation and scaling of the widget. By default, the widget can be translated and rotated. |
|
The handle sits on the surface of the sphere and may be moved around the surface by picking (left mouse) and then moving. The position of the handle can be retrieved, this is useful for positioning cameras and lights. By default, the handle is turned off. |
|
The handle sits on the surface of the sphere and may be moved around the surface by picking (left mouse) and then moving. The position of the handle can be retrieved, this is useful for positioning cameras and lights. By default, the handle is turned off. |
|
The handle sits on the surface of the sphere and may be moved around the surface by picking (left mouse) and then moving. The position of the handle can be retrieved, this is useful for positioning cameras and lights. By default, the handle is turned off. |
|
The handle sits on the surface of the sphere and may be moved around the surface by picking (left mouse) and then moving. The position of the handle can be retrieved, this is useful for positioning cameras and lights. By default, the handle is turned off. |
|
Set/Get the direction vector of the handle relative to the center of the sphere. |
|
Set/Get the direction vector of the handle relative to the center of the sphere. |
|
Set/Get the direction vector of the handle relative to the center of the sphere. |
|
Set/Get the direction vector of the handle relative to the center of the sphere. |
|
Set/Get the direction vector of the handle relative to the center of the sphere. |
|
Get the position of the handle. |
|
Get the position of the handle. |
|
Get the position of the handle. |
|
Grab the polydata (including points) that defines the sphere. The polydata consists of n+1 points, where n is the resolution of the sphere. These point values are guaranteed to be up-to-date when either the InteractionEvent or EndInteraction events are invoked. The user provides the vtkPolyData and the points and polysphere are added to it. |
|
Get the spherical implicit function defined by this widget. Note that vtkPlanes is a subclass of vtkImplicitFunction, meaning that it can be used by a variety of filters to perform clipping, cutting, and selection of data. |
|
Get the sphere properties. The properties of the sphere when selected and unselected can be manipulated. |
|
Get the spherical implicit function defined by this widget. Note that vtkPlanes is a subclass of vtkImplicitFunction, meaning that it can be used by a variety of filters to perform clipping, cutting, and selection of data. |
|
Get the handle properties (the little ball on the sphere is the handle). The properties of the handle when selected and unselected can be manipulated. |
|
Get the handle properties (the little ball on the sphere is the handle). The properties of the handle when selected and unselected can be manipulated. |
|
Handles the char widget activation event. Also handles the delete event. Reimplemented from vtkInteractorObserver. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from vtk3DWidget. |
|
Definition at line 227 of file vtkSphereWidget.h. |
|
Definition at line 252 of file vtkSphereWidget.h. |
|
Definition at line 253 of file vtkSphereWidget.h. |
|
Definition at line 254 of file vtkSphereWidget.h. |
|
Definition at line 259 of file vtkSphereWidget.h. |
|
Definition at line 262 of file vtkSphereWidget.h. |
|
Definition at line 265 of file vtkSphereWidget.h. |
|
Definition at line 266 of file vtkSphereWidget.h. |
|
Definition at line 274 of file vtkSphereWidget.h. |
|
Definition at line 275 of file vtkSphereWidget.h. |
|
Definition at line 276 of file vtkSphereWidget.h. |
|
Definition at line 277 of file vtkSphereWidget.h. |
|
Definition at line 281 of file vtkSphereWidget.h. |
|
Definition at line 282 of file vtkSphereWidget.h. |
|
Definition at line 283 of file vtkSphereWidget.h. |
|
Definition at line 285 of file vtkSphereWidget.h. |
|
Definition at line 286 of file vtkSphereWidget.h. |
|
Definition at line 287 of file vtkSphereWidget.h. |