VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Protected Member Functions | Protected Attributes | List of all members
vtkWidgetRepresentation Class Referenceabstract

abstract class defines interface between the widget and widget representation classes More...

#include <vtkWidgetRepresentation.h>

Inheritance diagram for vtkWidgetRepresentation:
[legend]

Public Member Functions

virtual void PickingManagedOn ()
 
virtual void PickingManagedOff ()
 
virtual void SetPickingManaged (bool)
 
virtual bool GetPickingManaged ()
 
virtual void SetRenderer (vtkRenderer *ren)
 
virtual vtkRenderer * GetRenderer ()
 
virtual void BuildRepresentation ()=0
 
virtual void PlaceWidget (double *vtkNotUsed(bounds[6]))
 
virtual void StartWidgetInteraction (double eventPos[2])
 
virtual void WidgetInteraction (double newEventPos[2])
 
virtual void EndWidgetInteraction (double newEventPos[2])
 
virtual int ComputeInteractionState (int X, int Y, int modify=0)
 
virtual int GetInteractionState ()
 
virtual void Highlight (int vtkNotUsed(highlightOn))
 
virtual void SetPlaceFactor (double)
 
virtual double GetPlaceFactor ()
 
virtual void SetHandleSize (double)
 
virtual double GetHandleSize ()
 
virtual int GetNeedToRender ()
 
virtual void SetNeedToRender (int)
 
virtual void NeedToRenderOn ()
 
virtual void NeedToRenderOff ()
 
virtual double * GetBounds ()
 
virtual void ShallowCopy (vtkProp *prop)
 
virtual void GetActors (vtkPropCollection *)
 
virtual void GetActors2D (vtkPropCollection *)
 
virtual void GetVolumes (vtkPropCollection *)
 
virtual void ReleaseGraphicsResources (vtkWindow *)
 
virtual int RenderOverlay (vtkViewport *vtkNotUsed(viewport))
 
virtual int RenderOpaqueGeometry (vtkViewport *vtkNotUsed(viewport))
 
virtual int RenderTranslucentPolygonalGeometry (vtkViewport *vtkNotUsed(viewport))
 
virtual int RenderVolumetricGeometry (vtkViewport *vtkNotUsed(viewport))
 
virtual int HasTranslucentPolygonalGeometry ()
 

Protected Member Functions

 vtkWidgetRepresentation ()
 
 ~vtkWidgetRepresentation ()
 
void AdjustBounds (double bounds[6], double newBounds[6], double center[3])
 
virtual void RegisterPickers ()
 
virtual void UnRegisterPickers ()
 
virtual void PickersModified ()
 
vtkPickingManager * GetPickingManager ()
 
double SizeHandlesRelativeToViewport (double factor, double pos[3])
 
double SizeHandlesInPixels (double factor, double pos[3])
 
vtkAssemblyPath * GetAssemblyPath (double X, double Y, double Z, vtkAbstractPropPicker *picker)
 

Protected Attributes

vtkWeakPointer< vtkRenderer > Renderer
 
int InteractionState
 
double StartEventPosition [3]
 
double PlaceFactor
 
int Placed
 
double InitialBounds [6]
 
double InitialLength
 
int ValidPick
 
bool PickingManaged
 
double HandleSize
 
int NeedToRender
 
vtkTimeStamp BuildTime
 
typedef vtkProp Superclass
 
static int IsTypeOf (const char *type)
 
static vtkWidgetRepresentationSafeDownCast (vtkObjectBase *o)
 
virtual int IsA (const char *type)
 
vtkWidgetRepresentationNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual vtkObjectBase * NewInstanceInternal () const
 

Detailed Description

abstract class defines interface between the widget and widget representation classes

This class is used to define the API for, and partially implement, a representation for different types of widgets. Note that the widget representation (i.e., subclasses of vtkWidgetRepresentation) are a type of vtkProp; meaning that they can be associated with a vtkRenderer end embedded in a scene like any other vtkActor. However, vtkWidgetRepresentation also defines an API that enables it to be paired with a subclass vtkAbstractWidget, meaning that it can be driven by a widget, serving to represent the widget as the widget responds to registered events.

The API defined here should be regarded as a guideline for implementing widgets and widget representations. Widget behavior is complex, as is the way the representation responds to the registered widget events, so the API may vary from widget to widget to reflect this complexity.

Warning
The separation of the widget event handling and representation enables users and developers to create new appearances for the widget. It also facilitates parallel processing, where the client application handles events, and remote representations of the widget are slaves to the client (and do not handle events).

Definition at line 53 of file vtkWidgetRepresentation.h.

Member Typedef Documentation

Standard methods for instances of this class.

Definition at line 58 of file vtkWidgetRepresentation.h.

Constructor & Destructor Documentation

vtkWidgetRepresentation::vtkWidgetRepresentation ( )
protected
vtkWidgetRepresentation::~vtkWidgetRepresentation ( )
protected

Member Function Documentation

static int vtkWidgetRepresentation::IsTypeOf ( const char *  type)
static

Standard methods for instances of this class.

virtual int vtkWidgetRepresentation::IsA ( const char *  type)
virtual

Standard methods for instances of this class.

Reimplemented in vtkContourRepresentation, vtkBalloonRepresentation, vtkSphereRepresentation, vtkTexturedButtonRepresentation, vtkImplicitPlaneRepresentation, vtkAffineRepresentation2D, vtkBoxRepresentation, vtkTexturedButtonRepresentation2D, vtkBiDimensionalRepresentation2D, vtkCenteredSliderRepresentation, vtkLineRepresentation, vtkSliderRepresentation2D, vtkBorderRepresentation, vtkConstrainedPointHandleRepresentation, vtkRectilinearWipeRepresentation, vtkCompassRepresentation, vtkHandleRepresentation, vtkSliderRepresentation3D, vtkParallelopipedRepresentation, vtkProp3DButtonRepresentation, vtkAxesTransformRepresentation, vtkCameraRepresentation, vtkDistanceRepresentation3D, vtkAbstractPolygonalHandleRepresentation3D, vtkCaptionRepresentation, vtkResliceCursorLineRepresentation, vtkAngleRepresentation3D, vtkSplineRepresentation, vtkBiDimensionalRepresentation, vtkScalarBarRepresentation, vtkLogoRepresentation, vtkPointHandleRepresentation2D, vtkResliceCursorRepresentation, vtkAngleRepresentation2D, vtkDistanceRepresentation2D, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkCheckerboardRepresentation, vtkFixedSizeHandleRepresentation3D, vtkButtonRepresentation, vtkPlaybackRepresentation, vtkAffineRepresentation, vtkOrientedGlyphContourRepresentation, vtkSphereHandleRepresentation, vtkPointHandleRepresentation3D, vtkOrientedPolygonalHandleRepresentation3D, vtkSliderRepresentation, vtkResliceCursorThickLineRepresentation, vtkSeedRepresentation, vtkTextRepresentation, vtkTensorProbeRepresentation, vtkEllipsoidTensorProbeRepresentation, vtkPolygonalHandleRepresentation3D, vtkFocalPlaneContourRepresentation, vtkAngleRepresentation, vtkXYPlotRepresentation, vtkContinuousValueWidgetRepresentation, and vtkDistanceRepresentation.

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

Standard methods for instances of this class.

virtual vtkObjectBase* vtkWidgetRepresentation::NewInstanceInternal ( ) const
protectedvirtual

Standard methods for instances of this class.

Reimplemented in vtkContourRepresentation, vtkBalloonRepresentation, vtkSphereRepresentation, vtkTexturedButtonRepresentation, vtkImplicitPlaneRepresentation, vtkAffineRepresentation2D, vtkBoxRepresentation, vtkTexturedButtonRepresentation2D, vtkBiDimensionalRepresentation2D, vtkCenteredSliderRepresentation, vtkLineRepresentation, vtkSliderRepresentation2D, vtkBorderRepresentation, vtkConstrainedPointHandleRepresentation, vtkRectilinearWipeRepresentation, vtkCompassRepresentation, vtkHandleRepresentation, vtkSliderRepresentation3D, vtkParallelopipedRepresentation, vtkProp3DButtonRepresentation, vtkAxesTransformRepresentation, vtkCameraRepresentation, vtkDistanceRepresentation3D, vtkAbstractPolygonalHandleRepresentation3D, vtkCaptionRepresentation, vtkResliceCursorLineRepresentation, vtkAngleRepresentation3D, vtkSplineRepresentation, vtkBiDimensionalRepresentation, vtkScalarBarRepresentation, vtkLogoRepresentation, vtkPointHandleRepresentation2D, vtkResliceCursorRepresentation, vtkAngleRepresentation2D, vtkDistanceRepresentation2D, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkCheckerboardRepresentation, vtkFixedSizeHandleRepresentation3D, vtkButtonRepresentation, vtkPlaybackRepresentation, vtkAffineRepresentation, vtkOrientedGlyphContourRepresentation, vtkSphereHandleRepresentation, vtkPointHandleRepresentation3D, vtkOrientedPolygonalHandleRepresentation3D, vtkSliderRepresentation, vtkResliceCursorThickLineRepresentation, vtkSeedRepresentation, vtkTextRepresentation, vtkTensorProbeRepresentation, vtkEllipsoidTensorProbeRepresentation, vtkPolygonalHandleRepresentation3D, vtkFocalPlaneContourRepresentation, vtkAngleRepresentation, vtkXYPlotRepresentation, vtkContinuousValueWidgetRepresentation, and vtkDistanceRepresentation.

vtkWidgetRepresentation* vtkWidgetRepresentation::NewInstance ( ) const

Standard methods for instances of this class.

void vtkWidgetRepresentation::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

Standard methods for instances of this class.

virtual void vtkWidgetRepresentation::PickingManagedOn ( )
virtual

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

virtual void vtkWidgetRepresentation::PickingManagedOff ( )
virtual

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

virtual void vtkWidgetRepresentation::SetPickingManaged ( bool  )
virtual

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

virtual bool vtkWidgetRepresentation::GetPickingManaged ( )
virtual

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

virtual void vtkWidgetRepresentation::SetRenderer ( vtkRenderer *  ren)
virtual

Subclasses of vtkWidgetRepresentation must implement these methods. This is considered the minimum API for a widget representation.

SetRenderer() - the renderer in which the widget is to appear must be
set. BuildRepresentation() - update the geometry of the widget based
on its current state. 

WARNING: The renderer is NOT reference counted by the representation, in order to avoid reference loops. Be sure that the representation lifetime does not extend beyond the renderer lifetime.

Reimplemented in vtkLineRepresentation, vtkConstrainedPointHandleRepresentation, vtkHandleRepresentation, vtkCompassRepresentation, vtkOrientedGlyphFocalPlaneContourRepresentation, and vtkOrientedGlyphContourRepresentation.

virtual vtkRenderer* vtkWidgetRepresentation::GetRenderer ( )
virtual

Subclasses of vtkWidgetRepresentation must implement these methods. This is considered the minimum API for a widget representation.

SetRenderer() - the renderer in which the widget is to appear must be
set. BuildRepresentation() - update the geometry of the widget based
on its current state. 

WARNING: The renderer is NOT reference counted by the representation, in order to avoid reference loops. Be sure that the representation lifetime does not extend beyond the renderer lifetime.

virtual void vtkWidgetRepresentation::BuildRepresentation ( )
pure virtual

Subclasses of vtkWidgetRepresentation must implement these methods. This is considered the minimum API for a widget representation.

SetRenderer() - the renderer in which the widget is to appear must be
set. BuildRepresentation() - update the geometry of the widget based
on its current state. 

WARNING: The renderer is NOT reference counted by the representation, in order to avoid reference loops. Be sure that the representation lifetime does not extend beyond the renderer lifetime.

Implemented in vtkContourRepresentation, vtkSphereRepresentation, vtkImplicitPlaneRepresentation, vtkSplineRepresentation, vtkBalloonRepresentation, vtkConstrainedPointHandleRepresentation, vtkPointHandleRepresentation3D, vtkBorderRepresentation, vtkBoxRepresentation, vtkLineRepresentation, vtkAffineRepresentation2D, vtkParallelopipedRepresentation, vtkDistanceRepresentation, vtkSliderRepresentation3D, vtkTexturedButtonRepresentation, vtkAngleRepresentation, vtkDistanceRepresentation3D, vtkSliderRepresentation2D, vtkAxesTransformRepresentation, vtkSeedRepresentation, vtkCenteredSliderRepresentation, vtkResliceCursorRepresentation, vtkTexturedButtonRepresentation2D, vtkCheckerboardRepresentation, vtkCompassRepresentation, vtkCameraRepresentation, vtkSphereHandleRepresentation, vtkAngleRepresentation3D, vtkRectilinearWipeRepresentation, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkOrientedGlyphContourRepresentation, vtkBiDimensionalRepresentation2D, vtkDistanceRepresentation2D, vtkAbstractPolygonalHandleRepresentation3D, vtkCaptionRepresentation, vtkProp3DButtonRepresentation, vtkAngleRepresentation2D, vtkPointHandleRepresentation2D, vtkFixedSizeHandleRepresentation3D, vtkPlaybackRepresentation, vtkLogoRepresentation, vtkScalarBarRepresentation, vtkTextRepresentation, vtkResliceCursorLineRepresentation, vtkXYPlotRepresentation, vtkTensorProbeRepresentation, vtkContinuousValueWidgetRepresentation, and vtkEllipsoidTensorProbeRepresentation.

virtual void vtkWidgetRepresentation::PlaceWidget ( double *  vtkNotUsedbounds[6])
inlinevirtual

The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.

 PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected. 

Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.

Definition at line 111 of file vtkWidgetRepresentation.h.

virtual void vtkWidgetRepresentation::StartWidgetInteraction ( double  eventPos[2])
inlinevirtual

The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.

 PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected. 

Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.

Reimplemented in vtkContourRepresentation, vtkSphereRepresentation, vtkImplicitPlaneRepresentation, vtkSplineRepresentation, vtkConstrainedPointHandleRepresentation, vtkBalloonRepresentation, vtkPointHandleRepresentation3D, vtkBorderRepresentation, vtkBoxRepresentation, vtkLineRepresentation, vtkDistanceRepresentation, vtkAffineRepresentation2D, vtkSliderRepresentation3D, vtkAngleRepresentation, vtkSliderRepresentation2D, vtkAxesTransformRepresentation, vtkCenteredSliderRepresentation, vtkCompassRepresentation, vtkSphereHandleRepresentation, vtkRectilinearWipeRepresentation, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkOrientedGlyphContourRepresentation, vtkAbstractPolygonalHandleRepresentation3D, vtkPointHandleRepresentation2D, vtkResliceCursorLineRepresentation, and vtkContinuousValueWidgetRepresentation.

Definition at line 112 of file vtkWidgetRepresentation.h.

virtual void vtkWidgetRepresentation::WidgetInteraction ( double  newEventPos[2])
inlinevirtual

The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.

 PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected. 

Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.

Reimplemented in vtkContourRepresentation, vtkSphereRepresentation, vtkImplicitPlaneRepresentation, vtkSplineRepresentation, vtkConstrainedPointHandleRepresentation, vtkPointHandleRepresentation3D, vtkBorderRepresentation, vtkBoxRepresentation, vtkLineRepresentation, vtkDistanceRepresentation, vtkAffineRepresentation2D, vtkSliderRepresentation3D, vtkAngleRepresentation, vtkSliderRepresentation2D, vtkAxesTransformRepresentation, vtkCenteredSliderRepresentation, vtkCompassRepresentation, vtkSphereHandleRepresentation, vtkRectilinearWipeRepresentation, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkBiDimensionalRepresentation2D, vtkOrientedGlyphContourRepresentation, vtkAbstractPolygonalHandleRepresentation3D, vtkPointHandleRepresentation2D, vtkScalarBarRepresentation, vtkResliceCursorLineRepresentation, vtkXYPlotRepresentation, and vtkContinuousValueWidgetRepresentation.

Definition at line 113 of file vtkWidgetRepresentation.h.

virtual void vtkWidgetRepresentation::EndWidgetInteraction ( double  newEventPos[2])
inlinevirtual

The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.

 PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected. 

Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.

Reimplemented in vtkImplicitPlaneRepresentation, vtkSplineRepresentation, vtkBalloonRepresentation, and vtkAffineRepresentation2D.

Definition at line 114 of file vtkWidgetRepresentation.h.

virtual int vtkWidgetRepresentation::ComputeInteractionState ( int  X,
int  Y,
int  modify = 0 
)
virtual

The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.

 PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected. 

Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.

Reimplemented in vtkContourRepresentation, vtkSphereRepresentation, vtkImplicitPlaneRepresentation, vtkSplineRepresentation, vtkBalloonRepresentation, vtkConstrainedPointHandleRepresentation, vtkPointHandleRepresentation3D, vtkBorderRepresentation, vtkBoxRepresentation, vtkLineRepresentation, vtkParallelopipedRepresentation, vtkAffineRepresentation2D, vtkDistanceRepresentation, vtkTexturedButtonRepresentation, vtkAngleRepresentation, vtkAxesTransformRepresentation, vtkCenteredSliderRepresentation, vtkSeedRepresentation, vtkCompassRepresentation, vtkSphereHandleRepresentation, vtkTexturedButtonRepresentation2D, vtkRectilinearWipeRepresentation, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkOrientedGlyphContourRepresentation, vtkAbstractPolygonalHandleRepresentation3D, vtkBiDimensionalRepresentation2D, vtkPointHandleRepresentation2D, vtkProp3DButtonRepresentation, and vtkResliceCursorLineRepresentation.

virtual int vtkWidgetRepresentation::GetInteractionState ( )
inlinevirtual

The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.

 PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected. 

Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.

Definition at line 116 of file vtkWidgetRepresentation.h.

virtual void vtkWidgetRepresentation::Highlight ( int   vtkNotUsedhighlightOn)
inlinevirtual

The following is a suggested API for widget representations. These methods define the communication between the widget and its representation. These methods are only suggestions because widgets take on so many different forms that a universal API is not deemed practical. However, these methods should be implemented when possible to insure that the VTK widget hierarchy remains self-consistent.

 PlaceWidget() - given a bounding box
(xmin,xmax,ymin,ymax,zmin,zmax), place the widget inside of it. The
current orientation of the widget is preserved, only scaling and
translation is performed. StartWidgetInteraction() - generally
corresponds to a initial event (e.g., mouse down) that starts the
interaction process with the widget. WidgetInteraction() - invoked
when an event causes the widget to change appearance.
EndWidgetInteraction() - generally corresponds to a final event
(e.g., mouse up) and completes the interaction sequence.
ComputeInteractionState() - given (X,Y) display coordinates in a
renderer, with a possible flag that modifies the computation, what is
the state of the widget? GetInteractionState() - return the current
state of the widget. Note that the value of "0" typically refers to
"outside". The interaction state is strictly a function of the
representation, and the widget/represent must agree on what they
mean. Highlight() - turn on or off any highlights associated with the
widget. Highlights are generally turned on when the widget is
selected. 

Note that subclasses may ignore some of these methods and implement their own depending on the specifics of the widget.

Definition at line 118 of file vtkWidgetRepresentation.h.

virtual void vtkWidgetRepresentation::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 vtkWidgetRepresentation::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 vtkWidgetRepresentation::SetHandleSize ( double  )
virtual

Set/Get the factor that controls the size of the handles that appear as part of the widget (if any). These handles (like spheres, etc.) are used to manipulate the widget. The HandleSize data member allows you to change the relative size of the handles. Note that while the handle size is typically expressed in pixels, some subclasses may use a relative size with respect to the viewport. (As a corollary, the value of this ivar is often set by subclasses of this class during instance instantiation.)

Reimplemented in vtkPointHandleRepresentation3D, and vtkSphereHandleRepresentation.

virtual double vtkWidgetRepresentation::GetHandleSize ( )
virtual

Set/Get the factor that controls the size of the handles that appear as part of the widget (if any). These handles (like spheres, etc.) are used to manipulate the widget. The HandleSize data member allows you to change the relative size of the handles. Note that while the handle size is typically expressed in pixels, some subclasses may use a relative size with respect to the viewport. (As a corollary, the value of this ivar is often set by subclasses of this class during instance instantiation.)

virtual int vtkWidgetRepresentation::GetNeedToRender ( )
virtual

Some subclasses use this data member to keep track of whether to render or not (i.e., to minimize the total number of renders).

virtual void vtkWidgetRepresentation::SetNeedToRender ( int  )
virtual

Some subclasses use this data member to keep track of whether to render or not (i.e., to minimize the total number of renders).

virtual void vtkWidgetRepresentation::NeedToRenderOn ( )
virtual

Some subclasses use this data member to keep track of whether to render or not (i.e., to minimize the total number of renders).

virtual void vtkWidgetRepresentation::NeedToRenderOff ( )
virtual

Some subclasses use this data member to keep track of whether to render or not (i.e., to minimize the total number of renders).

virtual double* vtkWidgetRepresentation::GetBounds ( )
inlinevirtual

Methods to make this class behave as a vtkProp. They are repeated here (from the vtkProp superclass) as a reminder to the widget implementor. Failure to implement these methods properly may result in the representation not appearing in the scene (i.e., not implementing the Render() methods properly) or leaking graphics resources (i.e., not implementing ReleaseGraphicsResources() properly).

Reimplemented in vtkSphereRepresentation, vtkImplicitPlaneRepresentation, vtkSplineRepresentation, vtkPointHandleRepresentation3D, vtkBoxRepresentation, vtkLineRepresentation, vtkSliderRepresentation3D, vtkTexturedButtonRepresentation, vtkTexturedButtonRepresentation2D, vtkOrientedGlyphContourRepresentation, vtkDistanceRepresentation3D, vtkAxesTransformRepresentation, vtkAbstractPolygonalHandleRepresentation3D, vtkSphereHandleRepresentation, vtkParallelopipedRepresentation, vtkProp3DButtonRepresentation, vtkPointHandleRepresentation2D, and vtkResliceCursorLineRepresentation.

Definition at line 161 of file vtkWidgetRepresentation.h.

virtual void vtkWidgetRepresentation::ShallowCopy ( vtkProp *  prop)
virtual

Methods to make this class behave as a vtkProp. They are repeated here (from the vtkProp superclass) as a reminder to the widget implementor. Failure to implement these methods properly may result in the representation not appearing in the scene (i.e., not implementing the Render() methods properly) or leaking graphics resources (i.e., not implementing ReleaseGraphicsResources() properly).

Reimplemented in vtkConstrainedPointHandleRepresentation, vtkPointHandleRepresentation3D, vtkAffineRepresentation2D, vtkTexturedButtonRepresentation, vtkHandleRepresentation, vtkTexturedButtonRepresentation2D, vtkSphereHandleRepresentation, vtkAbstractPolygonalHandleRepresentation3D, vtkButtonRepresentation, vtkProp3DButtonRepresentation, vtkPointHandleRepresentation2D, and vtkAffineRepresentation.

virtual void vtkWidgetRepresentation::GetActors ( vtkPropCollection *  )
inlinevirtual

Methods to make this class behave as a vtkProp. They are repeated here (from the vtkProp superclass) as a reminder to the widget implementor. Failure to implement these methods properly may result in the representation not appearing in the scene (i.e., not implementing the Render() methods properly) or leaking graphics resources (i.e., not implementing ReleaseGraphicsResources() properly).

Reimplemented in vtkImplicitPlaneRepresentation, vtkConstrainedPointHandleRepresentation, vtkPointHandleRepresentation3D, vtkLineRepresentation, vtkSliderRepresentation3D, vtkTexturedButtonRepresentation, vtkTexturedButtonRepresentation2D, vtkCenteredSliderRepresentation, vtkCompassRepresentation, vtkSphereHandleRepresentation, vtkCheckerboardRepresentation, vtkOrientedGlyphContourRepresentation, vtkAbstractPolygonalHandleRepresentation3D, vtkProp3DButtonRepresentation, vtkTensorProbeRepresentation, vtkParallelopipedRepresentation, and vtkEllipsoidTensorProbeRepresentation.

Definition at line 163 of file vtkWidgetRepresentation.h.

virtual void vtkWidgetRepresentation::GetActors2D ( vtkPropCollection *  )
inlinevirtual

Methods to make this class behave as a vtkProp. They are repeated here (from the vtkProp superclass) as a reminder to the widget implementor. Failure to implement these methods properly may result in the representation not appearing in the scene (i.e., not implementing the Render() methods properly) or leaking graphics resources (i.e., not implementing ReleaseGraphicsResources() properly).

Reimplemented in vtkBorderRepresentation, vtkAffineRepresentation2D, vtkSliderRepresentation2D, vtkRectilinearWipeRepresentation, vtkCameraRepresentation, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkCaptionRepresentation, vtkPointHandleRepresentation2D, vtkPlaybackRepresentation, vtkScalarBarRepresentation, vtkLogoRepresentation, vtkTextRepresentation, and vtkXYPlotRepresentation.

Definition at line 164 of file vtkWidgetRepresentation.h.

virtual void vtkWidgetRepresentation::GetVolumes ( vtkPropCollection *  )
inlinevirtual

Methods to make this class behave as a vtkProp. They are repeated here (from the vtkProp superclass) as a reminder to the widget implementor. Failure to implement these methods properly may result in the representation not appearing in the scene (i.e., not implementing the Render() methods properly) or leaking graphics resources (i.e., not implementing ReleaseGraphicsResources() properly).

Definition at line 165 of file vtkWidgetRepresentation.h.

virtual void vtkWidgetRepresentation::ReleaseGraphicsResources ( vtkWindow *  )
inlinevirtual

Methods to make this class behave as a vtkProp. They are repeated here (from the vtkProp superclass) as a reminder to the widget implementor. Failure to implement these methods properly may result in the representation not appearing in the scene (i.e., not implementing the Render() methods properly) or leaking graphics resources (i.e., not implementing ReleaseGraphicsResources() properly).

Reimplemented in vtkContourRepresentation, vtkSphereRepresentation, vtkImplicitPlaneRepresentation, vtkSplineRepresentation, vtkConstrainedPointHandleRepresentation, vtkPointHandleRepresentation3D, vtkBalloonRepresentation, vtkBorderRepresentation, vtkBoxRepresentation, vtkLineRepresentation, vtkAffineRepresentation2D, vtkSliderRepresentation3D, vtkParallelopipedRepresentation, vtkTexturedButtonRepresentation, vtkTexturedButtonRepresentation2D, vtkSliderRepresentation2D, vtkDistanceRepresentation3D, vtkAxesTransformRepresentation, vtkCenteredSliderRepresentation, vtkRectilinearWipeRepresentation, vtkCompassRepresentation, vtkSphereHandleRepresentation, vtkCameraRepresentation, vtkCheckerboardRepresentation, vtkOrientedGlyphFocalPlaneContourRepresentation, vtkAngleRepresentation3D, vtkBiDimensionalRepresentation2D, vtkOrientedGlyphContourRepresentation, vtkAbstractPolygonalHandleRepresentation3D, vtkProp3DButtonRepresentation, vtkCaptionRepresentation, vtkPointHandleRepresentation2D, vtkDistanceRepresentation2D, vtkAngleRepresentation2D, vtkPlaybackRepresentation, vtkTensorProbeRepresentation, vtkScalarBarRepresentation, vtkLogoRepresentation, vtkTextRepresentation, vtkResliceCursorLineRepresentation, vtkXYPlotRepresentation, and vtkEllipsoidTensorProbeRepresentation.

Definition at line 166 of file vtkWidgetRepresentation.h.

virtual int vtkWidgetRepresentation::RenderOverlay ( vtkViewport *  vtkNotUsedviewport)
inlinevirtual

Methods to make this class behave as a vtkProp. They are repeated here (from the vtkProp superclass) as a reminder to the widget implementor. Failure to implement these methods properly may result in the representation not appearing in the scene (i.e., not implementing the Render() methods properly) or leaking graphics resources (i.e., not implementing ReleaseGraphicsResources() properly).

Definition at line 167 of file vtkWidgetRepresentation.h.

virtual int vtkWidgetRepresentation::RenderOpaqueGeometry ( vtkViewport *  vtkNotUsedviewport)
inlinevirtual

Methods to make this class behave as a vtkProp. They are repeated here (from the vtkProp superclass) as a reminder to the widget implementor. Failure to implement these methods properly may result in the representation not appearing in the scene (i.e., not implementing the Render() methods properly) or leaking graphics resources (i.e., not implementing ReleaseGraphicsResources() properly).

Definition at line 168 of file vtkWidgetRepresentation.h.

virtual int vtkWidgetRepresentation::RenderTranslucentPolygonalGeometry ( vtkViewport *  vtkNotUsedviewport)
inlinevirtual

Methods to make this class behave as a vtkProp. They are repeated here (from the vtkProp superclass) as a reminder to the widget implementor. Failure to implement these methods properly may result in the representation not appearing in the scene (i.e., not implementing the Render() methods properly) or leaking graphics resources (i.e., not implementing ReleaseGraphicsResources() properly).

Definition at line 169 of file vtkWidgetRepresentation.h.

virtual int vtkWidgetRepresentation::RenderVolumetricGeometry ( vtkViewport *  vtkNotUsedviewport)
inlinevirtual

Methods to make this class behave as a vtkProp. They are repeated here (from the vtkProp superclass) as a reminder to the widget implementor. Failure to implement these methods properly may result in the representation not appearing in the scene (i.e., not implementing the Render() methods properly) or leaking graphics resources (i.e., not implementing ReleaseGraphicsResources() properly).

Definition at line 170 of file vtkWidgetRepresentation.h.

virtual int vtkWidgetRepresentation::HasTranslucentPolygonalGeometry ( )
inlinevirtual
void vtkWidgetRepresentation::AdjustBounds ( double  bounds[6],
double  newBounds[6],
double  center[3] 
)
protected
virtual void vtkWidgetRepresentation::RegisterPickers ( )
protectedvirtual
virtual void vtkWidgetRepresentation::UnRegisterPickers ( )
protectedvirtual

Unregister internal pickers from the Picking Manager.

virtual void vtkWidgetRepresentation::PickersModified ( )
protectedvirtual

Update the pickers registered in the Picking Manager when pickers are modified.

vtkPickingManager* vtkWidgetRepresentation::GetPickingManager ( )
protected

Return the picking manager associated on the context on which the widget representation currently belong.

vtkAssemblyPath* vtkWidgetRepresentation::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 registered picker, and return the assembly path.

double vtkWidgetRepresentation::SizeHandlesRelativeToViewport ( double  factor,
double  pos[3] 
)
protected
double vtkWidgetRepresentation::SizeHandlesInPixels ( double  factor,
double  pos[3] 
)
protected

Member Data Documentation

vtkWeakPointer<vtkRenderer> vtkWidgetRepresentation::Renderer
protected

Definition at line 179 of file vtkWidgetRepresentation.h.

int vtkWidgetRepresentation::InteractionState
protected

Definition at line 182 of file vtkWidgetRepresentation.h.

double vtkWidgetRepresentation::StartEventPosition[3]
protected

Definition at line 186 of file vtkWidgetRepresentation.h.

double vtkWidgetRepresentation::PlaceFactor
protected

Definition at line 189 of file vtkWidgetRepresentation.h.

int vtkWidgetRepresentation::Placed
protected

Definition at line 190 of file vtkWidgetRepresentation.h.

double vtkWidgetRepresentation::InitialBounds[6]
protected

Definition at line 192 of file vtkWidgetRepresentation.h.

double vtkWidgetRepresentation::InitialLength
protected

Definition at line 193 of file vtkWidgetRepresentation.h.

int vtkWidgetRepresentation::ValidPick
protected

Definition at line 200 of file vtkWidgetRepresentation.h.

bool vtkWidgetRepresentation::PickingManaged
protected

Definition at line 204 of file vtkWidgetRepresentation.h.

double vtkWidgetRepresentation::HandleSize
protected

Definition at line 234 of file vtkWidgetRepresentation.h.

int vtkWidgetRepresentation::NeedToRender
protected

Definition at line 239 of file vtkWidgetRepresentation.h.

vtkTimeStamp vtkWidgetRepresentation::BuildTime
protected

Definition at line 243 of file vtkWidgetRepresentation.h.


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