VTK
vtkPointHandleRepresentation2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPointHandleRepresentation2D.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
32 #ifndef vtkPointHandleRepresentation2D_h
33 #define vtkPointHandleRepresentation2D_h
34 
35 #include "vtkInteractionWidgetsModule.h" // For export macro
37 
38 class vtkProperty2D;
39 class vtkActor2D;
40 class vtkCoordinate;
42 class vtkPolyData;
43 class vtkGlyph2D;
44 class vtkPoints;
46 class vtkPointPlacer;
47 
49 {
50 public:
53 
55 
57  void PrintSelf(ostream& os, vtkIndent indent);
59 
61 
64  void SetCursorShape(vtkPolyData *cursorShape);
65  vtkPolyData *GetCursorShape();
67 
71  virtual void SetDisplayPosition(double xyz[3]);
72 
74 
75  void SetProperty(vtkProperty2D*);
76  void SetSelectedProperty(vtkProperty2D*);
77  vtkGetObjectMacro(Property,vtkProperty2D);
78  vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
80 
82 
85  virtual double *GetBounds();
86  virtual void BuildRepresentation();
87  virtual void StartWidgetInteraction(double eventPos[2]);
88  virtual void WidgetInteraction(double eventPos[2]);
89  virtual int ComputeInteractionState(int X, int Y, int modify=0);
91 
93 
94  virtual void ShallowCopy(vtkProp *prop);
95  virtual void DeepCopy(vtkProp *prop);
96  virtual void GetActors2D(vtkPropCollection *);
97  virtual void ReleaseGraphicsResources(vtkWindow *);
98  virtual int RenderOverlay(vtkViewport *viewport);
100 
101  void Highlight(int highlight);
102 
107  virtual void SetPointPlacer ( vtkPointPlacer * );
108 
109 protected:
112 
113  // Render the cursor
121 
122  // Support picking
123  double LastPickPosition[3];
124  double LastEventPosition[2];
125 
126  // Methods to manipulate the cursor
128  void Translate(double eventPos[2]);
129  void Scale(double eventPos[2]);
130 
131  // Properties used to control the appearance of selected objects and
132  // the manipulator in general.
135  void CreateDefaultProperties();
136 
137  // The size of the hot spot.
138  int DetermineConstraintAxis(int constraint, double eventPos[2]);
141 
142 private:
144  void operator=(const vtkPointHandleRepresentation2D&); //Not implemented
145 };
146 
147 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
virtual void SetPointPlacer(vtkPointPlacer *)
virtual int RenderOverlay(vtkViewport *vtkNotUsed(viewport))
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:38
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract class for representing widget handles
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual void StartWidgetInteraction(double eventPos[2])
a actor that draws 2D data
Definition: vtkActor2D.h:44
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
virtual void ReleaseGraphicsResources(vtkWindow *)
virtual void BuildRepresentation()=0
a list of Props
virtual void ShallowCopy(vtkProp *prop)
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
#define VTKINTERACTIONWIDGETS_EXPORT
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:38
Abstract interface to translate 2D display positions to world coordinates.
virtual void WidgetInteraction(double newEventPos[2])
represent the position of a point in display coordinates
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:69
void PrintSelf(ostream &os, vtkIndent indent)
virtual void DeepCopy(vtkProp *prop)
virtual void GetActors2D(vtkPropCollection *)
virtual void Highlight(int vtkNotUsed(highlightOn))
represent surface properties of a 2D image
Definition: vtkProperty2D.h:39
static vtkObject * New()
virtual void SetDisplayPosition(double pos[3])
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:38