VTK
vtkImplicitDataSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImplicitDataSet.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 =========================================================================*/
40 #ifndef vtkImplicitDataSet_h
41 #define vtkImplicitDataSet_h
42 
43 #include "vtkCommonDataModelModule.h" // For export macro
44 #include "vtkImplicitFunction.h"
45 
46 class vtkDataSet;
47 
48 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitDataSet : public vtkImplicitFunction
49 {
50 public:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
58  static vtkImplicitDataSet *New();
59 
63  vtkMTimeType GetMTime() override;
64 
66 
71  double EvaluateFunction(double x[3]) override;
73 
77  void EvaluateGradient(double x[3], double n[3]) override;
78 
80 
83  virtual void SetDataSet(vtkDataSet*);
84  vtkGetObjectMacro(DataSet,vtkDataSet);
86 
88 
91  vtkSetMacro(OutValue,double);
92  vtkGetMacro(OutValue,double);
94 
96 
99  vtkSetVector3Macro(OutGradient,double);
100  vtkGetVector3Macro(OutGradient,double);
102 
103 protected:
105  ~vtkImplicitDataSet() override;
106 
107  void ReportReferences(vtkGarbageCollector*) override;
108 
110  double OutValue;
111  double OutGradient[3];
112 
113  double *Weights; //used to compute interpolation weights
114  int Size; //keeps track of length of weights array
115 
116 private:
117  vtkImplicitDataSet(const vtkImplicitDataSet&) = delete;
118  void operator=(const vtkImplicitDataSet&) = delete;
119 };
120 
121 #endif
122 
123 
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:300
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
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:33
vtkMTimeType GetMTime() override
Overload standard modified time function.
virtual void ReportReferences(vtkGarbageCollector *)
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.