VTK
|
3D widget for manipulating a sphere More...
#include <vtkSphereWidget.h>
Public Types | |
typedef vtk3DWidget | Superclass |
Public Types inherited from vtk3DWidget | |
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) |
vtkSphereWidget * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | GetPolyData (vtkPolyData *pd) |
void | GetSphere (vtkSphere *sphere) |
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]) |
virtual vtkProperty * | GetSphereProperty () |
virtual vtkProperty * | GetSelectedSphereProperty () |
virtual vtkProperty * | GetHandleProperty () |
virtual vtkProperty * | GetSelectedHandleProperty () |
Public Member Functions inherited from vtk3DWidget | |
vtk3DWidget * | NewInstance () const |
virtual void | SetProp3D (vtkProp3D *) |
virtual vtkProp3D * | GetProp3D () |
virtual void | SetInputData (vtkDataSet *) |
virtual void | SetInputConnection (vtkAlgorithmOutput *) |
virtual vtkDataSet * | GetInput () |
virtual void | SetPlaceFactor (double) |
virtual double | GetPlaceFactor () |
virtual void | SetHandleSize (double) |
virtual double | GetHandleSize () |
Public Member Functions inherited from vtkInteractorObserver | |
vtkInteractorObserver * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | OnChar () |
int | GetEnabled () |
void | EnabledOn () |
void | EnabledOff () |
void | On () |
void | Off () |
virtual void | SetInteractor (vtkRenderWindowInteractor *iren) |
virtual vtkRenderWindowInteractor * | GetInteractor () |
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 vtkRenderer * | GetDefaultRenderer () |
virtual void | SetDefaultRenderer (vtkRenderer *) |
virtual vtkRenderer * | GetCurrentRenderer () |
virtual void | SetCurrentRenderer (vtkRenderer *) |
void | GrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | ReleaseFocus () |
Public Member Functions inherited from vtkObject | |
vtkObject * | NewInstance () 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) |
vtkCommand * | GetCommand (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 vtkSphereWidget * | New () |
static int | IsTypeOf (const char *type) |
static vtkSphereWidget * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtk3DWidget | |
static int | IsTypeOf (const char *type) |
static vtk3DWidget * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkInteractorObserver | |
static int | IsTypeOf (const char *type) |
static vtkInteractorObserver * | SafeDownCast (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 vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
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 vtkObjectBase * | New () |
Protected Types | |
enum | WidgetState { Start =0, Moving, Scaling, Positioning, Outside } |
Static Protected Member Functions | |
static void | ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata) |
Static Protected Member Functions inherited from vtkInteractorObserver | |
static void | ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata) |
3D widget for manipulating a sphere
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.
Definition at line 87 of file vtkSphereWidget.h.
|
protected |
Enumerator | |
---|---|
Start | |
Moving | |
Scaling | |
Positioning | |
Outside |
Definition at line 232 of file vtkSphereWidget.h.
|
protected |
|
protected |
|
static |
Instantiate the object.
|
static |
|
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 vtk3DWidget.
|
static |
|
protectedvirtual |
Reimplemented from vtk3DWidget.
vtkSphereWidget* vtkSphereWidget::NewInstance | ( | ) | const |
|
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 vtk3DWidget.
|
virtual |
Methods that satisfy the superclass' API.
Reimplemented from vtkInteractorObserver.
|
virtual |
Methods that satisfy the superclass' API.
Implements vtk3DWidget.
|
inlinevirtual |
Methods that satisfy the superclass' API.
Reimplemented from vtk3DWidget.
Definition at line 94 of file vtkSphereWidget.h.
|
inlinevirtual |
Methods that satisfy the superclass' API.
Reimplemented from vtk3DWidget.
Definition at line 96 of file vtkSphereWidget.h.
|
virtual |
Set the representation of the sphere. Different representations are useful depending on the application. The default is VTK_SPHERE_WIREFRAME.
|
virtual |
Set the representation of the sphere. Different representations are useful depending on the application. The default is VTK_SPHERE_WIREFRAME.
|
inline |
Set the representation of the sphere. Different representations are useful depending on the application. The default is VTK_SPHERE_WIREFRAME.
Definition at line 107 of file vtkSphereWidget.h.
|
inline |
Set the representation of the sphere. Different representations are useful depending on the application. The default is VTK_SPHERE_WIREFRAME.
Definition at line 109 of file vtkSphereWidget.h.
|
inline |
Set the representation of the sphere. Different representations are useful depending on the application. The default is VTK_SPHERE_WIREFRAME.
Definition at line 111 of file vtkSphereWidget.h.
|
inline |
Set/Get the resolution of the sphere in the Theta direction. The default is 16.
Definition at line 118 of file vtkSphereWidget.h.
|
inline |
Set/Get the resolution of the sphere in the Theta direction. The default is 16.
Definition at line 120 of file vtkSphereWidget.h.
|
inline |
Set/Get the resolution of the sphere in the Phi direction. The default is 8.
Definition at line 127 of file vtkSphereWidget.h.
|
inline |
Set/Get the resolution of the sphere in the Phi direction. The default is 8.
Definition at line 129 of file vtkSphereWidget.h.
|
inline |
Set/Get the radius of sphere. Default is .5.
Definition at line 135 of file vtkSphereWidget.h.
|
inline |
Set/Get the radius of sphere. Default is .5.
Definition at line 143 of file vtkSphereWidget.h.
Set/Get the center of the sphere.
Definition at line 149 of file vtkSphereWidget.h.
|
inline |
Set/Get the center of the sphere.
Definition at line 153 of file vtkSphereWidget.h.
|
inline |
Set/Get the center of the sphere.
Definition at line 157 of file vtkSphereWidget.h.
|
inline |
Set/Get the center of the sphere.
Definition at line 159 of file vtkSphereWidget.h.
|
virtual |
Enable translation and scaling of the widget. By default, the widget can be translated and rotated.
|
virtual |
Enable translation and scaling of the widget. By default, the widget can be translated and rotated.
|
virtual |
Enable translation and scaling of the widget. By default, the widget can be translated and rotated.
|
virtual |
Enable translation and scaling of the widget. By default, the widget can be translated and rotated.
|
virtual |
Enable translation and scaling of the widget. By default, the widget can be translated and rotated.
|
virtual |
Enable translation and scaling of the widget. By default, the widget can be translated and rotated.
|
virtual |
Enable translation and scaling of the widget. By default, the widget can be translated and rotated.
|
virtual |
Enable translation and scaling of the widget. By default, the widget can be translated and rotated.
|
virtual |
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.
|
virtual |
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.
|
virtual |
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.
|
virtual |
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. The direction of the handle is from the sphere center to the handle position.
|
virtual |
Set/Get the direction vector of the handle relative to the center of the sphere. The direction of the handle is from the sphere center to the handle position.
|
virtual |
Set/Get the direction vector of the handle relative to the center of the sphere. The direction of the handle is from the sphere center to the handle position.
Set/Get the direction vector of the handle relative to the center of the sphere. The direction of the handle is from the sphere center to the handle position.
|
virtual |
Set/Get the direction vector of the handle relative to the center of the sphere. The direction of the handle is from the sphere center to the handle position.
|
virtual |
Get the position of the handle.
Get the position of the handle.
|
virtual |
Get the position of the handle.
void vtkSphereWidget::GetPolyData | ( | vtkPolyData * | pd | ) |
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.
void vtkSphereWidget::GetSphere | ( | vtkSphere * | sphere | ) |
Get the spherical implicit function defined by this widget. Note that vtkSphere is a subclass of vtkImplicitFunction, meaning that it can be used by a variety of filters to perform clipping, cutting, and selection of data.
|
virtual |
Get the sphere properties. The properties of the sphere when selected and unselected can be manipulated.
|
virtual |
Get the sphere properties. The properties of the sphere when selected and unselected can be manipulated.
|
virtual |
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.
|
virtual |
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.
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
Register internal Pickers in the Picking Manager. Must be reimplemented by concrete widgets to register their pickers.
Reimplemented from vtkInteractorObserver.
|
protected |
|
protected |
|
protectedvirtual |
Reimplemented from vtk3DWidget.
|
protected |
Definition at line 231 of file vtkSphereWidget.h.
|
protected |
Definition at line 256 of file vtkSphereWidget.h.
|
protected |
Definition at line 257 of file vtkSphereWidget.h.
|
protected |
Definition at line 258 of file vtkSphereWidget.h.
|
protected |
Definition at line 263 of file vtkSphereWidget.h.
|
protected |
Definition at line 266 of file vtkSphereWidget.h.
|
protected |
Definition at line 272 of file vtkSphereWidget.h.
|
protected |
Definition at line 273 of file vtkSphereWidget.h.
|
protected |
Definition at line 281 of file vtkSphereWidget.h.
|
protected |
Definition at line 282 of file vtkSphereWidget.h.
|
protected |
Definition at line 283 of file vtkSphereWidget.h.
|
protected |
Definition at line 284 of file vtkSphereWidget.h.
|
protected |
Definition at line 288 of file vtkSphereWidget.h.
|
protected |
Definition at line 289 of file vtkSphereWidget.h.
|
protected |
Definition at line 290 of file vtkSphereWidget.h.
|
protected |
Definition at line 292 of file vtkSphereWidget.h.
|
protected |
Definition at line 293 of file vtkSphereWidget.h.
|
protected |
Definition at line 294 of file vtkSphereWidget.h.