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

vtkImplicitFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImplicitFunction.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
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&);  // Not implemented.
00120   void operator=(const vtkImplicitFunction&);  // Not implemented.
00121 };
00122 
00123 #endif

Generated on Mon Jan 21 23:07:17 2008 for VTK by  doxygen 1.4.3-20050530