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=========================================================================*/
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).
50{
51 double WorldPosition[3];
55 double ParametricCoords[3]; // parametric coords within cell
57};
58
59class VTKINTERACTIONWIDGETS_EXPORT vtkPolygonalSurfacePointPlacer
61{
62public:
67
69
73 void PrintSelf(ostream& os, vtkIndent indent);
75
76 // Descuription:
77 // Add /remove a prop, to place points on
78 virtual void AddProp( vtkProp * );
79 virtual void RemoveViewProp(vtkProp *prop);
80 virtual void RemoveAllProps();
81
91 double displayPos[2],
92 double worldPos[3],
93 double worldOrient[9] );
94
102 double displayPos[2],
103 double refWorldPos[3],
104 double worldPos[3],
105 double worldOrient[9] );
106
111 virtual int ValidateWorldPosition( double worldPos[3] );
112
116 virtual int UpdateNodeWorldPosition( double worldPos[3],
117 vtkIdType nodePointId );
118
122 virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] );
123
128 virtual int ValidateWorldPosition( double worldPos[3],
129 double worldOrient[9] );
130
132
135 vtkGetObjectMacro( CellPicker, vtkCellPicker );
137
139
143 vtkGetObjectMacro( Polys, vtkPolyDataCollection );
145
147
152 vtkSetMacro( DistanceOffset, double );
153 vtkGetMacro( DistanceOffset, double );
155
157
163 vtkSetMacro( SnapToClosestPoint, int );
164 vtkGetMacro( SnapToClosestPoint, int );
165 vtkBooleanMacro( SnapToClosestPoint, int );
167
169
173 Node *GetNodeAtWorldPosition( double worldPos[3] );
175
176protected:
179
180 // The props that represents the terrain data (one or more) in a rendered
181 // scene
184 vtkPolygonalSurfacePointPlacerInternals *Internals;
187
188private:
190 void operator=(const vtkPolygonalSurfacePointPlacer&) VTK_DELETE_FUNCTION;
191};
192
193#endif
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:70
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:86
Place points on the surface of polygonal data.
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 ...
vtkPolygonalSurfacePointPlacerNode Node
Internally used by the interpolator.
static vtkPolygonalSurfacePointPlacer * New()
Instantiate this class.
virtual int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId)
Give the node a chance to update its auxiliary point id.
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...
Node * GetNodeAtWorldPosition(double worldPos[3])
virtual void RemoveViewProp(vtkProp *prop)
vtkPolygonalSurfacePointPlacerInternals * Internals
virtual void AddProp(vtkProp *)
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 ValidateDisplayPosition(vtkRenderer *, double displayPos[2])
Given a display position, check the validity of this position.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int ValidateWorldPosition(double worldPos[3])
Given a world position check the validity of this position according to the constraints of the placer...
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287