Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
00031 #ifndef __vtkImplicitSum_h
00032 #define __vtkImplicitSum_h
00033 
00034 #include "vtkImplicitFunction.h"
00035 
00036 class vtkDoubleArray;
00037 class vtkImplicitFunctionCollection;
00038 
00039 class VTK_FILTERING_EXPORT vtkImplicitSum : public vtkImplicitFunction
00040 {
00041 public:
00042   static vtkImplicitSum *New();
00043 
00044   vtkTypeRevisionMacro(vtkImplicitSum,vtkImplicitFunction);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046 
00048 
00049   double EvaluateFunction(double x[3]);
00050   double EvaluateFunction(double x, double y, double z)
00051     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00053 
00056   void EvaluateGradient(double x[3], double g[3]);
00057 
00059   unsigned long GetMTime();
00060 
00063   void AddFunction(vtkImplicitFunction *in, double weight);
00064 
00067   void AddFunction(vtkImplicitFunction *in) { this->AddFunction(in, 1.0); }
00068 
00070   void RemoveAllFunctions();
00071 
00073   void SetFunctionWeight(vtkImplicitFunction *f, double weight);
00074 
00076 
00081   vtkSetMacro(NormalizeByWeight, int);
00082   vtkGetMacro(NormalizeByWeight, int);
00083   vtkBooleanMacro(NormalizeByWeight, int);
00085 
00086 protected:
00087   vtkImplicitSum();
00088   ~vtkImplicitSum();
00089 
00090   vtkImplicitFunctionCollection *FunctionList;
00091   vtkDoubleArray *Weights;
00092   double TotalWeight;
00093 
00094   void CalculateTotalWeight(void);
00095   int NormalizeByWeight;
00096 
00097 private:
00098   vtkImplicitSum(const vtkImplicitSum&);  // Not implemented.
00099   void operator=(const vtkImplicitSum&);  // Not implemented.
00100 };
00101 
00102 #endif

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