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=========================================================================*/
44#ifndef vtkPolygonalSurfacePointPlacer_h
45#define vtkPolygonalSurfacePointPlacer_h
46
47#include "vtkInteractionWidgetsModule.h" // For export macro
49
51class vtkCellPicker;
52class vtkPolygonalSurfacePointPlacerInternals;
53class vtkPolyData;
54
55// The Node stores information about the point. This information is used by
56// the interpolator. Reusing this information avoids the need for a second
57// pick operation to regenerate it. (Cellpickers are slow).
59{
60 double WorldPosition[3];
64 double ParametricCoords[3]; // parametric coords within cell
66};
67
68class VTKINTERACTIONWIDGETS_EXPORT vtkPolygonalSurfacePointPlacer : public vtkPolyDataPointPlacer
69{
70public:
75
77
81 void PrintSelf(ostream& os, vtkIndent indent) override;
83
84 // Descuription:
85 // Add /remove a prop, to place points on
86 void AddProp(vtkProp*) override;
87 void RemoveViewProp(vtkProp* prop) override;
88 void RemoveAllProps() override;
89
99 vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
100
107 int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
108 double worldPos[3], double worldOrient[9]) override;
109
114 int ValidateWorldPosition(double worldPos[3]) override;
115
119 int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId) override;
120
124 int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]) override;
125
130 int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
131
133
136 vtkGetObjectMacro(CellPicker, vtkCellPicker);
138
140
144 vtkGetObjectMacro(Polys, vtkPolyDataCollection);
146
148
153 vtkSetMacro(DistanceOffset, double);
154 vtkGetMacro(DistanceOffset, double);
156
158
164 vtkSetMacro(SnapToClosestPoint, vtkTypeBool);
165 vtkGetMacro(SnapToClosestPoint, vtkTypeBool);
166 vtkBooleanMacro(SnapToClosestPoint, vtkTypeBool);
168
170
174 Node* GetNodeAtWorldPosition(double worldPos[3]);
176
177protected:
180
181 // The props that represents the terrain data (one or more) in a rendered
182 // scene
185 vtkPolygonalSurfacePointPlacerInternals* Internals;
188
189private:
191 void operator=(const vtkPolygonalSurfacePointPlacer&) = delete;
192};
193
194#endif
ray-cast cell picker for all kinds of Prop3Ds
a simple class to control print indentation
Definition vtkIndent.h:49
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
Place points on the surface of polygonal data.
~vtkPolygonalSurfacePointPlacer() override
vtkPolygonalSurfacePointPlacerNode Node
Internally used by the interpolator.
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
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:66
abstract specification for renderers
Definition vtkRenderer.h:82
int vtkTypeBool
Definition vtkABI.h:69
int vtkIdType
Definition vtkType.h:332