VTK
vtkImplicitSum.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImplicitSum.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef __vtkImplicitSum_h
32 #define __vtkImplicitSum_h
33 
34 #include "vtkImplicitFunction.h"
35 
36 class vtkDoubleArray;
38 
40 {
41 public:
42  static vtkImplicitSum *New();
43 
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
49  double EvaluateFunction(double x[3]);
50  double EvaluateFunction(double x, double y, double z)
51  {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
53 
56  void EvaluateGradient(double x[3], double g[3]);
57 
59  unsigned long GetMTime();
60 
63  void AddFunction(vtkImplicitFunction *in, double weight);
64 
67  void AddFunction(vtkImplicitFunction *in) { this->AddFunction(in, 1.0); }
68 
70  void RemoveAllFunctions();
71 
73  void SetFunctionWeight(vtkImplicitFunction *f, double weight);
74 
76 
81  vtkSetMacro(NormalizeByWeight, int);
82  vtkGetMacro(NormalizeByWeight, int);
83  vtkBooleanMacro(NormalizeByWeight, int);
85 
86 protected:
88  ~vtkImplicitSum();
89 
92  double TotalWeight;
93 
94  void CalculateTotalWeight(void);
96 
97 private:
98  vtkImplicitSum(const vtkImplicitSum&); // Not implemented.
99  void operator=(const vtkImplicitSum&); // Not implemented.
100 };
101 
102 #endif
abstract interface for implicit functions
void AddFunction(vtkImplicitFunction *in)
virtual double EvaluateFunction(double x[3])=0
#define VTK_FILTERING_EXPORT
unsigned long GetMTime()
vtkImplicitFunctionCollection * FunctionList
maintain a list of implicit functions
vtkDoubleArray * Weights
virtual void EvaluateGradient(double x[3], double g[3])=0
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:37
double EvaluateFunction(double x, double y, double z)
void PrintSelf(ostream &os, vtkIndent indent)
implicit sum of other implicit functions
static vtkObject * New()