VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkProp3DButtonRepresentation Class Reference

defines a representation for a vtkButtonWidget More...

#include <vtkProp3DButtonRepresentation.h>

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

Public Types

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

Public Member Functions

virtual int IsA (const char *type)
 
vtkProp3DButtonRepresentationNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void SetButtonProp (int i, vtkProp3D *prop)
 
vtkProp3DGetButtonProp (int i)
 
virtual void SetFollowCamera (int)
 
virtual int GetFollowCamera ()
 
virtual void FollowCameraOn ()
 
virtual void FollowCameraOff ()
 
virtual void SetState (int state)
 
virtual int ComputeInteractionState (int X, int Y, int modify=0)
 
virtual void BuildRepresentation ()
 
virtual void PlaceWidget (double bounds[6])
 
virtual void ShallowCopy (vtkProp *prop)
 
virtual doubleGetBounds ()
 
virtual void GetActors (vtkPropCollection *pc)
 
virtual void ReleaseGraphicsResources (vtkWindow *)
 
virtual int RenderOpaqueGeometry (vtkViewport *)
 
virtual int RenderVolumetricGeometry (vtkViewport *)
 
virtual int RenderTranslucentPolygonalGeometry (vtkViewport *)
 
virtual int HasTranslucentPolygonalGeometry ()
 
- Public Member Functions inherited from vtkButtonRepresentation
vtkButtonRepresentationNewInstance () const
 
virtual void SetNumberOfStates (int)
 
virtual int GetState ()
 
virtual void NextState ()
 
virtual void PreviousState ()
 
virtual void Highlight (int)
 
virtual int GetHighlightState ()
 
- Public Member Functions inherited from vtkWidgetRepresentation
vtkWidgetRepresentationNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void PickingManagedOn ()
 
virtual void PickingManagedOff ()
 
virtual void SetPickingManaged (bool)
 
virtual bool GetPickingManaged ()
 
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
vtkPropNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
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 Pick ()
 
virtual void SetDragable (int)
 
virtual int GetDragable ()
 
virtual void DragableOn ()
 
virtual void DragableOff ()
 
virtual unsigned long GetRedrawMTime ()
 
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 bool HasKeys (vtkInformation *requiredKeys)
 
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 void BuildPaths (vtkAssemblyPaths *paths, vtkAssemblyPath *path)
 
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
vtkObjectNewInstance () 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)
 
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)
 
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 PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
int GetReferenceCount ()
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static vtkProp3DButtonRepresentationNew ()
 
static int IsTypeOf (const char *type)
 
static vtkProp3DButtonRepresentationSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkButtonRepresentation
static int IsTypeOf (const char *type)
 
static vtkButtonRepresentationSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkWidgetRepresentation
static int IsTypeOf (const char *type)
 
static vtkWidgetRepresentationSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkProp
static int IsTypeOf (const char *type)
 
static vtkPropSafeDownCast (vtkObjectBase *o)
 
static vtkInformationIntegerKeyGeneralTextureUnit ()
 
static vtkInformationDoubleVectorKeyGeneralTextureTransform ()
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
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 vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkProp3DButtonRepresentation ()
 
 ~vtkProp3DButtonRepresentation ()
 
virtual void RegisterPickers ()
 
- 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])
 
virtual void UnRegisterPickers ()
 
virtual void PickersModified ()
 
vtkPickingManagerGetPickingManager ()
 
vtkAssemblyPathGetAssemblyPath (double X, double Y, double Z, vtkAbstractPropPicker *picker)
 
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 &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkProp3DCurrentProp
 
vtkProp3DFollowerFollower
 
int FollowCamera
 
vtkPropArray * PropArray
 
vtkPropPickerPicker
 
- Protected Attributes inherited from vtkButtonRepresentation
int NumberOfStates
 
int State
 
int HighlightState
 
- Protected Attributes inherited from vtkWidgetRepresentation
vtkWeakPointer< vtkRendererRenderer
 
int InteractionState
 
double StartEventPosition [3]
 
double PlaceFactor
 
int Placed
 
double InitialBounds [6]
 
double InitialLength
 
int ValidPick
 
bool PickingManaged
 
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
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

defines a representation for a vtkButtonWidget

This class implements one type of vtkButtonRepresentation. Each button state can be represented with a separate instance of vtkProp3D. Thus buttons can be represented with vtkActor, vtkImageActor, volumes (e.g., vtkVolume) and/or any other vtkProp3D. Also, the class invokes events when highlighting occurs (i.e., hovering, selecting) so that appropriate action can be taken to highlight the button (if desired).

To use this representation, always begin by specifying the number of button states. Then provide, for each state, an instance of vtkProp3D.

This widget representation uses the conventional placement method. The button is placed inside the bounding box defined by PlaceWidget by translating and scaling the vtkProp3D to fit (each vtkProp3D is transformed). Therefore, you must define the number of button states and each state (i.e., vtkProp3D) prior to calling vtkPlaceWidget.

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

Definition at line 53 of file vtkProp3DButtonRepresentation.h.

Member Typedef Documentation

◆ Superclass

Standard methods for instances of the class.

Definition at line 61 of file vtkProp3DButtonRepresentation.h.

Constructor & Destructor Documentation

◆ vtkProp3DButtonRepresentation()

vtkProp3DButtonRepresentation::vtkProp3DButtonRepresentation ( )
protected

◆ ~vtkProp3DButtonRepresentation()

vtkProp3DButtonRepresentation::~vtkProp3DButtonRepresentation ( )
protected

Member Function Documentation

◆ New()

static vtkProp3DButtonRepresentation* vtkProp3DButtonRepresentation::New ( )
static

Instantiate the class.

◆ IsTypeOf()

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

◆ IsA()

virtual int vtkProp3DButtonRepresentation::IsA ( const char *  name)
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 vtkButtonRepresentation.

◆ SafeDownCast()

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

◆ NewInstanceInternal()

virtual vtkObjectBase* vtkProp3DButtonRepresentation::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkButtonRepresentation.

◆ NewInstance()

vtkProp3DButtonRepresentation* vtkProp3DButtonRepresentation::NewInstance ( ) const

◆ PrintSelf()

void vtkProp3DButtonRepresentation::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
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 vtkButtonRepresentation.

◆ SetButtonProp()

void vtkProp3DButtonRepresentation::SetButtonProp ( int  i,
vtkProp3D prop 
)

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

◆ GetButtonProp()

vtkProp3D* vtkProp3DButtonRepresentation::GetButtonProp ( int  i)

◆ SetFollowCamera()

virtual void vtkProp3DButtonRepresentation::SetFollowCamera ( int  )
virtual

Specify whether the button should always face the camera. If enabled, the button reorients itself towards the camera as the camera moves.

◆ GetFollowCamera()

virtual int vtkProp3DButtonRepresentation::GetFollowCamera ( )
virtual

◆ FollowCameraOn()

virtual void vtkProp3DButtonRepresentation::FollowCameraOn ( )
virtual

◆ FollowCameraOff()

virtual void vtkProp3DButtonRepresentation::FollowCameraOff ( )
virtual

◆ SetState()

virtual void vtkProp3DButtonRepresentation::SetState ( int  state)
virtual

Extend the vtkButtonRepresentation::SetState() method.

Reimplemented from vtkButtonRepresentation.

◆ ComputeInteractionState()

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

Provide the necessary methods to satisfy the vtkWidgetRepresentation API.

Reimplemented from vtkWidgetRepresentation.

◆ BuildRepresentation()

virtual void vtkProp3DButtonRepresentation::BuildRepresentation ( )
virtual

◆ PlaceWidget()

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

This method positions (translates and scales the props) into the bounding box specified. Note all the button props are scaled.

◆ ShallowCopy()

virtual void vtkProp3DButtonRepresentation::ShallowCopy ( vtkProp prop)
virtual

Provide the necessary methods to satisfy the rendering API.

Reimplemented from vtkButtonRepresentation.

◆ GetBounds()

virtual double* vtkProp3DButtonRepresentation::GetBounds ( void  )
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 from vtkWidgetRepresentation.

◆ GetActors()

virtual void vtkProp3DButtonRepresentation::GetActors ( vtkPropCollection )
virtual

For some exporters and other other operations we must be able to collect all the actors or volumes. These methods are used in that process.

Reimplemented from vtkWidgetRepresentation.

◆ ReleaseGraphicsResources()

virtual void vtkProp3DButtonRepresentation::ReleaseGraphicsResources ( vtkWindow )
virtual

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.

Reimplemented from vtkWidgetRepresentation.

◆ RenderOpaqueGeometry()

virtual int vtkProp3DButtonRepresentation::RenderOpaqueGeometry ( vtkViewport )
virtual

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDERING PROCESS All concrete subclasses must be able to render themselves. There are four key render methods in vtk and they correspond to four different points in the rendering cycle. Any given prop may implement one or more of these methods. The first method is intended for rendering all opaque geometry. The second method is intended for rendering all translucent polygonal geometry. The third one is intended for rendering all translucent volumetric geometry. Most of the volume rendering mappers draw their results during this third method. The last method is to render any 2D annotation or overlays. Each of these methods return an integer value indicating whether or not this render method was applied to this data.

Reimplemented from vtkProp.

◆ RenderVolumetricGeometry()

virtual int vtkProp3DButtonRepresentation::RenderVolumetricGeometry ( vtkViewport )
virtual

Reimplemented from vtkProp.

◆ RenderTranslucentPolygonalGeometry()

virtual int vtkProp3DButtonRepresentation::RenderTranslucentPolygonalGeometry ( vtkViewport )
virtual

Reimplemented from vtkProp.

◆ HasTranslucentPolygonalGeometry()

virtual int vtkProp3DButtonRepresentation::HasTranslucentPolygonalGeometry ( )
virtual

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDERING PROCESS Does this prop have some translucent polygonal geometry? This method is called during the rendering process to know if there is some translucent polygonal geometry. A simple prop that has some translucent polygonal geometry will return true. A composite prop (like vtkAssembly) that has at least one sub-prop that has some translucent polygonal geometry will return true. Default implementation return false.

Reimplemented from vtkWidgetRepresentation.

◆ RegisterPickers()

virtual void vtkProp3DButtonRepresentation::RegisterPickers ( )
protectedvirtual

Register internal Pickers in the Picking Manager. Must be reimplemented by concrete widget representations to register their pickers.

Reimplemented from vtkWidgetRepresentation.

Member Data Documentation

◆ CurrentProp

vtkProp3D* vtkProp3DButtonRepresentation::CurrentProp
protected

Definition at line 111 of file vtkProp3DButtonRepresentation.h.

◆ Follower

vtkProp3DFollower* vtkProp3DButtonRepresentation::Follower
protected

Definition at line 114 of file vtkProp3DButtonRepresentation.h.

◆ FollowCamera

int vtkProp3DButtonRepresentation::FollowCamera
protected

Definition at line 115 of file vtkProp3DButtonRepresentation.h.

◆ PropArray

vtkPropArray* vtkProp3DButtonRepresentation::PropArray
protected

Definition at line 119 of file vtkProp3DButtonRepresentation.h.

◆ Picker

vtkPropPicker* vtkProp3DButtonRepresentation::Picker
protected

Definition at line 122 of file vtkProp3DButtonRepresentation.h.


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