VTK  9.2.6
vtkTerrainDataPointPlacer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTerrainDataPointPlacer.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 vtkTerrainDataPointPlacer_h
41 #define vtkTerrainDataPointPlacer_h
42 
43 #include "vtkInteractionWidgetsModule.h" // For export macro
44 #include "vtkPointPlacer.h"
45 
46 class vtkPropCollection;
47 class vtkProp;
48 class vtkPropPicker;
49 
50 class VTKINTERACTIONWIDGETS_EXPORT vtkTerrainDataPointPlacer : public vtkPointPlacer
51 {
52 public:
57 
59 
63  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
66  // Descuription:
67  // Add an actor (that represents a terrain in a rendererd scene) to the
68  // list. Only props in this list are considered by the PointPlacer
69  virtual void AddProp(vtkProp*);
70  virtual void RemoveAllProps();
71 
73 
79  vtkSetMacro(HeightOffset, double);
80  vtkGetMacro(HeightOffset, double);
82 
92  vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
93 
100  int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
101  double worldPos[3], double worldOrient[9]) override;
102 
107  int ValidateWorldPosition(double worldPos[3]) override;
108 
112  int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]) override;
113 
118  int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
119 
121 
124  vtkGetObjectMacro(PropPicker, vtkPropPicker);
126 
127 protected:
129  ~vtkTerrainDataPointPlacer() override;
130 
131  // The props that represents the terrain data (one or more) in a rendered
132  // scene
135  double HeightOffset;
136 
137 private:
139  void operator=(const vtkTerrainDataPointPlacer&) = delete;
140 };
141 
142 #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...
pick an actor/prop using graphics hardware
Definition: vtkPropPicker.h:45
abstract specification for renderers
Definition: vtkRenderer.h:72
Place points on terrain data.
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.