VTK  9.6.1
vtkImplicitPolyDataDistance.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
30
31#ifndef vtkImplicitPolyDataDistance_h
32#define vtkImplicitPolyDataDistance_h
33
34#include "vtkFiltersCoreModule.h" // For export macro
35#include "vtkGenericCell.h" // For thread local storage
36#include "vtkImplicitFunction.h"
37#include "vtkSMPThreadLocalObject.h" // For thread local storage
38#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
39
40VTK_ABI_NAMESPACE_BEGIN
41class vtkCellLocator;
42class vtkPolyData;
43
45{
46public:
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
55
60 double EvaluateFunction(double x[3]) override;
61
65 void EvaluateGradient(double x[3], double g[3]) override;
66
71 double EvaluateFunctionAndGetClosestPoint(double x[3], double closestPoint[3]);
72
79 void SetInput(vtkPolyData* input);
80
82
86 vtkSetMacro(NoValue, double);
87 vtkGetMacro(NoValue, double);
89
91
95 vtkSetVector3Macro(NoGradient, double);
96 vtkGetVector3Macro(NoGradient, double);
98
100
104 vtkSetVector3Macro(NoClosestPoint, double);
105 vtkGetVector3Macro(NoClosestPoint, double);
107
109
112 vtkGetMacro(Tolerance, double);
113 vtkSetMacro(Tolerance, double);
115
116protected:
119
124
125 double SharedEvaluate(double x[3], double g[3], double closestPoint[3]);
126
127 double NoGradient[3];
128 double NoClosestPoint[3];
129 double NoValue;
130 double Tolerance;
131
136
137private:
139 void operator=(const vtkImplicitPolyDataDistance&) = delete;
140};
141
142VTK_ABI_NAMESPACE_END
143#endif
octree-based spatial search object to quickly locate cells
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
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])
vtkSMPThreadLocalObject< vtkGenericCell > TLCell
void CreateDefaultLocator()
Create default locator.
void EvaluateGradient(double x[3], double g[3]) override
Evaluate function gradient of nearest triangle to point x[3].
~vtkImplicitPolyDataDistance() override
static vtkImplicitPolyDataDistance * New()
vtkSMPThreadLocalObject< vtkIdList > TLCellIds
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:29
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:72
Thread local storage for VTK objects.
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:323
#define VTK_MARSHALAUTO