VTK  9.3.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 
14 VTK_ABI_NAMESPACE_BEGIN
15 class vtkRenderer;
16 
17 class VTKINTERACTIONWIDGETS_EXPORT vtkFocalPlanePointPlacer : public vtkPointPlacer
18 {
19 public:
23  static vtkFocalPlanePointPlacer* New();
24 
26 
30  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
33  // Description:
34  // Given a renderer and a display position, compute
35  // the world position and orientation. The orientation
36  // computed by the placer will always line up with the
37  // standard coordinate axes. The world position will be
38  // computed by projecting the display position onto the
39  // focal plane. This method is typically used to place a
40  // point for the first time.
42  vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
43 
54  int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
55  double worldPos[3], double worldOrient[9]) override;
56 
58 
62  int ValidateWorldPosition(double worldPos[3]) override;
63  int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
65 
67 
72  vtkSetMacro(Offset, double);
73  vtkGetMacro(Offset, double);
75 
77 
81  vtkSetVector6Macro(PointBounds, double);
82  vtkGetVector6Macro(PointBounds, double);
84 
85 protected:
87  ~vtkFocalPlanePointPlacer() override;
88 
89  void GetCurrentOrientation(double worldOrient[9]);
90 
91  double PointBounds[6];
92  double Offset;
93 
94 private:
96  void operator=(const vtkFocalPlanePointPlacer&) = delete;
97 };
98 
99 VTK_ABI_NAMESPACE_END
100 #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:61
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.