00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00052 #ifndef __vtkImplicitFunction_h
00053 #define __vtkImplicitFunction_h
00054
00055 #include "vtkObject.h"
00056
00057 class vtkAbstractTransform;
00058
00059 class VTK_COMMON_EXPORT vtkImplicitFunction : public vtkObject
00060 {
00061 public:
00062 vtkTypeRevisionMacro(vtkImplicitFunction,vtkObject);
00063 void PrintSelf(ostream& os, vtkIndent indent);
00064
00067 unsigned long GetMTime();
00068
00070
00072 double FunctionValue(const double x[3]);
00073 double FunctionValue(double x, double y, double z) {
00074 double xyz[3] = {x, y, z}; return this->FunctionValue(xyz); };
00076
00078
00080 void FunctionGradient(const double x[3], double g[3]);
00081 double *FunctionGradient(const double x[3]) {
00082 this->FunctionGradient(x,this->ReturnValue);
00083 return this->ReturnValue; };
00084 double *FunctionGradient(double x, double y, double z) {
00085 double xyz[3] = {x, y, z}; return this->FunctionGradient(xyz); };
00087
00089
00091 virtual void SetTransform(vtkAbstractTransform*);
00092 virtual void SetTransform(double elements[16]);
00093 vtkGetObjectMacro(Transform,vtkAbstractTransform);
00095
00097
00101 virtual double EvaluateFunction(double x[3]) = 0;
00102 double EvaluateFunction(double x, double y, double z) {
00103 double xyz[3] = {x, y, z}; return this->EvaluateFunction(xyz); };
00105
00110 virtual void EvaluateGradient(double x[3], double g[3]) = 0;
00111
00112 protected:
00113 vtkImplicitFunction();
00114 ~vtkImplicitFunction();
00115
00116 vtkAbstractTransform *Transform;
00117 double ReturnValue[3];
00118 private:
00119 vtkImplicitFunction(const vtkImplicitFunction&);
00120 void operator=(const vtkImplicitFunction&);
00121 };
00122
00123 #endif