VTK  9.3.20240328
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;
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;
90 
91 protected:
94 
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
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:150
provides thread-safe access to cells
a simple class to control print indentation
Definition: vtkIndent.h:108
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:180
an ordered list of Props
Abstract class that serves as a representation for vtkTensorProbeWidget.
void FindClosestPointOnPolyline(double displayPos[2], double closestWorldPos[3], vtkIdType &cellId, int maxSpeed=10)
~vtkTensorProbeRepresentation() override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
void BuildRepresentation() override
See vtkWidgetRepresentation for details.
virtual void SetTrajectory(vtkPolyData *)
Set the trajectory that we are trying to probe tensors on.
virtual int Move(double motionVector[2])
INTERNAL - Do not use This method is invoked by the widget during user interaction.
void ReleaseGraphicsResources(vtkWindow *) override
See vtkProp for details.
void GetActors(vtkPropCollection *) override
See vtkProp for details.
int RenderOpaqueGeometry(vtkViewport *) override
See vtkWidgetRepresentation for details.
virtual int SelectProbe(int pos[2])=0
This method is invoked by the widget during user interaction.
void Initialize()
Set the probe position to a reasonable location on the trajectory.
abstract specification for Viewports
Definition: vtkViewport.h:64
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition: vtkWindow.h:47
int vtkIdType
Definition: vtkType.h:315