Common/vtkImplicitFunction.h Source File

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

# 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 =========================================================================*/
    00062 #ifndef __vtkImplicitFunction_h
    00063 #define __vtkImplicitFunction_h
    00064
    00065 #include "vtkObject.h"
    00066
    00067 class vtkAbstractTransform;
    00068
    00069 class VTK_COMMON_EXPORT vtkImplicitFunction : public vtkObject
    00070 {
    00071 public:
    00072   vtkTypeRevisionMacro(vtkImplicitFunction,vtkObject);
    00073   void PrintSelf(ostream& os, vtkIndent indent);
    00074
    00077   unsigned long GetMTime();
    00078
    00080
    00082   float FunctionValue(const float x[3]);
    00083   float FunctionValue(float x, float y, float z) {
    00084     float xyz[3] = {x, y, z}; return this->FunctionValue(xyz); };
    00086
    00088
    00090   void FunctionGradient(const float x[3], float g[3]);
    00091   float *FunctionGradient(const float x[3]) {
    00092     this->FunctionGradient(x,this->ReturnValue);
    00093     return this->ReturnValue; };
    00094   float *FunctionGradient(float x, float y, float z) {
    00095     float xyz[3] = {x, y, z}; return this->FunctionGradient(xyz); };
    00097
    00099
    00101   virtual void SetTransform(vtkAbstractTransform*);
    00102   vtkGetObjectMacro(Transform,vtkAbstractTransform);
    00104
    00106
    00110   virtual float EvaluateFunction(float x[3]) = 0;
    00111   float EvaluateFunction(float x, float y, float z) {
    00112     float xyz[3] = {x, y, z}; return this->EvaluateFunction(xyz); };
    00114
    00119   virtual void EvaluateGradient(float x[3], float g[3]) = 0;
    00120
    00121 protected:
    00122   vtkImplicitFunction();
    00123   ~vtkImplicitFunction();
    00124
    00125   vtkAbstractTransform *Transform;
    00126   float ReturnValue[3];
    00127 private:
    00128   vtkImplicitFunction(const vtkImplicitFunction&);  // Not implemented.
    00129   void operator=(const vtkImplicitFunction&);  // Not implemented.
    00130 };
    00131
    00132 #endif