VTK  9.2.6
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 =========================================================================*/
41 #ifndef vtkCellCentersPointPlacer_h
42 #define vtkCellCentersPointPlacer_h
43 
44 #include "vtkInteractionWidgetsModule.h" // For export macro
45 #include "vtkPointPlacer.h"
46 
47 class vtkRenderer;
48 class vtkPropCollection;
49 class vtkProp;
50 class vtkCellPicker;
51 
52 class VTKINTERACTIONWIDGETS_EXPORT vtkCellCentersPointPlacer : public vtkPointPlacer
53 {
54 public:
59 
61 
65  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
68  // Descuription:
69  // Add an actor (that represents a terrain in a rendererd scene) to the
70  // list. Only props in this list are considered by the PointPlacer
71  virtual void AddProp(vtkProp*);
72  virtual void RemoveViewProp(vtkProp* prop);
73  virtual void RemoveAllProps();
74  int HasProp(vtkProp*);
75  int GetNumberOfProps();
76 
86  vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
87 
94  int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
95  double worldPos[3], double worldOrient[9]) override;
96 
101  int ValidateWorldPosition(double worldPos[3]) override;
102 
106  int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]) override;
107 
112  int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
113 
115 
118  vtkGetObjectMacro(CellPicker, vtkCellPicker);
120 
122 
128  vtkSetMacro(Mode, int);
129  vtkGetMacro(Mode, int);
131 
132  enum
133  {
134  ParametricCenter = 0,
136  None
137  };
138 
139 protected:
141  ~vtkCellCentersPointPlacer() override;
142 
143  // The props that represents the terrain data (one or more) in a rendered
144  // scene
147  int Mode;
148 
149 private:
151  void operator=(const vtkCellCentersPointPlacer&) = delete;
152 };
153 
154 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:56
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:72
Snaps points at the center of a cell.
an ordered list of Props
a simple class to control print indentation
Definition: vtkIndent.h:39
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.
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:72
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.