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 =========================================================================*/
40 #ifndef vtkCellCentersPointPlacer_h
41 #define vtkCellCentersPointPlacer_h
42 
43 #include "vtkInteractionWidgetsModule.h" // For export macro
44 #include "vtkPointPlacer.h"
45 
46 class vtkRenderer;
47 class vtkPropCollection;
48 class vtkProp;
49 class vtkCellPicker;
50 
52 {
53 public:
56 
58 
60  void PrintSelf(ostream& os, vtkIndent indent);
62 
63  // Descuription:
64  // Add an actor (that represents a terrain in a rendererd scene) to the
65  // list. Only props in this list are considered by the PointPlacer
66  virtual void AddProp( vtkProp * );
67  virtual void RemoveViewProp(vtkProp *prop);
68  virtual void RemoveAllProps();
69  int HasProp( vtkProp * );
70  int GetNumberOfProps();
71 
73 
78  virtual int ComputeWorldPosition( vtkRenderer *ren,
79  double displayPos[2],
80  double worldPos[3],
81  double worldOrient[9] );
83 
85 
88  virtual int ComputeWorldPosition( vtkRenderer *ren,
89  double displayPos[2],
90  double refWorldPos[3],
91  double worldPos[3],
92  double worldOrient[9] );
94 
97  virtual int ValidateWorldPosition( double worldPos[3] );
98 
100  virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] );
101 
103 
105  virtual int ValidateWorldPosition( double worldPos[3],
106  double worldOrient[9] );
108 
110 
111  vtkGetObjectMacro( CellPicker, vtkCellPicker );
113 
115 
119  vtkSetMacro( Mode, int );
120  vtkGetMacro( Mode, int );
122 
123  enum
124  {
125  ParametricCenter = 0,
127  None
128  };
129 
130 protected:
133 
134  // The props that represents the terrain data (one or more) in a rendered
135  // scene
138  int Mode;
139 
140 private:
141  vtkCellCentersPointPlacer(const vtkCellCentersPointPlacer&); //Not implemented
142  void operator=(const vtkCellCentersPointPlacer&); //Not implemented
143 };
144 
145 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
virtual int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9])
abstract specification for renderers
Definition: vtkRenderer.h:62
void PrintSelf(ostream &os, vtkIndent indent)
Snaps points at the center of a cell.
a list of Props
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int ValidateDisplayPosition(vtkRenderer *, double displayPos[2])
Abstract interface to translate 2D display positions to world coordinates.
virtual int ValidateWorldPosition(double worldPos[3])
static vtkPointPlacer * New()
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:68