VTK  9.2.6
vtkPolygonalSurfacePointPlacer.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPolygonalSurfacePointPlacer.h
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=========================================================================*/
35#ifndef vtkPolygonalSurfacePointPlacer_h
36#define vtkPolygonalSurfacePointPlacer_h
37
38#include "vtkInteractionWidgetsModule.h" // For export macro
40
42class vtkCellPicker;
43class vtkPolygonalSurfacePointPlacerInternals;
44class vtkPolyData;
45
46// The Node stores information about the point. This information is used by
47// the interpolator. Reusing this information avoids the need for a second
48// pick operation to regenerate it. (Cellpickers are slow).
58
59class VTKINTERACTIONWIDGETS_EXPORT vtkPolygonalSurfacePointPlacer : public vtkPolyDataPointPlacer
60{
61public:
66
68
72 void PrintSelf(ostream& os, vtkIndent indent) override;
74
75 // Descuription:
76 // Add /remove a prop, to place points on
77 void AddProp(vtkProp*) override;
78 void RemoveViewProp(vtkProp* prop) override;
79 void RemoveAllProps() override;
80
90 vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
91
98 int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
99 double worldPos[3], double worldOrient[9]) override;
100
105 int ValidateWorldPosition(double worldPos[3]) override;
106
110 int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId) override;
111
115 int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]) override;
116
121 int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
122
124
127 vtkGetObjectMacro(CellPicker, vtkCellPicker);
129
131
135 vtkGetObjectMacro(Polys, vtkPolyDataCollection);
137
139
144 vtkSetMacro(DistanceOffset, double);
145 vtkGetMacro(DistanceOffset, double);
147
149
155 vtkSetMacro(SnapToClosestPoint, vtkTypeBool);
156 vtkGetMacro(SnapToClosestPoint, vtkTypeBool);
157 vtkBooleanMacro(SnapToClosestPoint, vtkTypeBool);
159
161
165 Node* GetNodeAtWorldPosition(double worldPos[3]);
167
168protected:
171
172 // The props that represents the terrain data (one or more) in a rendered
173 // scene
176 vtkPolygonalSurfacePointPlacerInternals* Internals;
179
180private:
182 void operator=(const vtkPolygonalSurfacePointPlacer&) = delete;
183};
184
185#endif
ray-cast cell picker for all kinds of Prop3Ds
a simple class to control print indentation
Definition vtkIndent.h:40
maintain a list of polygonal data objects
Base class to place points given constraints on polygonal data.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:91
Place points on the surface of polygonal data.
~vtkPolygonalSurfacePointPlacer() override
static vtkPolygonalSurfacePointPlacer * New()
Instantiate this class.
int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId) override
Give the node a chance to update its auxiliary point id.
void AddProp(vtkProp *) override
int ValidateDisplayPosition(vtkRenderer *, double displayPos[2]) override
Given a display position, check the validity of this position.
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 the new world position ...
int ValidateWorldPosition(double worldPos[3]) override
Given a world position check the validity of this position according to the constraints of the placer...
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
Node * GetNodeAtWorldPosition(double worldPos[3])
Internally used by the interpolator.
vtkPolygonalSurfacePointPlacerInternals * Internals
int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override
Given a world position and a world orientation, validate it according to the constraints of the place...
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...
void RemoveViewProp(vtkProp *prop) override
vtkPolygonalSurfacePointPlacerNode Node
Internally used by the interpolator.
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:57
abstract specification for renderers
Definition vtkRenderer.h:73
int vtkTypeBool
Definition vtkABI.h:69
int vtkIdType
Definition vtkType.h:332