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=========================================================================*/
32#ifndef vtkPolygonalSurfacePointPlacer_h
33#define vtkPolygonalSurfacePointPlacer_h
34
35#include "vtkInteractionWidgetsModule.h" // For export macro
37
39class vtkCellPicker;
40class vtkPolygonalSurfacePointPlacerInternals;
41class vtkPolyData;
42
43// The Node stores information about the point. This information is used by
44// the interpolator. Reusing this information avoids the need for a second
45// pick operation to regenerate it. (Cellpickers are slow).
47{
48 double WorldPosition[3];
52 double ParametricCoords[3]; // parametric coords within cell
54};
55
56class VTKINTERACTIONWIDGETS_EXPORT vtkPolygonalSurfacePointPlacer : public vtkPolyDataPointPlacer
57{
58public:
63
65
69 void PrintSelf(ostream& os, vtkIndent indent) override;
71
72 // Descuription:
73 // Add /remove a prop, to place points on
74 void AddProp(vtkProp*) override;
75 void RemoveViewProp(vtkProp* prop) override;
76 void RemoveAllProps() override;
77
87 vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
88
95 int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
96 double worldPos[3], double worldOrient[9]) override;
97
102 int ValidateWorldPosition(double worldPos[3]) override;
103
107 int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId) override;
108
112 int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]) override;
113
118 int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
119
121
124 vtkGetObjectMacro(CellPicker, vtkCellPicker);
126
128
132 vtkGetObjectMacro(Polys, vtkPolyDataCollection);
134
136
141 vtkSetMacro(DistanceOffset, double);
142 vtkGetMacro(DistanceOffset, double);
144
146
152 vtkSetMacro(SnapToClosestPoint, vtkTypeBool);
153 vtkGetMacro(SnapToClosestPoint, vtkTypeBool);
154 vtkBooleanMacro(SnapToClosestPoint, vtkTypeBool);
156
158
162 Node* GetNodeAtWorldPosition(double worldPos[3]);
164
165protected:
168
169 // The props that represents the terrain data (one or more) in a rendered
170 // scene
173 vtkPolygonalSurfacePointPlacerInternals* Internals;
176
177private:
179 void operator=(const vtkPolygonalSurfacePointPlacer&) = delete;
180};
181
182#endif
ray-cast cell picker for all kinds of Prop3Ds
a simple class to control print indentation
Definition vtkIndent.h:34
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:85
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:51
abstract specification for renderers
Definition vtkRenderer.h:67
int vtkTypeBool
Definition vtkABI.h:69
int vtkIdType
Definition vtkType.h:332