VTK  9.5.20250813
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
15VTK_ABI_NAMESPACE_BEGIN
16class vtkRenderer;
17
18class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkFocalPlanePointPlacer : public vtkPointPlacer
19{
20public:
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
86protected:
89
90 void GetCurrentOrientation(double worldOrient[9]);
91
92 double PointBounds[6];
93 double Offset;
94
95private:
97 void operator=(const vtkFocalPlanePointPlacer&) = delete;
98};
99
100VTK_ABI_NAMESPACE_END
101#endif
int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override
Given a renderer and a display position in pixel coordinates, compute the world position and orientat...
int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double refWorldPos[3], double worldPos[3], double worldOrient[9]) override
Given a renderer, a display position, and a reference world position, compute a new world position.
~vtkFocalPlanePointPlacer() override
void GetCurrentOrientation(double worldOrient[9])
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override
Validate a world position.
int ValidateWorldPosition(double worldPos[3]) override
Validate a world position.
static vtkFocalPlanePointPlacer * New()
Instantiate this class.
a simple class to control print indentation
Definition vtkIndent.h:108
Abstract interface to translate 2D display positions to world coordinates.
abstract specification for renderers
#define VTK_MARSHALAUTO