VTK  9.0.20201030
vtkTensorProbeRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTensorProbeRepresentation.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkTensorProbeRepresentation_h
29 #define vtkTensorProbeRepresentation_h
30 
31 #include "vtkInteractionWidgetsModule.h" // For export macro
33 
34 class vtkActor;
35 class vtkPolyData;
36 class vtkPolyDataMapper;
37 class vtkGenericCell;
38 
39 class VTKINTERACTIONWIDGETS_EXPORT vtkTensorProbeRepresentation : public vtkWidgetRepresentation
40 {
41 public:
43 
47  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
54  void BuildRepresentation() override;
55  int RenderOpaqueGeometry(vtkViewport*) override;
57 
59 
62  vtkSetVector3Macro(ProbePosition, double);
63  vtkGetVector3Macro(ProbePosition, double);
64  vtkSetMacro(ProbeCellId, vtkIdType);
65  vtkGetMacro(ProbeCellId, vtkIdType);
67 
71  virtual void SetTrajectory(vtkPolyData*);
72 
76  void Initialize();
77 
82  virtual int SelectProbe(int pos[2]) = 0;
83 
89  virtual int Move(double motionVector[2]);
90 
92 
95  void GetActors(vtkPropCollection*) override;
96  void ReleaseGraphicsResources(vtkWindow*) override;
98 
99 protected:
101  ~vtkTensorProbeRepresentation() override;
102 
103  void FindClosestPointOnPolyline(
104  double displayPos[2], double closestWorldPos[3], vtkIdType& cellId, int maxSpeed = 10);
105 
109  double ProbePosition[3];
111 
112 private:
114  void operator=(const vtkTensorProbeRepresentation&) = delete;
115 };
116 
117 #endif
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:36
vtkWidgetRepresentation.h
vtkWidgetRepresentation::GetActors
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
Definition: vtkWidgetRepresentation.h:210
vtkTensorProbeRepresentation
Abstract class that serves as a representation for vtkTensorProbeWidget.
Definition: vtkTensorProbeRepresentation.h:39
vtkTensorProbeRepresentation::TrajectoryMapper
vtkPolyDataMapper * TrajectoryMapper
Definition: vtkTensorProbeRepresentation.h:107
vtkIdType
int vtkIdType
Definition: vtkType.h:330
vtkTensorProbeRepresentation::TrajectoryActor
vtkActor * TrajectoryActor
Definition: vtkTensorProbeRepresentation.h:106
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:59
vtkWidgetRepresentation::BuildRepresentation
virtual void BuildRepresentation()=0
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkWidgetRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkWidgetRepresentation.h:213
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkTensorProbeRepresentation::Trajectory
vtkPolyData * Trajectory
Definition: vtkTensorProbeRepresentation.h:108
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkWidgetRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:215
vtkTensorProbeRepresentation::ProbeCellId
vtkIdType ProbeCellId
Definition: vtkTensorProbeRepresentation.h:110
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:36
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:35
vtkWidgetRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.