Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Common/vtkImplicitFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImplicitFunction.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00049 #ifndef __vtkImplicitFunction_h
00050 #define __vtkImplicitFunction_h
00051 
00052 #include "vtkObject.h"
00053 
00054 class vtkAbstractTransform;
00055 
00056 class VTK_COMMON_EXPORT vtkImplicitFunction : public vtkObject
00057 {
00058 public:
00059   vtkTypeRevisionMacro(vtkImplicitFunction,vtkObject);
00060   void PrintSelf(ostream& os, vtkIndent indent);
00061 
00064   unsigned long GetMTime();
00065 
00067 
00069   float FunctionValue(const float x[3]);
00070   float FunctionValue(float x, float y, float z) {
00071     float xyz[3] = {x, y, z}; return this->FunctionValue(xyz); };
00073 
00075 
00077   void FunctionGradient(const float x[3], float g[3]);
00078   float *FunctionGradient(const float x[3]) {
00079     this->FunctionGradient(x,this->ReturnValue);
00080     return this->ReturnValue; };
00081   float *FunctionGradient(float x, float y, float z) {
00082     float xyz[3] = {x, y, z}; return this->FunctionGradient(xyz); };
00084 
00086 
00088   virtual void SetTransform(vtkAbstractTransform*);
00089   vtkGetObjectMacro(Transform,vtkAbstractTransform);
00091 
00093 
00097   virtual float EvaluateFunction(float x[3]) = 0;
00098   float EvaluateFunction(float x, float y, float z) {
00099     float xyz[3] = {x, y, z}; return this->EvaluateFunction(xyz); };
00101 
00106   virtual void EvaluateGradient(float x[3], float g[3]) = 0;
00107 
00108 protected:
00109   vtkImplicitFunction();
00110   ~vtkImplicitFunction();
00111 
00112   vtkAbstractTransform *Transform;
00113   float ReturnValue[3];
00114 private:
00115   vtkImplicitFunction(const vtkImplicitFunction&);  // Not implemented.
00116   void operator=(const vtkImplicitFunction&);  // Not implemented.
00117 };
00118 
00119 #endif