VTK  9.3.1
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 
50  static vtkImplicitDataSet* New();
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 
99  void ReportReferences(vtkGarbageCollector*) override;
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 interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
virtual void EvaluateGradient(double x[3], double g[3])=0
Evaluate function gradient at position x-y-z and pass back vector.
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkMTimeType GetMTime() override
Overload standard modified time function.
virtual void ReportReferences(vtkGarbageCollector *)
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:28
treat a dataset as if it were an implicit function
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.