VTK  9.3.0
vtkImplicitDataSet.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
31 #ifndef vtkImplicitDataSet_h
32 #define vtkImplicitDataSet_h
33 
34 #include "vtkCommonDataModelModule.h" // For export macro
35 #include "vtkImplicitFunction.h"
36 
37 VTK_ABI_NAMESPACE_BEGIN
38 class vtkDataSet;
39 
40 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitDataSet : public vtkImplicitFunction
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
51 
55  vtkMTimeType GetMTime() override;
56 
58 
63  double EvaluateFunction(double x[3]) override;
65 
69  void EvaluateGradient(double x[3], double n[3]) override;
70 
72 
75  virtual void SetDataSet(vtkDataSet*);
76  vtkGetObjectMacro(DataSet, vtkDataSet);
78 
80 
83  vtkSetMacro(OutValue, double);
84  vtkGetMacro(OutValue, double);
86 
88 
91  vtkSetVector3Macro(OutGradient, double);
92  vtkGetVector3Macro(OutGradient, double);
94 
95 protected:
97  ~vtkImplicitDataSet() override;
98 
100 
102  double OutValue;
103  double OutGradient[3];
104 
105  double* Weights; // used to compute interpolation weights
106  int Size; // keeps track of length of weights array
107 
108 private:
109  vtkImplicitDataSet(const vtkImplicitDataSet&) = delete;
110  void operator=(const vtkImplicitDataSet&) = delete;
111 };
112 
113 VTK_ABI_NAMESPACE_END
114 #endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:53
Detect and break reference loops.
treat a dataset as if it were an implicit function
virtual void SetDataSet(vtkDataSet *)
Set / get the dataset used for the implicit function evaluation.
vtkMTimeType GetMTime() override
Return the MTime also considering the DataSet dependency.
double EvaluateFunction(double x[3]) override
Evaluate the implicit function.
void ReportReferences(vtkGarbageCollector *) override
void EvaluateGradient(double x[3], double n[3]) override
Evaluate implicit function gradient.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkImplicitDataSet * New()
Construct an vtkImplicitDataSet with no initial dataset; the OutValue set to a large negative number;...
~vtkImplicitDataSet() override
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
a simple class to control print indentation
Definition: vtkIndent.h:29
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:28
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270