VTK
|
defines a representation for a vtkButtonWidget More...
#include <vtkTexturedButtonRepresentation2D.h>
Public Member Functions | |
vtkBalloonRepresentation * | GetBalloon () |
virtual void | PlaceWidget (double bounds[6]) |
virtual void | PlaceWidget (double anchor[3], int size[2]) |
virtual void | SetProperty (vtkProperty2D *p) |
virtual vtkProperty2D * | GetProperty () |
virtual void | SetHoveringProperty (vtkProperty2D *p) |
virtual vtkProperty2D * | GetHoveringProperty () |
virtual void | SetSelectingProperty (vtkProperty2D *p) |
virtual vtkProperty2D * | GetSelectingProperty () |
void | SetButtonTexture (int i, vtkImageData *image) |
vtkImageData * | GetButtonTexture (int i) |
virtual int | ComputeInteractionState (int X, int Y, int modify=0) |
virtual void | BuildRepresentation () |
virtual void | Highlight (int state) |
virtual void | ShallowCopy (vtkProp *prop) |
virtual double * | GetBounds () |
virtual void | GetActors (vtkPropCollection *pc) |
virtual void | ReleaseGraphicsResources (vtkWindow *) |
virtual int | RenderOverlay (vtkViewport *) |
virtual int | HasTranslucentPolygonalGeometry () |
![]() | |
virtual void | SetNumberOfStates (int) |
virtual int | GetState () |
virtual void | SetState (int state) |
virtual void | NextState () |
virtual void | PreviousState () |
vtkButtonRepresentation * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual int | GetHighlightState () |
![]() | |
virtual void | PickingManagedOn () |
virtual void | PickingManagedOff () |
virtual void | SetPickingManaged (bool) |
virtual bool | GetPickingManaged () |
virtual void | SetRenderer (vtkRenderer *ren) |
virtual vtkRenderer * | GetRenderer () |
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 | 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 void | GetActors2D (vtkPropCollection *) |
virtual void | GetVolumes (vtkPropCollection *) |
virtual int | RenderOverlay (vtkViewport *vtkNotUsed(viewport)) |
virtual int | RenderOpaqueGeometry (vtkViewport *vtkNotUsed(viewport)) |
virtual int | RenderTranslucentPolygonalGeometry (vtkViewport *vtkNotUsed(viewport)) |
virtual int | RenderVolumetricGeometry (vtkViewport *vtkNotUsed(viewport)) |
vtkWidgetRepresentation * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
Static Public Member Functions | |
static vtkTexturedButtonRepresentation2D * | New () |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkButtonRepresentation * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkWidgetRepresentation * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
vtkTexturedButtonRepresentation2D () | |
~vtkTexturedButtonRepresentation2D () | |
void | CreateDefaultProperties () |
![]() | |
vtkButtonRepresentation () | |
~vtkButtonRepresentation () | |
![]() | |
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 | |
vtkBalloonRepresentation * | Balloon |
vtkProperty2D * | Property |
vtkProperty2D * | HoveringProperty |
vtkProperty2D * | SelectingProperty |
vtkTextureArray * | TextureArray |
vtkCoordinate * | Anchor |
![]() | |
int | NumberOfStates |
int | State |
int | HighlightState |
![]() | |
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 vtkButtonRepresentation | Superclass |
static int | IsTypeOf (const char *type) |
static vtkTexturedButtonRepresentation2D * | SafeDownCast (vtkObjectBase *o) |
virtual int | IsA (const char *type) |
vtkTexturedButtonRepresentation2D * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual vtkObjectBase * | NewInstanceInternal () const |
Additional Inherited Members | |
![]() | |
enum | _InteractionState { Outside =0, Inside } |
typedef vtkWidgetRepresentation | Superclass |
enum | _HighlightState { HighlightNormal, HighlightHovering, HighlightSelecting } |
![]() | |
typedef vtkProp | Superclass |
defines a representation for a vtkButtonWidget
This class implements one type of vtkButtonRepresentation. It changes the appearance of a user-provided polydata by assigning textures according to the current button state. It also provides highlighting (when hovering and selecting the button) by fiddling with the actor's property. Since this is a 2D version, the button is rendered in the overlay plane. Typically it is positioned in display coordinates, but it can be anchored to a world position so it will appear to move as the camera moves.
To use this representation, always begin by specifying the number of button states. Then provide a polydata (the polydata should have associated texture coordinates), and a list of textures cooresponding to the button states. Optionally, the HoveringProperty and SelectionProperty can be adjusted to obtain the appropriate appearance.
,SECTION Caveats There are two variants of the PlaceWidget() method. The first PlaceWidget(bds[6]) allows the widget to be placed in the display coordinates fixed to the overlay plane. The second PlaceWidget(anchor[3],size[2]) places the widget in world space; hence it will appear to move as the camera moves around the scene.
Definition at line 61 of file vtkTexturedButtonRepresentation2D.h.
Standard methods for the class.
Definition at line 69 of file vtkTexturedButtonRepresentation2D.h.
|
protected |
|
protected |
|
static |
Instantiate the class.
|
static |
Standard methods for the class.
|
virtual |
Standard methods for the class.
Reimplemented from vtkButtonRepresentation.
|
static |
Standard methods for the class.
|
protectedvirtual |
Standard methods for the class.
Reimplemented from vtkButtonRepresentation.
vtkTexturedButtonRepresentation2D* vtkTexturedButtonRepresentation2D::NewInstance | ( | ) | const |
Standard methods for the class.
void vtkTexturedButtonRepresentation2D::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
Standard methods for the class.
|
virtual |
Specify the property to use when the button is to appear "normal" i.e., the mouse pointer is not hovering or selecting the button.
|
virtual |
Specify the property to use when the button is to appear "normal" i.e., the mouse pointer is not hovering or selecting the button.
|
virtual |
Specify the property to use when the hovering over the button.
|
virtual |
Specify the property to use when the hovering over the button.
|
virtual |
Specify the property to use when selecting the button.
|
virtual |
Specify the property to use when selecting the button.
void vtkTexturedButtonRepresentation2D::SetButtonTexture | ( | int | i, |
vtkImageData * | image | ||
) |
Add the ith texture corresponding to the ith button state. The parameter i should be 0<=i<NumberOfStates.
vtkImageData* vtkTexturedButtonRepresentation2D::GetButtonTexture | ( | int | i | ) |
Add the ith texture corresponding to the ith button state. The parameter i should be 0<=i<NumberOfStates.
|
inline |
Grab the underlying vtkBalloonRepresentation used to position and display the button texture.
Definition at line 101 of file vtkTexturedButtonRepresentation2D.h.
|
virtual |
Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
Reimplemented from vtkWidgetRepresentation.
|
virtual |
Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
Implements vtkWidgetRepresentation.
|
virtual |
Provide the necessary methods to satisfy the vtkWidgetRepresentation API.
Reimplemented from vtkButtonRepresentation.
|
virtual |
Conventional PlaceWidget() method to satisfy the vtkWidgetRepresentation API. In this version, bounds[6] specifies a rectangle in display coordinates in which to place the button. The values for bounds[4] and bounds[5] can be set to zero. Note that PlaceWidget() is typically called at the end of configuring the button representation.
|
virtual |
This alternative PlaceWidget() method can be used to anchor the button to a 3D point. In this case, the button representation will move around the screen as the camera moves around the world space. The first parameter anchor[3] is the world point anchor position (attached to the lower left portion of the button by default); and the size[2] parameter defines a x-y box in display coordinates in which the button will fit. Note that you can grab the vtkBalloonRepresentation and set an offset value if the anchor point is to be elsewhere on the button.
|
virtual |
Provide the necessary methods to satisfy the rendering API.
Reimplemented from vtkButtonRepresentation.
|
virtual |
Provide the necessary methods to satisfy the rendering API.
Reimplemented from vtkWidgetRepresentation.
|
virtual |
Provide the necessary methods to satisfy the rendering API.
Reimplemented from vtkWidgetRepresentation.
|
virtual |
Provide the necessary methods to satisfy the rendering API.
Reimplemented from vtkWidgetRepresentation.
|
virtual |
Provide the necessary methods to satisfy the rendering API.
|
virtual |
Provide the necessary methods to satisfy the rendering API.
Reimplemented from vtkWidgetRepresentation.
|
protected |
|
protected |
Definition at line 145 of file vtkTexturedButtonRepresentation2D.h.
|
protected |
Definition at line 148 of file vtkTexturedButtonRepresentation2D.h.
|
protected |
Definition at line 149 of file vtkTexturedButtonRepresentation2D.h.
|
protected |
Definition at line 150 of file vtkTexturedButtonRepresentation2D.h.
|
protected |
Definition at line 155 of file vtkTexturedButtonRepresentation2D.h.
|
protected |
Definition at line 158 of file vtkTexturedButtonRepresentation2D.h.