VTK  9.7.1
vtkPointPlacer.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
29 #ifndef vtkPointPlacer_h
30 #define vtkPointPlacer_h
31 
32 #include "vtkInteractionWidgetsModule.h" // For export macro
33 #include "vtkObject.h"
34 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkRenderer;
38 
39 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkPointPlacer : public vtkObject
40 {
41 public:
45  static vtkPointPlacer* New();
46 
48 
51  vtkTypeMacro(vtkPointPlacer, vtkObject);
52  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
62  virtual int ComputeWorldPosition(
63  vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]);
64 
72  virtual int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
73  double worldPos[3], double worldOrient[9]);
74 
79  virtual int ValidateWorldPosition(double worldPos[3]);
80 
84  virtual int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]);
85 
90  virtual int ValidateWorldPosition(double worldPos[3], double worldOrient[9]);
91 
103  virtual int UpdateWorldPosition(vtkRenderer* ren, double worldPos[3], double worldOrient[9]);
104 
113  virtual int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId);
114 
119  virtual int UpdateInternalState() { return 0; }
120 
122 
126  vtkSetClampMacro(PixelTolerance, int, 1, 100);
127  vtkGetMacro(PixelTolerance, int);
129 
131 
135  vtkSetClampMacro(WorldTolerance, double, 0.0, VTK_DOUBLE_MAX);
136  vtkGetMacro(WorldTolerance, double);
138 
139 protected:
140  vtkPointPlacer();
141  ~vtkPointPlacer() override;
142 
145 
146 private:
147  vtkPointPlacer(const vtkPointPlacer&) = delete;
148  void operator=(const vtkPointPlacer&) = delete;
149 };
150 
151 VTK_ABI_NAMESPACE_END
152 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:52
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:202
abstract specification for renderers
Definition: vtkRenderer.h:63
int vtkIdType
Definition: vtkType.h:363
a simple class to control print indentation
Definition: vtkIndent.h:28
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.
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...