VTK  9.0.1
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 =========================================================================*/
37 #ifndef vtkTerrainDataPointPlacer_h
38 #define vtkTerrainDataPointPlacer_h
39 
40 #include "vtkInteractionWidgetsModule.h" // For export macro
41 #include "vtkPointPlacer.h"
42 
43 class vtkPropCollection;
44 class vtkProp;
45 class vtkPropPicker;
46 
47 class VTKINTERACTIONWIDGETS_EXPORT vtkTerrainDataPointPlacer : public vtkPointPlacer
48 {
49 public:
54 
56 
60  void PrintSelf(ostream& os, vtkIndent indent) override;
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 RemoveAllProps();
68 
70 
76  vtkSetMacro(HeightOffset, double);
77  vtkGetMacro(HeightOffset, double);
79 
89  vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
90 
97  int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
98  double worldPos[3], double worldOrient[9]) override;
99 
104  int ValidateWorldPosition(double worldPos[3]) override;
105 
109  int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]) override;
110 
115  int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
116 
118 
121  vtkGetObjectMacro(PropPicker, vtkPropPicker);
123 
124 protected:
126  ~vtkTerrainDataPointPlacer() override;
127 
128  // The props that represents the terrain data (one or more) in a rendered
129  // scene
132  double HeightOffset;
133 
134 private:
136  void operator=(const vtkTerrainDataPointPlacer&) = delete;
137 };
138 
139 #endif
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.
vtkTerrainDataPointPlacer::TerrainProps
vtkPropCollection * TerrainProps
Definition: vtkTerrainDataPointPlacer.h:130
vtkPointPlacer::New
static vtkPointPlacer * New()
Instantiate this class.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkPropPicker
pick an actor/prop using graphics hardware
Definition: vtkPropPicker.h:45
vtkTerrainDataPointPlacer
Place points on terrain data.
Definition: vtkTerrainDataPointPlacer.h:47
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:53
vtkTerrainDataPointPlacer::HeightOffset
double HeightOffset
Definition: vtkTerrainDataPointPlacer.h:132
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:67
vtkTerrainDataPointPlacer::PropPicker
vtkPropPicker * PropPicker
Definition: vtkTerrainDataPointPlacer.h:131
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...
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:35
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.