VTK
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkTexturedButtonRepresentation Class Reference

defines a representation for a vtkButtonWidget More...

#include <vtkTexturedButtonRepresentation.h>

Inheritance diagram for vtkTexturedButtonRepresentation:
[legend]
Collaboration diagram for vtkTexturedButtonRepresentation:
[legend]

List of all members.

- Public Types inherited from vtkButtonRepresentation
enum  _InteractionState { Outside = 0, Inside }
enum  _HighlightState { HighlightNormal, HighlightHovering, HighlightSelecting }
- Public Types inherited from vtkProp
- Public Types inherited from vtkObject

Public Member Functions

virtual void PlaceWidget (double scale, double point[3], double normal[3])
void SetButtonGeometry (vtkPolyData *pd)
void SetButtonGeometryConnection (vtkAlgorithmOutput *algOutput)
vtkPolyDataGetButtonGeometry ()
virtual void SetFollowCamera (int)
virtual int GetFollowCamera ()
virtual void FollowCameraOn ()
virtual void FollowCameraOff ()
virtual void SetProperty (vtkProperty *p)
virtual vtkPropertyGetProperty ()
virtual void SetHoveringProperty (vtkProperty *p)
virtual vtkPropertyGetHoveringProperty ()
virtual void SetSelectingProperty (vtkProperty *p)
virtual vtkPropertyGetSelectingProperty ()
void SetButtonTexture (int i, vtkImageData *image)
vtkImageDataGetButtonTexture (int i)
virtual int ComputeInteractionState (int X, int Y, int modify=0)
virtual void PlaceWidget (double bounds[6])
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 RenderOpaqueGeometry (vtkViewport *)
virtual int RenderTranslucentPolygonalGeometry (vtkViewport *)
virtual int HasTranslucentPolygonalGeometry ()
- Public Member Functions inherited from vtkButtonRepresentation
virtual void SetNumberOfStates (int)
virtual int GetState ()
virtual void SetState (int state)
virtual void NextState ()
virtual void PreviousState ()
virtual int GetHighlightState ()
- Public Member Functions inherited from vtkWidgetRepresentation
virtual void SetRenderer (vtkRenderer *ren)
virtual vtkRendererGetRenderer ()
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))
- Public Member Functions inherited from vtkProp
virtual void Pick ()
virtual unsigned long GetRedrawMTime ()
virtual bool HasKeys (vtkInformation *requiredKeys)
virtual void BuildPaths (vtkAssemblyPaths *paths, vtkAssemblyPath *path)
virtual void SetVisibility (int)
virtual int GetVisibility ()
virtual void VisibilityOn ()
virtual void VisibilityOff ()
virtual void SetPickable (int)
virtual int GetPickable ()
virtual void PickableOn ()
virtual void PickableOff ()
virtual void SetDragable (int)
virtual int GetDragable ()
virtual void DragableOn ()
virtual void DragableOff ()
virtual void SetUseBounds (bool)
virtual bool GetUseBounds ()
virtual void UseBoundsOn ()
virtual void UseBoundsOff ()
virtual void InitPathTraversal ()
virtual vtkAssemblyPathGetNextPath ()
virtual int GetNumberOfPaths ()
virtual void PokeMatrix (vtkMatrix4x4 *vtkNotUsed(matrix))
virtual vtkMatrix4x4GetMatrix ()
virtual vtkInformationGetPropertyKeys ()
virtual void SetPropertyKeys (vtkInformation *keys)
virtual int RenderVolumetricGeometry (vtkViewport *)
virtual int RenderOverlay (vtkViewport *)
virtual bool RenderFilteredOpaqueGeometry (vtkViewport *v, vtkInformation *requiredKeys)
virtual bool RenderFilteredTranslucentPolygonalGeometry (vtkViewport *v, vtkInformation *requiredKeys)
virtual bool RenderFilteredVolumetricGeometry (vtkViewport *v, vtkInformation *requiredKeys)
virtual bool RenderFilteredOverlay (vtkViewport *v, vtkInformation *requiredKeys)
virtual double GetEstimatedRenderTime (vtkViewport *)
virtual double GetEstimatedRenderTime ()
virtual void SetEstimatedRenderTime (double t)
virtual void RestoreEstimatedRenderTime ()
virtual void AddEstimatedRenderTime (double t, vtkViewport *vtkNotUsed(vp))
virtual void SetAllocatedRenderTime (double t, vtkViewport *vtkNotUsed(v))
virtual double GetAllocatedRenderTime ()
void SetRenderTimeMultiplier (double t)
virtual double GetRenderTimeMultiplier ()
virtual bool GetSupportsSelection ()
virtual int GetNumberOfConsumers ()
void AddConsumer (vtkObject *c)
void RemoveConsumer (vtkObject *c)
vtkObjectGetConsumer (int i)
int IsConsumer (vtkObject *c)
- Public Member Functions inherited from vtkObject
virtual void DebugOn ()
virtual void DebugOff ()
unsigned char GetDebug ()
void SetDebug (unsigned char 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)
vtkCommandGetCommand (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)
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 &os)
virtual void PrintHeader (ostream &os, vtkIndent indent)
virtual void PrintTrailer (ostream &os, vtkIndent indent)
int GetReferenceCount ()

Static Public Member Functions

static
vtkTexturedButtonRepresentation
New ()

Protected Member Functions

 vtkTexturedButtonRepresentation ()
 ~vtkTexturedButtonRepresentation ()
void CreateDefaultProperties ()
- Protected Member Functions inherited from vtkButtonRepresentation
 vtkButtonRepresentation ()
 ~vtkButtonRepresentation ()
- Protected Member Functions inherited from vtkWidgetRepresentation
 vtkWidgetRepresentation ()
 ~vtkWidgetRepresentation ()
void AdjustBounds (double bounds[6], double newBounds[6], double center[3])
double SizeHandlesRelativeToViewport (double factor, double pos[3])
double SizeHandlesInPixels (double factor, double pos[3])
- Protected Member Functions inherited from vtkProp
 vtkProp ()
 ~vtkProp ()
- Protected Member Functions inherited from vtkObject
 vtkObject ()
virtual ~vtkObject ()
virtual void RegisterInternal (vtkObjectBase *, int check)
virtual void UnRegisterInternal (vtkObjectBase *, int check)
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
void InternalReleaseFocus ()
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
virtual ~vtkObjectBase ()
virtual void CollectRevisions (ostream &os)
virtual void ReportReferences (vtkGarbageCollector *)
 vtkObjectBase (const vtkObjectBase &)
void operator= (const vtkObjectBase &)

Protected Attributes

vtkActorActor
vtkFollowerFollower
vtkPolyDataMapperMapper
vtkTextureTexture
int FollowCamera
vtkPropertyProperty
vtkPropertyHoveringProperty
vtkPropertySelectingProperty
vtkTextureArray * TextureArray
vtkCellPickerPicker
- Protected Attributes inherited from vtkButtonRepresentation
int NumberOfStates
int State
int HighlightState
- Protected Attributes inherited from vtkWidgetRepresentation
vtkRendererRenderer
int InteractionState
double StartEventPosition [3]
double PlaceFactor
int Placed
double InitialBounds [6]
double InitialLength
int ValidPick
double HandleSize
int NeedToRender
vtkTimeStamp BuildTime
- Protected Attributes inherited from vtkProp
int Visibility
int Pickable
int Dragable
bool UseBounds
double AllocatedRenderTime
double EstimatedRenderTime
double SavedEstimatedRenderTime
double RenderTimeMultiplier
int NumberOfConsumers
vtkObject ** Consumers
vtkAssemblyPathsPaths
vtkInformationPropertyKeys
- Protected Attributes inherited from vtkObject
unsigned char Debug
vtkTimeStamp MTime
vtkSubjectHelper * SubjectHelper
- Protected Attributes inherited from vtkObjectBase
int ReferenceCount
vtkWeakPointerBase ** WeakPointers
typedef vtkButtonRepresentation Superclass
static int IsTypeOf (const char *type)
static
vtkTexturedButtonRepresentation
SafeDownCast (vtkObject *o)
virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)

Additional Inherited Members


Detailed Description

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.

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.

This widget representation has two placement methods. The conventional PlaceWidget() method is used to locate the textured button inside of a user-specified bounding box (note that the button geometry is uniformly scaled to fit, thus two of the three dimensions can be "large" and the third used to perform the scaling). However this PlaceWidget() method will align the geometry within x-y-z oriented bounds. To further control the placement, use the additional PlaceWidget(scale,point,normal) method. This scales the geometry, places its center at the specified point position, and orients the geometry's z-direction parallel to the specified normal. This can be used to attach "sticky notes" or "sticky buttons" to the surface of objects.

See also:
vtkButtonWidget vtkButtonRepresentation vtkButtonSource vtkEllipticalButtonSource vtkRectangularButtonSource
Tests:
vtkTexturedButtonRepresentation (Tests)

Definition at line 65 of file vtkTexturedButtonRepresentation.h.


Member Typedef Documentation

Standard methods for instances of the class.

Reimplemented from vtkButtonRepresentation.

Definition at line 73 of file vtkTexturedButtonRepresentation.h.


Constructor & Destructor Documentation

vtkTexturedButtonRepresentation::vtkTexturedButtonRepresentation ( )
protected
vtkTexturedButtonRepresentation::~vtkTexturedButtonRepresentation ( )
protected

Member Function Documentation

static vtkTexturedButtonRepresentation* vtkTexturedButtonRepresentation::New ( )
static

Instantiate the class.

Reimplemented from vtkObject.

virtual const char* vtkTexturedButtonRepresentation::GetClassName ( )
virtual

Standard methods for instances of the class.

Reimplemented from vtkButtonRepresentation.

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

Standard methods for instances of the class.

Reimplemented from vtkButtonRepresentation.

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

Standard methods for instances of the class.

Reimplemented from vtkButtonRepresentation.

static vtkTexturedButtonRepresentation* vtkTexturedButtonRepresentation::SafeDownCast ( vtkObject o)
static

Standard methods for instances of the class.

Reimplemented from vtkButtonRepresentation.

void vtkTexturedButtonRepresentation::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Standard methods for instances of the class.

Reimplemented from vtkButtonRepresentation.

void vtkTexturedButtonRepresentation::SetButtonGeometry ( vtkPolyData pd)

Set/Get the polydata which defines the button geometry.

void vtkTexturedButtonRepresentation::SetButtonGeometryConnection ( vtkAlgorithmOutput algOutput)

Set/Get the polydata which defines the button geometry.

vtkPolyData* vtkTexturedButtonRepresentation::GetButtonGeometry ( )

Set/Get the polydata which defines the button geometry.

virtual void vtkTexturedButtonRepresentation::SetFollowCamera ( int  )
virtual

Specify whether the button should always face the camera. If enabled, the button rotates as the camera moves.

virtual int vtkTexturedButtonRepresentation::GetFollowCamera ( )
virtual

Specify whether the button should always face the camera. If enabled, the button rotates as the camera moves.

virtual void vtkTexturedButtonRepresentation::FollowCameraOn ( )
virtual

Specify whether the button should always face the camera. If enabled, the button rotates as the camera moves.

virtual void vtkTexturedButtonRepresentation::FollowCameraOff ( )
virtual

Specify whether the button should always face the camera. If enabled, the button rotates as the camera moves.

virtual void vtkTexturedButtonRepresentation::SetProperty ( vtkProperty p)
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 vtkProperty* vtkTexturedButtonRepresentation::GetProperty ( )
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 void vtkTexturedButtonRepresentation::SetHoveringProperty ( vtkProperty p)
virtual

Specify the property to use when the hovering over the button.

virtual vtkProperty* vtkTexturedButtonRepresentation::GetHoveringProperty ( )
virtual

Specify the property to use when the hovering over the button.

virtual void vtkTexturedButtonRepresentation::SetSelectingProperty ( vtkProperty p)
virtual

Specify the property to use when selecting the button.

virtual vtkProperty* vtkTexturedButtonRepresentation::GetSelectingProperty ( )
virtual

Specify the property to use when selecting the button.

void vtkTexturedButtonRepresentation::SetButtonTexture ( int  i,
vtkImageData image 
)

Add the ith texture corresponding to the ith button state. The parameter i should be (0 <= i < NumberOfStates).

vtkImageData* vtkTexturedButtonRepresentation::GetButtonTexture ( int  i)

Add the ith texture corresponding to the ith button state. The parameter i should be (0 <= i < NumberOfStates).

virtual void vtkTexturedButtonRepresentation::PlaceWidget ( double  scale,
double  point[3],
double  normal[3] 
)
virtual

Alternative method for placing a button at a given position (defined by point[3]); at a given orientation (normal[3], where the z-axis of the button geometry is parallel to the normal); and scaled by the scale parameter. This method can bs used to attach "sticky notes" or "sticky buttons" to objects. A great way to attach interactive meta-data to 3D actors.

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

Provide the necessary methods to satisfy the vtkWidgetRepresentation API.

Reimplemented from vtkWidgetRepresentation.

virtual void vtkTexturedButtonRepresentation::PlaceWidget ( double  bounds[6])
virtual

Provide the necessary methods to satisfy the vtkWidgetRepresentation API.

virtual void vtkTexturedButtonRepresentation::BuildRepresentation ( )
virtual

Provide the necessary methods to satisfy the vtkWidgetRepresentation API.

Implements vtkWidgetRepresentation.

virtual void vtkTexturedButtonRepresentation::Highlight ( int  state)
virtual

Provide the necessary methods to satisfy the vtkWidgetRepresentation API.

Reimplemented from vtkButtonRepresentation.

virtual void vtkTexturedButtonRepresentation::ShallowCopy ( vtkProp prop)
virtual

Provide the necessary methods to satisfy the rendering API.

Reimplemented from vtkButtonRepresentation.

virtual double* vtkTexturedButtonRepresentation::GetBounds ( )
virtual

Provide the necessary methods to satisfy the rendering API.

Reimplemented from vtkWidgetRepresentation.

virtual void vtkTexturedButtonRepresentation::GetActors ( vtkPropCollection pc)
virtual

Provide the necessary methods to satisfy the rendering API.

Reimplemented from vtkWidgetRepresentation.

virtual void vtkTexturedButtonRepresentation::ReleaseGraphicsResources ( vtkWindow )
virtual

Provide the necessary methods to satisfy the rendering API.

Reimplemented from vtkWidgetRepresentation.

virtual int vtkTexturedButtonRepresentation::RenderOpaqueGeometry ( vtkViewport )
virtual

Provide the necessary methods to satisfy the rendering API.

Reimplemented from vtkProp.

virtual int vtkTexturedButtonRepresentation::RenderTranslucentPolygonalGeometry ( vtkViewport )
virtual

Provide the necessary methods to satisfy the rendering API.

Reimplemented from vtkProp.

virtual int vtkTexturedButtonRepresentation::HasTranslucentPolygonalGeometry ( )
virtual

Provide the necessary methods to satisfy the rendering API.

Reimplemented from vtkWidgetRepresentation.

void vtkTexturedButtonRepresentation::CreateDefaultProperties ( )
protected

Member Data Documentation

vtkActor* vtkTexturedButtonRepresentation::Actor
protected

Definition at line 151 of file vtkTexturedButtonRepresentation.h.

vtkFollower* vtkTexturedButtonRepresentation::Follower
protected

Definition at line 152 of file vtkTexturedButtonRepresentation.h.

vtkPolyDataMapper* vtkTexturedButtonRepresentation::Mapper
protected

Definition at line 153 of file vtkTexturedButtonRepresentation.h.

vtkTexture* vtkTexturedButtonRepresentation::Texture
protected

Definition at line 154 of file vtkTexturedButtonRepresentation.h.

int vtkTexturedButtonRepresentation::FollowCamera
protected

Definition at line 157 of file vtkTexturedButtonRepresentation.h.

vtkProperty* vtkTexturedButtonRepresentation::Property
protected

Definition at line 160 of file vtkTexturedButtonRepresentation.h.

vtkProperty* vtkTexturedButtonRepresentation::HoveringProperty
protected

Definition at line 161 of file vtkTexturedButtonRepresentation.h.

vtkProperty* vtkTexturedButtonRepresentation::SelectingProperty
protected

Definition at line 162 of file vtkTexturedButtonRepresentation.h.

vtkTextureArray* vtkTexturedButtonRepresentation::TextureArray
protected

Definition at line 167 of file vtkTexturedButtonRepresentation.h.

vtkCellPicker* vtkTexturedButtonRepresentation::Picker
protected

Definition at line 170 of file vtkTexturedButtonRepresentation.h.


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