VTK  9.0.20201030
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) 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  vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
84 
91  int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
92  double worldPos[3], double worldOrient[9]) override;
93 
98  int ValidateWorldPosition(double worldPos[3]) override;
99 
103  int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]) override;
104 
109  int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
110 
112 
115  vtkGetObjectMacro(CellPicker, vtkCellPicker);
117 
119 
125  vtkSetMacro(Mode, int);
126  vtkGetMacro(Mode, int);
128 
129  enum
130  {
131  ParametricCenter = 0,
133  None
134  };
135 
136 protected:
138  ~vtkCellCentersPointPlacer() override;
139 
140  // The props that represents the terrain data (one or more) in a rendered
141  // scene
144  int Mode;
145 
146 private:
148  void operator=(const vtkCellCentersPointPlacer&) = delete;
149 };
150 
151 #endif
vtkCellCentersPointPlacer
Snaps points at the center of a cell.
Definition: vtkCellCentersPointPlacer.h:49
vtkPointPlacer
Abstract interface to translate 2D display positions to world coordinates.
Definition: vtkPointPlacer.h:49
vtkPointPlacer::ValidateDisplayPosition
virtual int ValidateDisplayPosition(vtkRenderer *, double displayPos[2])
Given a display position, check the validity of this position.
vtkCellCentersPointPlacer::CellPicker
vtkCellPicker * CellPicker
Definition: vtkCellCentersPointPlacer.h:143
vtkCellCentersPointPlacer::PickProps
vtkPropCollection * PickProps
Definition: vtkCellCentersPointPlacer.h:142
vtkPointPlacer::New
static vtkPointPlacer * New()
Instantiate this class.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:56
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:67
vtkCellCentersPointPlacer::Mode
int Mode
Definition: vtkCellCentersPointPlacer.h:144
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...
vtkCellCentersPointPlacer::CellPointsMean
Definition: vtkCellCentersPointPlacer.h:132
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:35
vtkCellPicker
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:66
vtkPointPlacer.h
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...
vtkPointPlacer::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.