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(
73  vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]);
74 
82  virtual int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
83  double worldPos[3], double worldOrient[9]);
84 
89  virtual int ValidateWorldPosition(double worldPos[3]);
90 
94  virtual int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]);
95 
100  virtual int ValidateWorldPosition(double worldPos[3], double worldOrient[9]);
101 
113  virtual int UpdateWorldPosition(vtkRenderer* ren, double worldPos[3], double worldOrient[9]);
114 
123  virtual int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId);
124 
129  virtual int UpdateInternalState() { return 0; }
130 
132 
136  vtkSetClampMacro(PixelTolerance, int, 1, 100);
137  vtkGetMacro(PixelTolerance, int);
139 
141 
145  vtkSetClampMacro(WorldTolerance, double, 0.0, VTK_DOUBLE_MAX);
146  vtkGetMacro(WorldTolerance, double);
148 
149 protected:
150  vtkPointPlacer();
151  ~vtkPointPlacer() override;
152 
155 
156 private:
157  vtkPointPlacer(const vtkPointPlacer&) = delete;
158  void operator=(const vtkPointPlacer&) = delete;
159 };
160 
161 #endif
vtkPointPlacer::WorldTolerance
double WorldTolerance
Definition: vtkPointPlacer.h:154
vtkPointPlacer
Abstract interface to translate 2D display positions to world coordinates.
Definition: vtkPointPlacer.h:49
vtkIdType
int vtkIdType
Definition: vtkType.h:349
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:53
vtkPointPlacer::UpdateInternalState
virtual int UpdateInternalState()
Called by the representation to give the placer a chance to update itself.
Definition: vtkPointPlacer.h:129
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:58
vtkPointPlacer::PixelTolerance
int PixelTolerance
Definition: vtkPointPlacer.h:153
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:171