VTK
vtkCellCentersPointPlacer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCellCentersPointPlacer.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 =========================================================================*/
38 #ifndef vtkCellCentersPointPlacer_h
39 #define vtkCellCentersPointPlacer_h
40 
41 #include "vtkInteractionWidgetsModule.h" // For export macro
42 #include "vtkPointPlacer.h"
43 
44 class vtkRenderer;
45 class vtkPropCollection;
46 class vtkProp;
47 class vtkCellPicker;
48 
49 class VTKINTERACTIONWIDGETS_EXPORT vtkCellCentersPointPlacer : public vtkPointPlacer
50 {
51 public:
56 
58 
62  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
64 
65  // Descuription:
66  // Add an actor (that represents a terrain in a rendererd scene) to the
67  // list. Only props in this list are considered by the PointPlacer
68  virtual void AddProp( vtkProp * );
69  virtual void RemoveViewProp(vtkProp *prop);
70  virtual void RemoveAllProps();
71  int HasProp( vtkProp * );
72  int GetNumberOfProps();
73 
83  double displayPos[2],
84  double worldPos[3],
85  double worldOrient[9] ) VTK_OVERRIDE;
86 
94  double displayPos[2],
95  double refWorldPos[3],
96  double worldPos[3],
97  double worldOrient[9] ) VTK_OVERRIDE;
98 
103  int ValidateWorldPosition( double worldPos[3] ) VTK_OVERRIDE;
104 
108  int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] ) VTK_OVERRIDE;
109 
114  int ValidateWorldPosition( double worldPos[3],
115  double worldOrient[9] ) VTK_OVERRIDE;
116 
118 
121  vtkGetObjectMacro( CellPicker, vtkCellPicker );
123 
125 
131  vtkSetMacro( Mode, int );
132  vtkGetMacro( Mode, int );
134 
135  enum
136  {
137  ParametricCenter = 0,
139  None
140  };
141 
142 protected:
144  ~vtkCellCentersPointPlacer() VTK_OVERRIDE;
145 
146  // The props that represents the terrain data (one or more) in a rendered
147  // scene
148  vtkPropCollection *PickProps;
149  vtkCellPicker *CellPicker;
150  int Mode;
151 
152 private:
153  vtkCellCentersPointPlacer(const vtkCellCentersPointPlacer&) VTK_DELETE_FUNCTION;
154  void operator=(const vtkCellCentersPointPlacer&) VTK_DELETE_FUNCTION;
155 };
156 
157 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:44
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...
abstract specification for renderers
Definition: vtkRenderer.h:57
Snaps points at the center of a cell.
an ordered list of Props
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual int ValidateDisplayPosition(vtkRenderer *, double displayPos[2])
Given a display position, check the validity of this position.
Abstract interface to translate 2D display positions to world coordinates.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual int ValidateWorldPosition(double worldPos[3])
Given a world position check the validity of this position according to the constraints of the placer...
static vtkPointPlacer * New()
Instantiate this class.
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:63
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.