Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | 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 =========================================================================*/
00065 #ifndef __vtkImplicitFunction_h
00066 #define __vtkImplicitFunction_h
00067 
00068 #include "vtkObject.h"
00069 
00070 class vtkAbstractTransform;
00071 
00072 class VTK_COMMON_EXPORT vtkImplicitFunction : public vtkObject
00073 {
00074 public:
00075   vtkTypeRevisionMacro(vtkImplicitFunction,vtkObject);
00076   void PrintSelf(ostream& os, vtkIndent indent);
00077 
00080   unsigned long GetMTime();
00081 
00083 
00085   double FunctionValue(const double x[3]);
00086   double FunctionValue(double x, double y, double z) {
00087     double xyz[3] = {x, y, z}; return this->FunctionValue(xyz); };
00089 
00091 
00093   void FunctionGradient(const double x[3], double g[3]);
00094   double *FunctionGradient(const double x[3]) {
00095     this->FunctionGradient(x,this->ReturnValue);
00096     return this->ReturnValue; };
00097   double *FunctionGradient(double x, double y, double z) {
00098     double xyz[3] = {x, y, z}; return this->FunctionGradient(xyz); };
00100 
00102 
00104   virtual void SetTransform(vtkAbstractTransform*);
00105   virtual void SetTransform(double elements[16]);
00106   vtkGetObjectMacro(Transform,vtkAbstractTransform);
00108 
00110 
00114   virtual double EvaluateFunction(double x[3]) = 0;
00115   double EvaluateFunction(double x, double y, double z) {
00116     double xyz[3] = {x, y, z}; return this->EvaluateFunction(xyz); };
00118 
00123   virtual void EvaluateGradient(double x[3], double g[3]) = 0;
00124 
00125 protected:
00126   vtkImplicitFunction();
00127   ~vtkImplicitFunction();
00128 
00129   vtkAbstractTransform *Transform;
00130   double ReturnValue[3];
00131 private:
00132   vtkImplicitFunction(const vtkImplicitFunction&);  // Not implemented.
00133   void operator=(const vtkImplicitFunction&);  // Not implemented.
00134 };
00135 
00136 #endif