VTK
vtkImplicitPolyDataDistance.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImplicitPolyDataDistance.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 =========================================================================*/
39 #ifndef vtkImplicitPolyDataDistance_h
40 #define vtkImplicitPolyDataDistance_h
41 
42 #include "vtkFiltersCoreModule.h" // For export macro
43 #include "vtkImplicitFunction.h"
44 
45 class vtkCellLocator;
46 class vtkPolyData;
47 
48 class VTKFILTERSCORE_EXPORT vtkImplicitPolyDataDistance : public vtkImplicitFunction
49 {
50 public:
53  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
54 
58  vtkMTimeType GetMTime() VTK_OVERRIDE;
59 
63  using vtkImplicitFunction::EvaluateFunction;
64  double EvaluateFunction(double x[3]) VTK_OVERRIDE;
65 
69  void EvaluateGradient(double x[3], double g[3]) VTK_OVERRIDE;
70 
74  double EvaluateFunctionAndGetClosestPoint (double x[3], double closestPoint[3]);
75 
82  void SetInput(vtkPolyData *input);
83 
85 
89  vtkSetMacro(NoValue, double);
90  vtkGetMacro(NoValue, double);
92 
94 
98  vtkSetVector3Macro(NoGradient, double);
99  vtkGetVector3Macro(NoGradient, double);
101 
103 
107  vtkSetVector3Macro(NoClosestPoint, double);
108  vtkGetVector3Macro(NoClosestPoint, double);
110 
112 
115  vtkGetMacro(Tolerance, double);
116  vtkSetMacro(Tolerance, double);
118 
119 protected:
121  ~vtkImplicitPolyDataDistance() VTK_OVERRIDE;
122 
126  void CreateDefaultLocator(void);
127 
128  double SharedEvaluate(double x[3], double g[3], double p[3]);
129 
130  double NoGradient[3];
131  double NoClosestPoint[3];
132  double NoValue;
133  double Tolerance;
134 
135  vtkPolyData *Input;
136  vtkCellLocator *Locator;
137 
138 private:
139  vtkImplicitPolyDataDistance(const vtkImplicitPolyDataDistance&) VTK_DELETE_FUNCTION;
140  void operator=(const vtkImplicitPolyDataDistance&) VTK_DELETE_FUNCTION;
141 };
142 
143 #endif
abstract interface for implicit functions
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
octree-based spatial search object to quickly locate cells
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMTimeType GetMTime() override
Overload standard modified time function.
Implicit function that computes the distance from a point x to the nearest point p on an input vtkPol...
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.