ParaView
vtkPVRayCastPickingHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPVRayCastPickingHelper.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 =========================================================================*/
22 #ifndef vtkPVRayCastPickingHelper_h
23 #define vtkPVRayCastPickingHelper_h
24 
25 #include "vtkObject.h"
26 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
27 class vtkAlgorithm;
28 class vtkDataSet;
29 
30 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkPVRayCastPickingHelper : public vtkObject
31 {
32 public:
33  static vtkPVRayCastPickingHelper* New();
34  vtkTypeMacro(vtkPVRayCastPickingHelper, vtkObject);
35  void PrintSelf(ostream& os, vtkIndent indent);
36 
40  void SetInput(vtkAlgorithm*);
41 
45  void SetSelection(vtkAlgorithm*);
46 
48 
51  vtkSetVector3Macro(PointA, double);
52  vtkGetVector3Macro(PointA, double);
54 
56 
59  vtkSetVector3Macro(PointB, double);
60  vtkGetVector3Macro(PointB, double);
62 
64 
67  vtkSetMacro(SnapOnMeshPoint, bool);
68  vtkGetMacro(SnapOnMeshPoint, bool);
70 
74  void ComputeIntersection();
75 
76  // Descritpion:
77  // Provide access to the resulting intersection
78  vtkGetVector3Macro(Intersection, double);
79 
80 protected:
83 
87  void ComputeIntersectionFromDataSet(vtkDataSet* ds);
88 
89  double Intersection[3];
90  double PointA[3];
91  double PointB[3];
93  vtkAlgorithm* Input;
94  vtkAlgorithm* Selection;
95 
96 private:
97  vtkPVRayCastPickingHelper(const vtkPVRayCastPickingHelper&) VTK_DELETE_FUNCTION;
98  void operator=(const vtkPVRayCastPickingHelper&) VTK_DELETE_FUNCTION;
99 };
100 
101 #endif
helper class that used selection and ray casting to find the intersection point between the user pick...