VTK  9.3.1
vtkTensorProbeRepresentation.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
19 #ifndef vtkTensorProbeRepresentation_h
20 #define vtkTensorProbeRepresentation_h
21 
22 #include "vtkInteractionWidgetsModule.h" // For export macro
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class vtkActor;
27 class vtkPolyData;
28 class vtkPolyDataMapper;
29 class vtkGenericCell;
30 
31 class VTKINTERACTIONWIDGETS_EXPORT vtkTensorProbeRepresentation : public vtkWidgetRepresentation
32 {
33 public:
35 
39  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
46  void BuildRepresentation() override;
47  int RenderOpaqueGeometry(vtkViewport*) override;
49 
51 
54  vtkSetVector3Macro(ProbePosition, double);
55  vtkGetVector3Macro(ProbePosition, double);
56  vtkSetMacro(ProbeCellId, vtkIdType);
57  vtkGetMacro(ProbeCellId, vtkIdType);
59 
63  virtual void SetTrajectory(vtkPolyData*);
64 
68  void Initialize();
69 
74  virtual int SelectProbe(int pos[2]) = 0;
75 
81  virtual int Move(double motionVector[2]);
82 
84 
87  void GetActors(vtkPropCollection*) override;
88  void ReleaseGraphicsResources(vtkWindow*) override;
90 
91 protected:
93  ~vtkTensorProbeRepresentation() override;
94 
95  void FindClosestPointOnPolyline(
96  double displayPos[2], double closestWorldPos[3], vtkIdType& cellId, int maxSpeed = 10);
97 
101  double ProbePosition[3];
103 
104 private:
106  void operator=(const vtkTensorProbeRepresentation&) = delete;
107 };
108 
109 VTK_ABI_NAMESPACE_END
110 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:40
Abstract class that serves as a representation for vtkTensorProbeWidget.
abstract specification for Viewports
Definition: vtkViewport.h:44
int vtkIdType
Definition: vtkType.h:315
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
abstract class defines interface between the widget and widget representation classes ...
virtual void BuildRepresentation()=0
Subclasses of vtkWidgetRepresentation must implement these methods.
provides thread-safe access to cells
an ordered list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
a simple class to control print indentation
Definition: vtkIndent.h:28
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
map vtkPolyData to graphics primitives
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes...