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 =========================================================================*/
29 #ifndef __vtkPointHandleRepresentation2D_h
30 #define __vtkPointHandleRepresentation2D_h
31 
33 
34 class vtkProperty2D;
35 class vtkActor2D;
37 class vtkPolyData;
38 class vtkGlyph2D;
39 class vtkPoints;
41 class vtkPointPlacer;
42 
44 {
45 public:
48 
50 
52  void PrintSelf(ostream& os, vtkIndent indent);
54 
56 
59  void SetCursorShape(vtkPolyData *cursorShape);
60  vtkPolyData *GetCursorShape();
62 
66  virtual void SetDisplayPosition(double xyz[3]);
67 
69 
70  void SetProperty(vtkProperty2D*);
71  void SetSelectedProperty(vtkProperty2D*);
72  vtkGetObjectMacro(Property,vtkProperty2D);
73  vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
75 
77 
80  virtual double *GetBounds();
81  virtual void BuildRepresentation();
82  virtual void StartWidgetInteraction(double eventPos[2]);
83  virtual void WidgetInteraction(double eventPos[2]);
84  virtual int ComputeInteractionState(int X, int Y, int modify=0);
86 
88 
89  virtual void ShallowCopy(vtkProp *prop);
90  virtual void DeepCopy(vtkProp *prop);
91  virtual void GetActors2D(vtkPropCollection *);
92  virtual void ReleaseGraphicsResources(vtkWindow *);
93  virtual int RenderOverlay(vtkViewport *viewport);
95 
96  void Highlight(int highlight);
97 
102  virtual void SetPointPlacer ( vtkPointPlacer * );
103 
104 protected:
107 
108  // Render the cursor
115 
116  // Support picking
117  double LastPickPosition[3];
118  double LastEventPosition[2];
119 
120  // Methods to manipulate the cursor
122  void Translate(double eventPos[2]);
123  void Scale(double eventPos[2]);
124 
125 
126 
127 
128  // Properties used to control the appearance of selected objects and
129  // the manipulator in general.
132  void CreateDefaultProperties();
133 
134  // The size of the hot spot.
135  int DetermineConstraintAxis(int constraint, double eventPos[2]);
138 
139 private:
141  void operator=(const vtkPointHandleRepresentation2D&); //Not implemented
142 };
143 
144 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
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:37
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract class for representing widget handles
abstract specification for Viewports
Definition: vtkViewport.h:45
virtual void StartWidgetInteraction(double eventPos[2])
a actor that draws 2D data
Definition: vtkActor2D.h:43
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
virtual void ReleaseGraphicsResources(vtkWindow *)
virtual void BuildRepresentation()=0
a list of Props
virtual void ShallowCopy(vtkProp *prop)
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:37
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
#define VTK_WIDGETS_EXPORT
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:38
static vtkObject * New()
virtual void SetDisplayPosition(double pos[3])
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:38