VTK
vtkPointPlacer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPointPlacer.h,v
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 =========================================================================*/
41 #ifndef vtkPointPlacer_h
42 #define vtkPointPlacer_h
43 
44 #include "vtkInteractionWidgetsModule.h" // For export macro
45 #include "vtkObject.h"
46 
47 class vtkRenderer;
48 
49 class VTKINTERACTIONWIDGETS_EXPORT vtkPointPlacer : public vtkObject
50 {
51 public:
55  static vtkPointPlacer *New();
56 
58 
61  vtkTypeMacro(vtkPointPlacer,vtkObject);
62  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
72  virtual int ComputeWorldPosition( vtkRenderer *ren,
73  double displayPos[2],
74  double worldPos[3],
75  double worldOrient[9] );
76 
84  virtual int ComputeWorldPosition( vtkRenderer *ren,
85  double displayPos[2],
86  double refWorldPos[3],
87  double worldPos[3],
88  double worldOrient[9] );
89 
94  virtual int ValidateWorldPosition( double worldPos[3] );
95 
99  virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] );
100 
105  virtual int ValidateWorldPosition( double worldPos[3],
106  double worldOrient[9] );
107 
119  virtual int UpdateWorldPosition( vtkRenderer *ren,
120  double worldPos[3],
121  double worldOrient[9] );
122 
131  virtual int UpdateNodeWorldPosition(
132  double worldPos[3], vtkIdType nodePointId);
133 
138  virtual int UpdateInternalState() {return 0;}
139 
141 
145  vtkSetClampMacro(PixelTolerance,int,1,100);
146  vtkGetMacro(PixelTolerance,int);
148 
150 
154  vtkSetClampMacro(WorldTolerance, double, 0.0, VTK_DOUBLE_MAX);
155  vtkGetMacro(WorldTolerance, double);
157 
158 protected:
159  vtkPointPlacer();
160  ~vtkPointPlacer() override;
161 
164 
165 private:
166  vtkPointPlacer(const vtkPointPlacer&) = delete;
167  void operator=(const vtkPointPlacer&) = delete;
168 };
169 
170 #endif
171 
172 
173 
174 
175 
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
abstract specification for renderers
Definition: vtkRenderer.h:63
int vtkIdType
Definition: vtkType.h:347
a simple class to control print indentation
Definition: vtkIndent.h:39
Abstract interface to translate 2D display positions to world coordinates.
virtual int UpdateInternalState()
Called by the representation to give the placer a chance to update itself.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...