VTK
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
vtkHandleRepresentation Class Reference

abstract class for representing widget handles More...

#include <vtkHandleRepresentation.h>

Inheritance diagram for vtkHandleRepresentation:
Inheritance graph
[legend]
Collaboration diagram for vtkHandleRepresentation:
Collaboration graph
[legend]

List of all members.

Public Types

enum  _InteractionState {
  Outside = 0, Nearby, Selecting, Translating,
  Scaling
}

Public Member Functions

virtual int CheckConstraint (vtkRenderer *renderer, double pos[2])
virtual unsigned long GetMTime ()
virtual void SetDisplayPosition (double pos[3])
virtual void GetDisplayPosition (double pos[3])
virtual doubleGetDisplayPosition ()
virtual void SetWorldPosition (double pos[3])
virtual void GetWorldPosition (double pos[3])
virtual doubleGetWorldPosition ()
virtual void SetTolerance (int)
virtual int GetTolerance ()
virtual void SetActiveRepresentation (int)
virtual int GetActiveRepresentation ()
virtual void ActiveRepresentationOn ()
virtual void ActiveRepresentationOff ()
virtual void SetInteractionState (int)
virtual void SetConstrained (int)
virtual int GetConstrained ()
virtual void ConstrainedOn ()
virtual void ConstrainedOff ()
virtual void ShallowCopy (vtkProp *prop)
virtual void DeepCopy (vtkProp *prop)
virtual void SetRenderer (vtkRenderer *ren)
virtual void SetPointPlacer (vtkPointPlacer *)
virtual vtkPointPlacerGetPointPlacer ()

Protected Member Functions

 vtkHandleRepresentation ()
 ~vtkHandleRepresentation ()

Protected Attributes

int Tolerance
int ActiveRepresentation
int Constrained
vtkCoordinateDisplayPosition
vtkCoordinateWorldPosition
vtkTimeStamp DisplayPositionTime
vtkTimeStamp WorldPositionTime
vtkPointPlacerPointPlacer
typedef vtkWidgetRepresentation Superclass
static int IsTypeOf (const char *type)
static vtkHandleRepresentationSafeDownCast (vtkObjectBase *o)
virtual int IsA (const char *type)
vtkHandleRepresentationNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual vtkObjectBaseNewInstanceInternal () const

Detailed Description

abstract class for representing widget handles

This class defines an API for widget handle representations. These representations interact with vtkHandleWidget. Various representations can be used depending on the nature of the handle. The basic functionality of the handle representation is to maintain a position. The position is represented via a vtkCoordinate, meaning that the position can be easily obtained in a variety of coordinate systems.

Optional features for this representation include an active mode (the widget appears only when the mouse pointer is close to it). The active distance is expressed in pixels and represents a circle in display space.

The class may be subclassed so that alternative representations can be created. The class defines an API and a default implementation that the vtkHandleWidget interacts with to render itself in the scene.

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).
See also:
vtkRectilinearWipeWidget vtkWidgetRepresentation vtkAbstractWidget
Tests:
vtkHandleRepresentation (Tests)

Definition at line 57 of file vtkHandleRepresentation.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
Outside 
Nearby 
Selecting 
Translating 
Scaling 

Definition at line 104 of file vtkHandleRepresentation.h.


Constructor & Destructor Documentation


Member Function Documentation

static int vtkHandleRepresentation::IsTypeOf ( const char *  type) [static]
virtual int vtkHandleRepresentation::IsA ( const char *  type) [virtual]
virtual vtkObjectBase* vtkHandleRepresentation::NewInstanceInternal ( ) const [protected, virtual]
void vtkHandleRepresentation::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]
virtual void vtkHandleRepresentation::SetDisplayPosition ( double  pos[3]) [virtual]

Handles usually have their coordinates set in display coordinates (generally by an associated widget) and internally maintain the position in world coordinates. (Using world coordinates insures that handles are rendered in the right position when the camera view changes.) These methods are often subclassed because special constraint operations can be used to control the actual positioning.

Reimplemented in vtkConstrainedPointHandleRepresentation, vtkPointHandleRepresentation2D, vtkAbstractPolygonalHandleRepresentation3D, vtkSphereHandleRepresentation, and vtkPointHandleRepresentation3D.

virtual void vtkHandleRepresentation::GetDisplayPosition ( double  pos[3]) [virtual]

Handles usually have their coordinates set in display coordinates (generally by an associated widget) and internally maintain the position in world coordinates. (Using world coordinates insures that handles are rendered in the right position when the camera view changes.) These methods are often subclassed because special constraint operations can be used to control the actual positioning.

Handles usually have their coordinates set in display coordinates (generally by an associated widget) and internally maintain the position in world coordinates. (Using world coordinates insures that handles are rendered in the right position when the camera view changes.) These methods are often subclassed because special constraint operations can be used to control the actual positioning.

virtual void vtkHandleRepresentation::SetWorldPosition ( double  pos[3]) [virtual]

Handles usually have their coordinates set in display coordinates (generally by an associated widget) and internally maintain the position in world coordinates. (Using world coordinates insures that handles are rendered in the right position when the camera view changes.) These methods are often subclassed because special constraint operations can be used to control the actual positioning.

Reimplemented in vtkAbstractPolygonalHandleRepresentation3D, vtkSphereHandleRepresentation, vtkPointHandleRepresentation3D, and vtkPolygonalHandleRepresentation3D.

virtual void vtkHandleRepresentation::GetWorldPosition ( double  pos[3]) [virtual]

Handles usually have their coordinates set in display coordinates (generally by an associated widget) and internally maintain the position in world coordinates. (Using world coordinates insures that handles are rendered in the right position when the camera view changes.) These methods are often subclassed because special constraint operations can be used to control the actual positioning.

Handles usually have their coordinates set in display coordinates (generally by an associated widget) and internally maintain the position in world coordinates. (Using world coordinates insures that handles are rendered in the right position when the camera view changes.) These methods are often subclassed because special constraint operations can be used to control the actual positioning.

virtual void vtkHandleRepresentation::SetTolerance ( int  ) [virtual]

The tolerance representing the distance to the widget (in pixels) in which the cursor is considered near enough to the widget to be active.

The tolerance representing the distance to the widget (in pixels) in which the cursor is considered near enough to the widget to be active.

Flag controls whether the widget becomes visible when the mouse pointer moves close to it (i.e., the widget becomes active). By default, ActiveRepresentation is off and the representation is always visible.

Flag controls whether the widget becomes visible when the mouse pointer moves close to it (i.e., the widget becomes active). By default, ActiveRepresentation is off and the representation is always visible.

Flag controls whether the widget becomes visible when the mouse pointer moves close to it (i.e., the widget becomes active). By default, ActiveRepresentation is off and the representation is always visible.

Flag controls whether the widget becomes visible when the mouse pointer moves close to it (i.e., the widget becomes active). By default, ActiveRepresentation is off and the representation is always visible.

virtual void vtkHandleRepresentation::SetInteractionState ( int  ) [virtual]

The interaction state may be set from a widget (e.g., HandleWidget) or other object. This controls how the interaction with the widget proceeds. Normally this method is used as part of a handshaking processwith the widget: First ComputeInteractionState() is invoked that returns a state based on geometric considerations (i.e., cursor near a widget feature), then based on events, the widget may modify this further.

virtual void vtkHandleRepresentation::SetConstrained ( int  ) [virtual]

Specify whether any motions (such as scale, translate, etc.) are constrained in some way (along an axis, etc.) Widgets can use this to control the resulting motion.

Specify whether any motions (such as scale, translate, etc.) are constrained in some way (along an axis, etc.) Widgets can use this to control the resulting motion.

virtual void vtkHandleRepresentation::ConstrainedOn ( ) [virtual]

Specify whether any motions (such as scale, translate, etc.) are constrained in some way (along an axis, etc.) Widgets can use this to control the resulting motion.

virtual void vtkHandleRepresentation::ConstrainedOff ( ) [virtual]

Specify whether any motions (such as scale, translate, etc.) are constrained in some way (along an axis, etc.) Widgets can use this to control the resulting motion.

virtual int vtkHandleRepresentation::CheckConstraint ( vtkRenderer renderer,
double  pos[2] 
) [virtual]

Method has to be overridden in the subclasses which has constraints on placing the handle (Ex. vtkConstrainedPointHandleRepresentation). It should return 1 if the position is within the constraint, else it should return 0. By default it returns 1.

Reimplemented in vtkConstrainedPointHandleRepresentation.

virtual void vtkHandleRepresentation::ShallowCopy ( vtkProp prop) [virtual]
virtual void vtkHandleRepresentation::DeepCopy ( vtkProp prop) [virtual]
virtual void vtkHandleRepresentation::SetRenderer ( vtkRenderer ren) [virtual]

Methods to make this class properly act like a vtkWidgetRepresentation.

Reimplemented from vtkWidgetRepresentation.

Reimplemented in vtkConstrainedPointHandleRepresentation.

virtual unsigned long vtkHandleRepresentation::GetMTime ( ) [virtual]

Overload the superclasses' GetMTime() because the internal vtkCoordinates are used to keep the state of the representation.

Reimplemented from vtkObject.

Set/Get the point placer. Point placers can be used to dictate constraints on the placement of handles. As an example, see vtkBoundedPlanePointPlacer (constrains the placement of handles to a set of bounded planes) vtkFocalPlanePointPlacer (constrains placement on the focal plane) etc. The default point placer is vtkPointPlacer (which does not apply any constraints, so the handles are free to move anywhere).

Reimplemented in vtkPointHandleRepresentation2D.

Set/Get the point placer. Point placers can be used to dictate constraints on the placement of handles. As an example, see vtkBoundedPlanePointPlacer (constrains the placement of handles to a set of bounded planes) vtkFocalPlanePointPlacer (constrains placement on the focal plane) etc. The default point placer is vtkPointPlacer (which does not apply any constraints, so the handles are free to move anywhere).


Member Data Documentation

Definition at line 161 of file vtkHandleRepresentation.h.

Definition at line 162 of file vtkHandleRepresentation.h.

Definition at line 163 of file vtkHandleRepresentation.h.

Definition at line 169 of file vtkHandleRepresentation.h.

Definition at line 170 of file vtkHandleRepresentation.h.

Definition at line 173 of file vtkHandleRepresentation.h.

Definition at line 174 of file vtkHandleRepresentation.h.

Definition at line 177 of file vtkHandleRepresentation.h.


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