VTK  9.7.1
vtkFocalPlanePointPlacer.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
3 // .SECTION Description
4 //
5 //
6 // .SECTION See Also
7 
8 #ifndef vtkFocalPlanePointPlacer_h
9 #define vtkFocalPlanePointPlacer_h
10 
11 #include "vtkInteractionWidgetsModule.h" // For export macro
12 #include "vtkPointPlacer.h"
13 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
14 
15 VTK_ABI_NAMESPACE_BEGIN
16 class vtkRenderer;
17 
18 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkFocalPlanePointPlacer : public vtkPointPlacer
19 {
20 public:
24  static vtkFocalPlanePointPlacer* New();
25 
27 
31  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
34  // Description:
35  // Given a renderer and a display position, compute
36  // the world position and orientation. The orientation
37  // computed by the placer will always line up with the
38  // standard coordinate axes. The world position will be
39  // computed by projecting the display position onto the
40  // focal plane. This method is typically used to place a
41  // point for the first time.
43  vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
44 
55  int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
56  double worldPos[3], double worldOrient[9]) override;
57 
59 
63  int ValidateWorldPosition(double worldPos[3]) override;
64  int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
66 
68 
73  vtkSetMacro(Offset, double);
74  vtkGetMacro(Offset, double);
76 
78 
82  vtkSetVector6Macro(PointBounds, double);
83  vtkGetVector6Macro(PointBounds, double);
85 
86 protected:
88  ~vtkFocalPlanePointPlacer() override;
89 
90  void GetCurrentOrientation(double worldOrient[9]);
91 
92  double PointBounds[6];
93  double Offset;
94 
95 private:
97  void operator=(const vtkFocalPlanePointPlacer&) = delete;
98 };
99 
100 VTK_ABI_NAMESPACE_END
101 #endif
virtual int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9])
Given a renderer and a display position in pixel coordinates, compute the world position and orientat...
abstract specification for renderers
Definition: vtkRenderer.h:63
a simple class to control print indentation
Definition: vtkIndent.h:28
Abstract interface to translate 2D display positions to world coordinates.
virtual int ValidateWorldPosition(double worldPos[3])
Given a world position check the validity of this position according to the constraints of the placer...
static vtkPointPlacer * New()
Instantiate this class.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.