VTK  9.3.1
vtkPolyDataPointPlacer.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
22 #ifndef vtkPolyDataPointPlacer_h
23 #define vtkPolyDataPointPlacer_h
24 
25 #include "vtkInteractionWidgetsModule.h" // For export macro
26 #include "vtkPointPlacer.h"
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkRenderer;
30 class vtkPropCollection;
31 class vtkProp;
32 class vtkPropPicker;
33 
34 class VTKINTERACTIONWIDGETS_EXPORT vtkPolyDataPointPlacer : public vtkPointPlacer
35 {
36 public:
40  static vtkPolyDataPointPlacer* New();
41 
43 
47  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
50  // Description:
51  // Add an actor (that represents a terrain in a rendered scene) to the
52  // list. Only props in this list are considered by the PointPlacer
53  virtual void AddProp(vtkProp*);
54  virtual void RemoveViewProp(vtkProp* prop);
55  virtual void RemoveAllProps();
56  vtkTypeBool HasProp(vtkProp*);
57  int GetNumberOfProps();
58 
68  vtkRenderer* ren, double displayPos[2], double worldPos[3], double worldOrient[9]) override;
69 
76  int ComputeWorldPosition(vtkRenderer* ren, double displayPos[2], double refWorldPos[3],
77  double worldPos[3], double worldOrient[9]) override;
78 
83  int ValidateWorldPosition(double worldPos[3]) override;
84 
88  int ValidateDisplayPosition(vtkRenderer*, double displayPos[2]) override;
89 
94  int ValidateWorldPosition(double worldPos[3], double worldOrient[9]) override;
95 
97 
100  vtkGetObjectMacro(PropPicker, vtkPropPicker);
102 
103 protected:
105  ~vtkPolyDataPointPlacer() override;
106 
107  // The props that represents the terrain data (one or more) in a rendered
108  // scene
111 
112 private:
114  void operator=(const vtkPolyDataPointPlacer&) = delete;
115 };
116 
117 VTK_ABI_NAMESPACE_END
118 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:45
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:34
abstract specification for renderers
Definition: vtkRenderer.h:61
an ordered list of Props
int vtkTypeBool
Definition: vtkABI.h:64
vtkPropCollection * SurfaceProps
a simple class to control print indentation
Definition: vtkIndent.h:28
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.
Base class to place points given constraints on polygonal data.
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.