------------------------------------------------------------------------------ Evaluate sum of implicit functions.
| 100 | //------------------------------------------------------------------------------ |
| 101 | // Evaluate sum of implicit functions. |
| 102 | double vtkImplicitSum::EvaluateFunction(double x[3]) |
| 103 | { |
| 104 | double sum = 0; |
| 105 | double c; |
| 106 | int i; |
| 107 | vtkImplicitFunction* f; |
| 108 | double* weights = this->Weights->GetPointer(0); |
| 109 | |
| 110 | vtkCollectionSimpleIterator sit; |
| 111 | for (i = 0, this->FunctionList->InitTraversal(sit); |
| 112 | (f = this->FunctionList->GetNextImplicitFunction(sit)); i++) |
| 113 | { |
| 114 | c = weights[i]; |
| 115 | if (c != 0.0) |
| 116 | { |
| 117 | sum += f->FunctionValue(x) * c; |
| 118 | } |
| 119 | } |
| 120 | if (this->NormalizeByWeight && this->TotalWeight != 0.0) |
| 121 | { |
| 122 | sum /= this->TotalWeight; |
| 123 | } |
| 124 | return sum; |
| 125 | } |
| 126 | |
| 127 | //------------------------------------------------------------------------------ |
| 128 | // Evaluate gradient of sum of functions (valid only if linear) |
nothing calls this directly
no test coverage detected