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

vtkImplicitSum.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImplicitSum.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 =========================================================================*/
00044 #ifndef __vtkImplicitSum_h
00045 #define __vtkImplicitSum_h
00046 
00047 #include "vtkImplicitFunction.h"
00048 
00049 class vtkDoubleArray;
00050 class vtkImplicitFunctionCollection;
00051 
00052 class VTK_FILTERING_EXPORT vtkImplicitSum : public vtkImplicitFunction
00053 {
00054 public:
00055   static vtkImplicitSum *New();
00056 
00057   vtkTypeRevisionMacro(vtkImplicitSum,vtkImplicitFunction);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061 
00062   double EvaluateFunction(double x[3]);
00063   double EvaluateFunction(double x, double y, double z)
00064     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00066 
00069   void EvaluateGradient(double x[3], double g[3]);
00070 
00072   unsigned long GetMTime();
00073 
00076   void AddFunction(vtkImplicitFunction *in, double weight);
00077 
00080   void AddFunction(vtkImplicitFunction *in) { this->AddFunction(in, 1.0); }
00081 
00083   void RemoveAllFunctions();
00084 
00086   void SetFunctionWeight(vtkImplicitFunction *f, double weight);
00087 
00089 
00094   vtkSetMacro(NormalizeByWeight, int);
00095   vtkGetMacro(NormalizeByWeight, int);
00096   vtkBooleanMacro(NormalizeByWeight, int);
00098 
00099 protected:
00100   vtkImplicitSum();
00101   ~vtkImplicitSum();
00102 
00103   vtkImplicitFunctionCollection *FunctionList;
00104   vtkDoubleArray *Weights;
00105   double TotalWeight;
00106 
00107   void CalculateTotalWeight(void);
00108   int NormalizeByWeight;
00109 
00110 private:
00111   vtkImplicitSum(const vtkImplicitSum&);  // Not implemented.
00112   void operator=(const vtkImplicitSum&);  // Not implemented.
00113 };
00114 
00115 #endif