VTK
vtkImplicitFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImplicitFunction.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 =========================================================================*/
50 #ifndef vtkImplicitFunction_h
51 #define vtkImplicitFunction_h
52 
53 #include "vtkCommonDataModelModule.h" // For export macro
54 #include "vtkObject.h"
55 
56 class vtkDataArray;
57 
59 
60 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitFunction : public vtkObject
61 {
62 public:
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
70  vtkMTimeType GetMTime() override;
71 
73 
77  virtual void FunctionValue(vtkDataArray* input, vtkDataArray* output);
78  double FunctionValue(const double x[3]);
79  double FunctionValue(double x, double y, double z) {
80  double xyz[3] = {x, y, z}; return this->FunctionValue(xyz); };
82 
84 
88  void FunctionGradient(const double x[3], double g[3]);
89  double *FunctionGradient(const double x[3]) VTK_SIZEHINT(3) {
90  this->FunctionGradient(x,this->ReturnValue);
91  return this->ReturnValue; };
92  double *FunctionGradient(double x, double y, double z) VTK_SIZEHINT(3) {
93  double xyz[3] = {x, y, z}; return this->FunctionGradient(xyz); };
95 
97 
101  virtual void SetTransform(vtkAbstractTransform*);
102  virtual void SetTransform(const double elements[16]);
103  vtkGetObjectMacro(Transform,vtkAbstractTransform);
105 
107 
113  virtual double EvaluateFunction(double x[3]) = 0;
114  virtual void EvaluateFunction(vtkDataArray* input, vtkDataArray* output);
115  virtual double EvaluateFunction(double x, double y, double z) {
116  double xyz[3] = {x, y, z}; return this->EvaluateFunction(xyz); };
118 
125  virtual void EvaluateGradient(double x[3], double g[3]) = 0;
126 
127 protected:
129  ~vtkImplicitFunction() override;
130 
132  double ReturnValue[3];
133 private:
134  vtkImplicitFunction(const vtkImplicitFunction&) = delete;
135  void operator=(const vtkImplicitFunction&) = delete;
136 };
137 
138 #endif
abstract interface for implicit functions
double * FunctionGradient(double x, double y, double z)
Evaluate function gradient at position x-y-z and pass back vector.
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
double * FunctionGradient(const double x[3])
Evaluate function gradient at position x-y-z and pass back vector.
double FunctionValue(double x, double y, double z)
Evaluate function at position x-y-z and return value.
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
superclass for all geometric transformations
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkAbstractTransform * Transform
#define VTK_SIZEHINT(...)
virtual double EvaluateFunction(double x, double y, double z)
Evaluate function at position x-y-z and return value.
Transform
Definition: ADIOSDefs.h:40