VTK: Interaction/Widgets/vtkPointPlacer.h Source File

| VTK 9.3.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
35 VTK_ABI_NAMESPACE_BEGIN
36 class vtkRenderer;
37
38 class VTKINTERACTIONWIDGETS_EXPORT vtkPointPlacer : public vtkObject
39 {
40 public:
44 static vtkPointPlacer* New();
45
47
50 vtkTypeMacro(vtkPointPlacer, vtkObject);
51 void PrintSelf(ostream& os, vtkIndent indent) override;
53
61 virtual int ComputeWorldPosition(
62 vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]);
63
71 virtual int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
72 double worldPos[3], double worldOrient[9]);
73
78 virtual int ValidateWorldPosition(double worldPos[3]);
79
83 virtual int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]);
84
89 virtual int ValidateWorldPosition(double worldPos[3], double worldOrient[9]);
90
102 virtual int UpdateWorldPosition(vtkRenderer* ren, double worldPos[3], double worldOrient[9]);
103
112 virtual int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId);
113
118 virtual int UpdateInternalState() { return 0; }
119
121
125 vtkSetClampMacro(PixelTolerance, int, 1, 100);
126 vtkGetMacro(PixelTolerance, int);
128
130
134 vtkSetClampMacro(WorldTolerance, double, 0.0, VTK_DOUBLE_MAX);
135 vtkGetMacro(WorldTolerance, double);
137
138 protected:
139 vtkPointPlacer();
140 ~vtkPointPlacer() override;
141
142 int PixelTolerance;
143 double WorldTolerance;
144
145 private:
146 vtkPointPlacer(const vtkPointPlacer&) = delete;
147 void operator=(const vtkPointPlacer&) = delete;
148 };
149
150 VTK_ABI_NAMESPACE_END
151 #endif
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkPointPlacer
Abstract interface to translate 2D display positions to world coordinates.
Definition: vtkPointPlacer.h:39
vtkPointPlacer::ComputeWorldPosition
virtual int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double refWorldPos[3], double worldPos[3], double worldOrient[9])
Given a renderer, a display position, and a reference world position, compute the new world position ...
vtkPointPlacer::PixelTolerance
int PixelTolerance
Definition: vtkPointPlacer.h:142
vtkPointPlacer::New
static vtkPointPlacer * New()
Instantiate this class.
vtkPointPlacer::UpdateInternalState
virtual int UpdateInternalState()
Called by the representation to give the placer a chance to update itself.
Definition: vtkPointPlacer.h:118
vtkPointPlacer::UpdateNodeWorldPosition
virtual int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId)
Give the placer a chance to update the node information, if any.
vtkPointPlacer::WorldTolerance
double WorldTolerance
Definition: vtkPointPlacer.h:143
vtkPointPlacer::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
vtkPointPlacer::~vtkPointPlacer
~vtkPointPlacer() override
vtkPointPlacer::ValidateDisplayPosition
virtual int ValidateDisplayPosition(vtkRenderer *, double displayPos[2])
Given a display position, check the validity of this position.
vtkPointPlacer::ComputeWorldPosition
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...
vtkPointPlacer::vtkPointPlacer
vtkPointPlacer()
vtkPointPlacer::ValidateWorldPosition
virtual int ValidateWorldPosition(double worldPos[3], double worldOrient[9])
Given a world position and a world orientation, validate it according to the constraints of the place...
vtkPointPlacer::UpdateWorldPosition
virtual int UpdateWorldPosition(vtkRenderer *ren, double worldPos[3], double worldOrient[9])
Given a current renderer, world position and orientation, update them according to the constraints of...
vtkPointPlacer::ValidateWorldPosition
virtual int ValidateWorldPosition(double worldPos[3])
Given a world position check the validity of this position according to the constraints of the placer...
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:71
vtkObject.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154