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 
36 
37 class vtkProperty2D;
38 class vtkActor2D;
40 class vtkPolyData;
41 class vtkGlyph2D;
42 class vtkPoints;
44 class vtkPointPlacer;
45 
47 {
48 public:
51 
53 
55  void PrintSelf(ostream& os, vtkIndent indent);
57 
59 
62  void SetCursorShape(vtkPolyData *cursorShape);
63  vtkPolyData *GetCursorShape();
65 
69  virtual void SetDisplayPosition(double xyz[3]);
70 
72 
73  void SetProperty(vtkProperty2D*);
74  void SetSelectedProperty(vtkProperty2D*);
75  vtkGetObjectMacro(Property,vtkProperty2D);
76  vtkGetObjectMacro(SelectedProperty,vtkProperty2D);
78 
80 
83  virtual double *GetBounds();
84  virtual void BuildRepresentation();
85  virtual void StartWidgetInteraction(double eventPos[2]);
86  virtual void WidgetInteraction(double eventPos[2]);
87  virtual int ComputeInteractionState(int X, int Y, int modify=0);
89 
91 
92  virtual void ShallowCopy(vtkProp *prop);
93  virtual void DeepCopy(vtkProp *prop);
94  virtual void GetActors2D(vtkPropCollection *);
95  virtual void ReleaseGraphicsResources(vtkWindow *);
96  virtual int RenderOverlay(vtkViewport *viewport);
98 
99  void Highlight(int highlight);
100 
105  virtual void SetPointPlacer ( vtkPointPlacer * );
106 
107 protected:
110 
111  // Render the cursor
118 
119  // Support picking
120  double LastPickPosition[3];
121  double LastEventPosition[2];
122 
123  // Methods to manipulate the cursor
125  void Translate(double eventPos[2]);
126  void Scale(double eventPos[2]);
127 
128 
129 
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