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