VTK: Interaction/Widgets/vtkTensorProbeRepresentation.h Source File

| 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
23 #include "vtkWidgetRepresentation.h"
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
38 vtkTypeMacro(vtkTensorProbeRepresentation, vtkWidgetRepresentation);
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:
92 vtkTensorProbeRepresentation();
93 ~vtkTensorProbeRepresentation() override;
94
95 void FindClosestPointOnPolyline(
96 double displayPos[2], double closestWorldPos[3], vtkIdType& cellId, int maxSpeed = 10);
97
98 vtkActor* TrajectoryActor;
99 vtkPolyDataMapper* TrajectoryMapper;
100 vtkPolyData* Trajectory;
101 double ProbePosition[3];
102 vtkIdType ProbeCellId;
103
104 private:
105 vtkTensorProbeRepresentation(const vtkTensorProbeRepresentation&) = delete;
106 void operator=(const vtkTensorProbeRepresentation&) = delete;
107 };
108
109 VTK_ABI_NAMESPACE_END
110 #endif
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:42
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:37
vtkTensorProbeRepresentation
Abstract class that serves as a representation for vtkTensorProbeWidget.
Definition: vtkTensorProbeRepresentation.h:32
vtkTensorProbeRepresentation::FindClosestPointOnPolyline
void FindClosestPointOnPolyline(double displayPos[2], double closestWorldPos[3], vtkIdType &cellId, int maxSpeed=10)
vtkTensorProbeRepresentation::~vtkTensorProbeRepresentation
~vtkTensorProbeRepresentation() override
vtkTensorProbeRepresentation::Trajectory
vtkPolyData * Trajectory
Definition: vtkTensorProbeRepresentation.h:100
vtkTensorProbeRepresentation::TrajectoryMapper
vtkPolyDataMapper * TrajectoryMapper
Definition: vtkTensorProbeRepresentation.h:99
vtkTensorProbeRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
vtkTensorProbeRepresentation::BuildRepresentation
void BuildRepresentation() override
See vtkWidgetRepresentation for details.
vtkTensorProbeRepresentation::ProbeCellId
vtkIdType ProbeCellId
Definition: vtkTensorProbeRepresentation.h:102
vtkTensorProbeRepresentation::SetTrajectory
virtual void SetTrajectory(vtkPolyData *)
Set the trajectory that we are trying to probe tensors on.
vtkTensorProbeRepresentation::Move
virtual int Move(double motionVector[2])
INTERNAL - Do not use This method is invoked by the widget during user interaction.
vtkTensorProbeRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
See vtkProp for details.
vtkTensorProbeRepresentation::GetActors
void GetActors(vtkPropCollection *) override
See vtkProp for details.
vtkTensorProbeRepresentation::TrajectoryActor
vtkActor * TrajectoryActor
Definition: vtkTensorProbeRepresentation.h:98
vtkTensorProbeRepresentation::vtkTensorProbeRepresentation
vtkTensorProbeRepresentation()
vtkTensorProbeRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *) override
See vtkWidgetRepresentation for details.
vtkTensorProbeRepresentation::SelectProbe
virtual int SelectProbe(int pos[2])=0
This method is invoked by the widget during user interaction.
vtkTensorProbeRepresentation::Initialize
void Initialize()
Set the probe position to a reasonable location on the trajectory.
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:54
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:65
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkIdType
int vtkIdType
Definition: vtkType.h:315
vtkWidgetRepresentation.h