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 
57 
58 class VTKCOMMONDATAMODEL_EXPORT vtkImplicitFunction : public vtkObject
59 {
60 public:
62  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
63 
68  vtkMTimeType GetMTime() VTK_OVERRIDE;
69 
71 
75  double FunctionValue(const double x[3]);
76  double FunctionValue(double x, double y, double z) {
77  double xyz[3] = {x, y, z}; return this->FunctionValue(xyz); };
79 
81 
85  void FunctionGradient(const double x[3], double g[3]);
86  double *FunctionGradient(const double x[3]) {
87  this->FunctionGradient(x,this->ReturnValue);
88  return this->ReturnValue; };
89  double *FunctionGradient(double x, double y, double z) {
90  double xyz[3] = {x, y, z}; return this->FunctionGradient(xyz); };
92 
94 
98  virtual void SetTransform(vtkAbstractTransform*);
99  virtual void SetTransform(const double elements[16]);
100  vtkGetObjectMacro(Transform,vtkAbstractTransform);
102 
104 
110  virtual double EvaluateFunction(double x[3]) = 0;
111  double EvaluateFunction(double x, double y, double z) {
112  double xyz[3] = {x, y, z}; return this->EvaluateFunction(xyz); };
114 
121  virtual void EvaluateGradient(double x[3], double g[3]) = 0;
122 
123 protected:
125  ~vtkImplicitFunction() VTK_OVERRIDE;
126 
128  double ReturnValue[3];
129 private:
130  vtkImplicitFunction(const vtkImplicitFunction&) VTK_DELETE_FUNCTION;
131  void operator=(const vtkImplicitFunction&) VTK_DELETE_FUNCTION;
132 };
133 
134 #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.
double * FunctionGradient(const double x[3])
Evaluate function gradient at position x-y-z and pass back vector.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
a simple class to control print indentation
Definition: vtkIndent.h:39
superclass for all geometric transformations
virtual vtkMTimeType GetMTime()
Return this object's modified time.
double EvaluateFunction(double x, double y, double z)
Evaluate function at position x-y-z and return value.
Transform
Definition: ADIOSDefs.h:39