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 =========================================================================*/
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 * );
76 
86  double displayPos[2],
87  double worldPos[3],
88  double worldOrient[9] ) override;
89 
97  double displayPos[2],
98  double refWorldPos[3],
99  double worldPos[3],
100  double worldOrient[9] ) override;
101 
106  int ValidateWorldPosition( double worldPos[3] ) override;
107 
111  int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] ) override;
112 
117  int ValidateWorldPosition( double worldPos[3],
118  double worldOrient[9] ) override;
119 
121 
124  vtkGetObjectMacro( CellPicker, vtkCellPicker );
126 
128 
134  vtkSetMacro( Mode, int );
135  vtkGetMacro( Mode, int );
137 
138  enum
139  {
140  ParametricCenter = 0,
142  None
143  };
144 
145 protected:
148 
149  // The props that represents the terrain data (one or more) in a rendered
150  // scene
153  int Mode;
154 
155 private:
157  void operator=(const vtkCellCentersPointPlacer&) = delete;
158 };
159 
160 #endif
vtkCellCentersPointPlacer::ValidateWorldPosition
int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override
Given a world position and a world orientation, validate it according to the constraints of the place...
vtkCellCentersPointPlacer
Snaps points at the center of a cell.
Definition: vtkCellCentersPointPlacer.h:53
vtkPointPlacer
Abstract interface to translate 2D display positions to world coordinates.
Definition: vtkPointPlacer.h:50
vtkCellCentersPointPlacer::vtkCellCentersPointPlacer
vtkCellCentersPointPlacer()
vtkCellCentersPointPlacer::ValidateWorldPosition
int ValidateWorldPosition(double worldPos[3]) override
Given a world position check the validity of this position according to the constraints of the placer...
vtkCellCentersPointPlacer::CellPicker
vtkCellPicker * CellPicker
Definition: vtkCellCentersPointPlacer.h:152
vtkCellCentersPointPlacer::HasProp
int HasProp(vtkProp *)
vtkCellCentersPointPlacer::~vtkCellCentersPointPlacer
~vtkCellCentersPointPlacer() override
vtkCellCentersPointPlacer::RemoveAllProps
virtual void RemoveAllProps()
vtkCellCentersPointPlacer::GetNumberOfProps
int GetNumberOfProps()
vtkCellCentersPointPlacer::ComputeWorldPosition
int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double refWorldPos[3], double worldPos[3], double worldOrient[9]) override
Given a renderer, a display position, and a reference world position, compute the new world position ...
vtkCellCentersPointPlacer::PickProps
vtkPropCollection * PickProps
Definition: vtkCellCentersPointPlacer.h:151
vtkCellCentersPointPlacer::ComputeWorldPosition
int ComputeWorldPosition(vtkRenderer *ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override
Given a renderer and a display position in pixel coordinates, compute the world position and orientat...
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkCellCentersPointPlacer::AddProp
virtual void AddProp(vtkProp *)
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:53
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkCellCentersPointPlacer::Mode
int Mode
Definition: vtkCellCentersPointPlacer.h:153
vtkCellCentersPointPlacer::New
static vtkCellCentersPointPlacer * New()
Instantiate this class.
vtkCellCentersPointPlacer::ValidateDisplayPosition
int ValidateDisplayPosition(vtkRenderer *, double displayPos[2]) override
Given a display position, check the validity of this position.
vtkCellCentersPointPlacer::RemoveViewProp
virtual void RemoveViewProp(vtkProp *prop)
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:42
vtkCellPicker
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:70
vtkPointPlacer.h
vtkCellCentersPointPlacer::CellPointsMean
@ CellPointsMean
Definition: vtkCellCentersPointPlacer.h:141
vtkCellCentersPointPlacer::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.