VTK
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 =========================================================================*/
31 #ifndef vtkPolygonalSurfacePointPlacer_h
32 #define vtkPolygonalSurfacePointPlacer_h
33 
34 #include "vtkInteractionWidgetsModule.h" // For export macro
35 #include "vtkPolyDataPointPlacer.h"
36 
38 class vtkCellPicker;
39 class vtkPolygonalSurfacePointPlacerInternals;
40 class vtkPolyData;
41 
42 //BTX
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 //ETX
56 
58  : public vtkPolyDataPointPlacer
59 {
60 public:
63 
65 
67  void PrintSelf(ostream& os, vtkIndent indent);
69 
70  // Descuription:
71  // Add /remove a prop, to place points on
72  virtual void AddProp( vtkProp * );
73  virtual void RemoveViewProp(vtkProp *prop);
74  virtual void RemoveAllProps();
75 
77 
82  virtual int ComputeWorldPosition( vtkRenderer *ren,
83  double displayPos[2],
84  double worldPos[3],
85  double worldOrient[9] );
87 
89 
92  virtual int ComputeWorldPosition( vtkRenderer *ren,
93  double displayPos[2],
94  double refWorldPos[3],
95  double worldPos[3],
96  double worldOrient[9] );
98 
101  virtual int ValidateWorldPosition( double worldPos[3] );
102 
104 
105  virtual int UpdateNodeWorldPosition( double worldPos[3],
106  vtkIdType nodePointId );
108 
110  virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] );
111 
113 
115  virtual int ValidateWorldPosition( double worldPos[3],
116  double worldOrient[9] );
118 
120 
121  vtkGetObjectMacro( CellPicker, vtkCellPicker );
123 
125 
127  vtkGetObjectMacro( Polys, vtkPolyDataCollection );
129 
131 
134  vtkSetMacro( DistanceOffset, double );
135  vtkGetMacro( DistanceOffset, double );
137 
139 
142  vtkSetMacro( SnapToClosestPoint, int );
143  vtkGetMacro( SnapToClosestPoint, int );
144  vtkBooleanMacro( SnapToClosestPoint, int );
146 
147 //BTX
149 
151  Node *GetNodeAtWorldPosition( double worldPos[3] );
152 //ETX
154 
155 protected:
158 
159  // The props that represents the terrain data (one or more) in a rendered
160  // scene
163  vtkPolygonalSurfacePointPlacerInternals *Internals;
166 
167 private:
169  void operator=(const vtkPolygonalSurfacePointPlacer&); //Not implemented
170 };
171 
172 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
virtual void RemoveAllProps()
vtkPolygonalSurfacePointPlacerNode Node
virtual int ValidateDisplayPosition(vtkRenderer *, double displayPos[2])
vtkPolygonalSurfacePointPlacerInternals * Internals
abstract specification for renderers
Definition: vtkRenderer.h:63
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
virtual int ValidateWorldPosition(double worldPos[3])
#define VTKINTERACTIONWIDGETS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
Base class to place points given constraints on polygonal data.
virtual void AddProp(vtkProp *)
static vtkPolyDataPointPlacer * New()
virtual int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId)
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:68
virtual void RemoveViewProp(vtkProp *prop)
maintain a list of polygonal data objects
virtual int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9])