VTK  9.0.1
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) override;
54 
58  vtkMTimeType GetMTime() override;
59 
64  double EvaluateFunction(double x[3]) override;
65 
69  void EvaluateGradient(double x[3], double g[3]) override;
70 
75  double EvaluateFunctionAndGetClosestPoint(double x[3], double closestPoint[3]);
76 
83  void SetInput(vtkPolyData* input);
84 
86 
90  vtkSetMacro(NoValue, double);
91  vtkGetMacro(NoValue, double);
93 
95 
99  vtkSetVector3Macro(NoGradient, double);
100  vtkGetVector3Macro(NoGradient, double);
102 
104 
108  vtkSetVector3Macro(NoClosestPoint, double);
109  vtkGetVector3Macro(NoClosestPoint, double);
111 
113 
116  vtkGetMacro(Tolerance, double);
117  vtkSetMacro(Tolerance, double);
119 
120 protected:
122  ~vtkImplicitPolyDataDistance() override;
123 
127  void CreateDefaultLocator(void);
128 
129  double SharedEvaluate(double x[3], double g[3], double p[3]);
130 
131  double NoGradient[3];
132  double NoClosestPoint[3];
133  double NoValue;
134  double Tolerance;
135 
138 
139 private:
141  void operator=(const vtkImplicitPolyDataDistance&) = delete;
142 };
143 
144 #endif
vtkCellLocator
octree-based spatial search object to quickly locate cells
Definition: vtkCellLocator.h:50
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkImplicitPolyDataDistance::Locator
vtkCellLocator * Locator
Definition: vtkImplicitPolyDataDistance.h:137
vtkImplicitFunction::EvaluateFunction
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
vtkImplicitPolyDataDistance::Input
vtkPolyData * Input
Definition: vtkImplicitPolyDataDistance.h:136
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:60
vtkImplicitFunction::GetMTime
vtkMTimeType GetMTime() override
Overload standard modified time function.
vtkImplicitPolyDataDistance::NoValue
double NoValue
Definition: vtkImplicitPolyDataDistance.h:133
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImplicitFunction::EvaluateGradient
virtual void EvaluateGradient(double x[3], double g[3])=0
Evaluate function gradient at position x-y-z and pass back vector.
vtkImplicitPolyDataDistance
Definition: vtkImplicitPolyDataDistance.h:48
vtkImplicitPolyDataDistance::Tolerance
double Tolerance
Definition: vtkImplicitPolyDataDistance.h:134
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkImplicitFunction.h
vtkImplicitFunction::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293