VTK  9.1.0
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=========================================================================*/
49#ifndef vtkImplicitPolyDataDistance_h
50#define vtkImplicitPolyDataDistance_h
51
52#include "vtkFiltersCoreModule.h" // For export macro
53#include "vtkImplicitFunction.h"
54
55class vtkCellLocator;
56class vtkPolyData;
57
58class VTKFILTERSCORE_EXPORT vtkImplicitPolyDataDistance : public vtkImplicitFunction
59{
60public:
63 void PrintSelf(ostream& os, vtkIndent indent) override;
64
69
74 double EvaluateFunction(double x[3]) override;
75
79 void EvaluateGradient(double x[3], double g[3]) override;
80
85 double EvaluateFunctionAndGetClosestPoint(double x[3], double closestPoint[3]);
86
93 void SetInput(vtkPolyData* input);
94
96
100 vtkSetMacro(NoValue, double);
101 vtkGetMacro(NoValue, double);
103
105
109 vtkSetVector3Macro(NoGradient, double);
110 vtkGetVector3Macro(NoGradient, double);
112
114
118 vtkSetVector3Macro(NoClosestPoint, double);
119 vtkGetVector3Macro(NoClosestPoint, double);
121
123
126 vtkGetMacro(Tolerance, double);
127 vtkSetMacro(Tolerance, double);
129
130protected:
133
138
139 double SharedEvaluate(double x[3], double g[3], double closestPoint[3]);
140
141 double NoGradient[3];
142 double NoClosestPoint[3];
143 double NoValue;
144 double Tolerance;
145
148
149private:
151 void operator=(const vtkImplicitPolyDataDistance&) = delete;
152};
153
154#endif
octree-based spatial search object to quickly locate cells
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
Implicit function that computes the distance from a point x to the nearest point p on an input vtkPol...
vtkMTimeType GetMTime() override
Return the MTime also considering the Input dependency.
void SetInput(vtkPolyData *input)
Set the input vtkPolyData used for the implicit function evaluation.
double EvaluateFunctionAndGetClosestPoint(double x[3], double closestPoint[3])
Evaluate plane equation of nearest triangle to point x[3] and provides closest point on an input vtkP...
double SharedEvaluate(double x[3], double g[3], double closestPoint[3])
void EvaluateGradient(double x[3], double g[3]) override
Evaluate function gradient of nearest triangle to point x[3].
~vtkImplicitPolyDataDistance() override
static vtkImplicitPolyDataDistance * New()
void CreateDefaultLocator(void)
Create default locator.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double EvaluateFunction(double x[3]) override
Evaluate function at position x-y-z and return value.
a simple class to control print indentation
Definition: vtkIndent.h:43
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:95
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287