vtkPVRayCastPickingHelper.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
3 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkPVRayCastPickingHelper_h
12 #define vtkPVRayCastPickingHelper_h
13 
14 #include "vtkObject.h"
15 #include "vtkRemotingViewsModule.h" //needed for exports
16 
17 class vtkAlgorithm;
18 class vtkCell;
19 class vtkDataSet;
20 
22 {
23 public:
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
31  void SetInput(vtkAlgorithm*);
32 
36  void SetSelection(vtkAlgorithm*);
37 
39 
42  vtkSetVector3Macro(PointA, double);
43  vtkGetVector3Macro(PointA, double);
45 
47 
50  vtkSetVector3Macro(PointB, double);
51  vtkGetVector3Macro(PointB, double);
53 
55 
58  vtkSetMacro(SnapOnMeshPoint, bool);
59  vtkGetMacro(SnapOnMeshPoint, bool);
61 
65  void ComputeIntersection();
66 
67  // Provide access to the resulting intersection
68  vtkGetVector3Macro(Intersection, double);
69 
70  // Provide access to the resulting intersection normal
71  vtkGetVector3Macro(IntersectionNormal, double);
72 
73 protected:
75  ~vtkPVRayCastPickingHelper() override;
76 
80  void ComputeIntersectionFromDataSet(vtkDataSet* ds);
81 
86  int ComputeSurfaceNormal(vtkDataSet* data, vtkCell* cell, int subId, double* weights);
87 
88  double Intersection[3];
89  double IntersectionNormal[3];
90  double PointA[3];
91  double PointB[3];
95 
96 private:
98  void operator=(const vtkPVRayCastPickingHelper&) = delete;
99 };
100 
101 #endif
#define VTKREMOTINGVIEWS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
helper class that used selection and ray casting to find the intersection point between the user pick...
static vtkObject * New()
void operator=(const vtkObjectBase &)