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 =========================================================================*/
49 #ifndef vtkImplicitFunction_h
50 #define vtkImplicitFunction_h
51 
52 #include "vtkCommonDataModelModule.h" // For export macro
53 #include "vtkObject.h"
54 
56 
58 {
59 public:
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
65  unsigned long GetMTime();
66 
68 
70  double FunctionValue(const double x[3]);
71  double FunctionValue(double x, double y, double z) {
72  double xyz[3] = {x, y, z}; return this->FunctionValue(xyz); };
74 
76 
78  void FunctionGradient(const double x[3], double g[3]);
79  double *FunctionGradient(const double x[3]) {
80  this->FunctionGradient(x,this->ReturnValue);
81  return this->ReturnValue; };
82  double *FunctionGradient(double x, double y, double z) {
83  double xyz[3] = {x, y, z}; return this->FunctionGradient(xyz); };
85 
87 
89  virtual void SetTransform(vtkAbstractTransform*);
90  virtual void SetTransform(const double elements[16]);
91  vtkGetObjectMacro(Transform,vtkAbstractTransform);
93 
95 
99  virtual double EvaluateFunction(double x[3]) = 0;
100  double EvaluateFunction(double x, double y, double z) {
101  double xyz[3] = {x, y, z}; return this->EvaluateFunction(xyz); };
103 
108  virtual void EvaluateGradient(double x[3], double g[3]) = 0;
109 
110 protected:
113 
115  double ReturnValue[3];
116 private:
117  vtkImplicitFunction(const vtkImplicitFunction&); // Not implemented.
118  void operator=(const vtkImplicitFunction&); // Not implemented.
119 };
120 
121 #endif
abstract interface for implicit functions
double * FunctionGradient(double x, double y, double z)
abstract base class for most VTK objects
Definition: vtkObject.h:61
double * FunctionGradient(const double x[3])
double FunctionValue(double x, double y, double z)
virtual void PrintSelf(ostream &os, vtkIndent indent)
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
superclass for all geometric transformations
vtkAbstractTransform * Transform
double EvaluateFunction(double x, double y, double z)
#define VTKCOMMONDATAMODEL_EXPORT