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;
41 class vtkPolyData;
42 class vtkGlyph2D;
43 class vtkPoints;
45 class vtkPointPlacer;
46 
48 {
49 public:
52 
54 
56  void PrintSelf(ostream& os, vtkIndent indent);
58 
60 
63  void SetCursorShape(vtkPolyData *cursorShape);
64  vtkPolyData *GetCursorShape();
66 
70  virtual void SetDisplayPosition(double xyz[3]);
71 
73 
74  void SetProperty(vtkProperty2D*);
75  void SetSelectedProperty(vtkProperty2D*);
76  vtkGetObjectMacro(Property,vtkProperty2D);
77  vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
79 
81 
84  virtual double *GetBounds();
85  virtual void BuildRepresentation();
86  virtual void StartWidgetInteraction(double eventPos[2]);
87  virtual void WidgetInteraction(double eventPos[2]);
88  virtual int ComputeInteractionState(int X, int Y, int modify=0);
90 
92 
93  virtual void ShallowCopy(vtkProp *prop);
94  virtual void DeepCopy(vtkProp *prop);
95  virtual void GetActors2D(vtkPropCollection *);
96  virtual void ReleaseGraphicsResources(vtkWindow *);
97  virtual int RenderOverlay(vtkViewport *viewport);
99 
100  void Highlight(int highlight);
101 
106  virtual void SetPointPlacer ( vtkPointPlacer * );
107 
108 protected:
111 
112  // Render the cursor
119 
120  // Support picking
121  double LastPickPosition[3];
122  double LastEventPosition[2];
123 
124  // Methods to manipulate the cursor
126  void Translate(double eventPos[2]);
127  void Scale(double eventPos[2]);
128 
129 
130 
131 
132  // Properties used to control the appearance of selected objects and
133  // the manipulator in general.
136  void CreateDefaultProperties();
137 
138  // The size of the hot spot.
139  int DetermineConstraintAxis(int constraint, double eventPos[2]);
142 
143 private:
145  void operator=(const vtkPointHandleRepresentation2D&); //Not implemented
146 };
147 
148 #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:83
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
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