VTK  9.1.0
vtkPointPlacer.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPointPlacer.h,v
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
41#ifndef vtkPointPlacer_h
42#define vtkPointPlacer_h
43
44#include "vtkInteractionWidgetsModule.h" // For export macro
45#include "vtkObject.h"
46
47class vtkRenderer;
48
49class VTKINTERACTIONWIDGETS_EXPORT vtkPointPlacer : public vtkObject
50{
51public:
56
58
61 vtkTypeMacro(vtkPointPlacer, vtkObject);
62 void PrintSelf(ostream& os, vtkIndent indent) override;
64
73 vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]);
74
82 virtual int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
83 double worldPos[3], double worldOrient[9]);
84
89 virtual int ValidateWorldPosition(double worldPos[3]);
90
94 virtual int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]);
95
100 virtual int ValidateWorldPosition(double worldPos[3], double worldOrient[9]);
101
113 virtual int UpdateWorldPosition(vtkRenderer* ren, double worldPos[3], double worldOrient[9]);
114
123 virtual int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId);
124
129 virtual int UpdateInternalState() { return 0; }
130
132
136 vtkSetClampMacro(PixelTolerance, int, 1, 100);
137 vtkGetMacro(PixelTolerance, int);
139
141
145 vtkSetClampMacro(WorldTolerance, double, 0.0, VTK_DOUBLE_MAX);
146 vtkGetMacro(WorldTolerance, double);
148
149protected:
151 ~vtkPointPlacer() override;
152
155
156private:
157 vtkPointPlacer(const vtkPointPlacer&) = delete;
158 void operator=(const vtkPointPlacer&) = delete;
159};
160
161#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:82
Abstract interface to translate 2D display positions to world coordinates.
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 ...
virtual int UpdateInternalState()
Called by the representation to give the placer a chance to update itself.
virtual int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId)
Give the placer a chance to update the node information, if any.
static vtkPointPlacer * New()
Instantiate this class.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
~vtkPointPlacer() override
virtual int ValidateDisplayPosition(vtkRenderer *, double displayPos[2])
Given a display position, check the validity of this position.
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...
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...
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...
virtual int ValidateWorldPosition(double worldPos[3])
Given a world position check the validity of this position according to the constraints of the placer...
abstract specification for renderers
Definition: vtkRenderer.h:182
int vtkIdType
Definition: vtkType.h:332
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165