VTK  9.3.20240418
vtkTerrainDataPointPlacer.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
28 #ifndef vtkTerrainDataPointPlacer_h
29 #define vtkTerrainDataPointPlacer_h
30 
31 #include "vtkInteractionWidgetsModule.h" // For export macro
32 #include "vtkPointPlacer.h"
33 
34 VTK_ABI_NAMESPACE_BEGIN
35 class vtkPropCollection;
36 class vtkProp;
37 class vtkPropPicker;
38 
39 class VTKINTERACTIONWIDGETS_EXPORT vtkTerrainDataPointPlacer : public vtkPointPlacer
40 {
41 public:
46 
48 
52  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
55  // Description:
56  // Add an actor (that represents a terrain in a rendered scene) to the
57  // list. Only props in this list are considered by the PointPlacer
58  virtual void AddProp(vtkProp*);
59  virtual void RemoveAllProps();
60 
62 
68  vtkSetMacro(HeightOffset, double);
69  vtkGetMacro(HeightOffset, double);
71 
81  vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
82 
89  int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
90  double worldPos[3], double worldOrient[9]) override;
91 
96  int ValidateWorldPosition(double worldPos[3]) override;
97 
101  int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]) override;
102 
107  int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
108 
110 
113  vtkGetObjectMacro(PropPicker, vtkPropPicker);
115 
116 protected:
119 
120  // The props that represents the terrain data (one or more) in a rendered
121  // scene
124  double HeightOffset;
125 
126 private:
128  void operator=(const vtkTerrainDataPointPlacer&) = delete;
129 };
130 
131 VTK_ABI_NAMESPACE_END
132 #endif
a simple class to control print indentation
Definition: vtkIndent.h:108
Abstract interface to translate 2D display positions to world coordinates.
an ordered list of Props
pick an actor/prop using graphics hardware
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:66
abstract specification for renderers
Definition: vtkRenderer.h:172
Place points on terrain data.
static vtkTerrainDataPointPlacer * New()
Instantiate this class.
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 ...
virtual void RemoveAllProps()
int ValidateDisplayPosition(vtkRenderer *, double displayPos[2]) override
Given a display position, check the validity of this position.
int ValidateWorldPosition(double worldPos[3]) override
Given a world position check the validity of this position according to the constraints of the placer...
virtual void AddProp(vtkProp *)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
~vtkTerrainDataPointPlacer() override
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...
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...