VTK
vtkPointPlacer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPointPlacer.h,v
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 =========================================================================*/
41 #ifndef vtkPointPlacer_h
42 #define vtkPointPlacer_h
43 
44 #include "vtkInteractionWidgetsModule.h" // For export macro
45 #include "vtkObject.h"
46 
47 class vtkRenderer;
48 
49 class VTKINTERACTIONWIDGETS_EXPORT vtkPointPlacer : public vtkObject
50 {
51 public:
55  static vtkPointPlacer *New();
56 
58 
61  vtkTypeMacro(vtkPointPlacer,vtkObject);
62  void PrintSelf(ostream& os, vtkIndent indent);
64 
72  virtual int ComputeWorldPosition( vtkRenderer *ren,
73  double displayPos[2],
74  double worldPos[3],
75  double worldOrient[9] );
76 
84  virtual int ComputeWorldPosition( vtkRenderer *ren,
85  double displayPos[2],
86  double refWorldPos[3],
87  double worldPos[3],
88  double worldOrient[9] );
89 
94  virtual int ValidateWorldPosition( double worldPos[3] );
95 
99  virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] );
100 
105  virtual int ValidateWorldPosition( double worldPos[3],
106  double worldOrient[9] );
107 
119  virtual int UpdateWorldPosition( vtkRenderer *ren,
120  double worldPos[3],
121  double worldOrient[9] );
122 
132  double worldPos[3], vtkIdType nodePointId);
133 
138  virtual int UpdateInternalState() {return 0;}
139 
141 
145  vtkSetClampMacro(PixelTolerance,int,1,100);
146  vtkGetMacro(PixelTolerance,int);
148 
150 
154  vtkSetClampMacro(WorldTolerance, double, 0.0, VTK_DOUBLE_MAX);
155  vtkGetMacro(WorldTolerance, double);
157 
158 protected:
161 
164 
165 private:
166  vtkPointPlacer(const vtkPointPlacer&) VTK_DELETE_FUNCTION;
167  void operator=(const vtkPointPlacer&) VTK_DELETE_FUNCTION;
168 };
169 
170 #endif
171 
172 
173 
174 
175 
vtkPointPlacer::WorldTolerance
double WorldTolerance
Definition: vtkPointPlacer.h:163
vtkPointPlacer
Abstract interface to translate 2D display positions to world coordinates.
Definition: vtkPointPlacer.h:50
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkPointPlacer::ValidateDisplayPosition
virtual int ValidateDisplayPosition(vtkRenderer *, double displayPos[2])
Given a display position, check the validity of this position.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkPointPlacer::vtkPointPlacer
vtkPointPlacer()
vtkPointPlacer::ValidateWorldPosition
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...
vtkPointPlacer::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkPointPlacer::New
static vtkPointPlacer * New()
Instantiate this class.
vtkPointPlacer::UpdateInternalState
virtual int UpdateInternalState()
Called by the representation to give the placer a chance to update itself.
Definition: vtkPointPlacer.h:138
vtkPointPlacer::~vtkPointPlacer
~vtkPointPlacer()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkObject.h
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkPointPlacer::ComputeWorldPosition
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 ...
vtkPointPlacer::PixelTolerance
int PixelTolerance
Definition: vtkPointPlacer.h:162
vtkPointPlacer::ComputeWorldPosition
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...
vtkPointPlacer::UpdateNodeWorldPosition
virtual int UpdateNodeWorldPosition(double worldPos[3], vtkIdType nodePointId)
Give the placer a chance to update the node information, if any.
vtkPointPlacer::ValidateWorldPosition
virtual int ValidateWorldPosition(double worldPos[3])
Given a world position check the validity of this position according to the constraints of the placer...
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163
vtkPointPlacer::UpdateWorldPosition
virtual int UpdateWorldPosition(vtkRenderer *ren, double worldPos[3], double worldOrient[9])
Given a current renderer, world position and orientation, update them according to the constraints of...