------------------------------------------------------------------------------
| 2279 | |
| 2280 | //------------------------------------------------------------------------------ |
| 2281 | void vtkFunctionParser::UpdateNeededVariables() |
| 2282 | { |
| 2283 | this->ScalarVariableNeeded.clear(); |
| 2284 | this->ScalarVariableNeeded.resize(this->ScalarVariableNames.size(), false); |
| 2285 | |
| 2286 | this->VectorVariableNeeded.clear(); |
| 2287 | this->VectorVariableNeeded.resize(this->VectorVariableNames.size(), false); |
| 2288 | |
| 2289 | unsigned int numscalars = static_cast<unsigned int>(this->GetNumberOfScalarVariables()); |
| 2290 | |
| 2291 | for (int cc = 0; cc < this->ByteCodeSize; ++cc) |
| 2292 | { |
| 2293 | unsigned int code = this->ByteCode[cc]; |
| 2294 | if (code < VTK_PARSER_BEGIN_VARIABLES) |
| 2295 | { |
| 2296 | continue; |
| 2297 | } |
| 2298 | code -= VTK_PARSER_BEGIN_VARIABLES; |
| 2299 | if (code >= numscalars) |
| 2300 | { |
| 2301 | this->VectorVariableNeeded[code - numscalars] = true; |
| 2302 | } |
| 2303 | else |
| 2304 | { |
| 2305 | this->ScalarVariableNeeded[code] = true; |
| 2306 | } |
| 2307 | } |
| 2308 | } |
| 2309 | |
| 2310 | //------------------------------------------------------------------------------ |
| 2311 | int vtkFunctionParser::GetScalarVariableIndex(const char* inVariableName) |