| 242 | } |
| 243 | |
| 244 | int vtkArcPlotter::ProcessComponents(vtkIdType numPts, vtkPointData* pd) |
| 245 | { |
| 246 | vtkIdType i; |
| 247 | int j; |
| 248 | double* range; |
| 249 | |
| 250 | this->Data = nullptr; |
| 251 | switch (this->PlotMode) |
| 252 | { |
| 253 | case VTK_PLOT_SCALARS: |
| 254 | if (pd->GetScalars()) |
| 255 | { |
| 256 | this->Data = pd->GetScalars(); |
| 257 | } |
| 258 | break; |
| 259 | case VTK_PLOT_VECTORS: |
| 260 | if (pd->GetVectors()) |
| 261 | { |
| 262 | this->Data = pd->GetVectors(); |
| 263 | } |
| 264 | break; |
| 265 | case VTK_PLOT_NORMALS: |
| 266 | if (pd->GetNormals()) |
| 267 | { |
| 268 | this->Data = pd->GetNormals(); |
| 269 | } |
| 270 | break; |
| 271 | case VTK_PLOT_TCOORDS: |
| 272 | if (pd->GetTCoords()) |
| 273 | { |
| 274 | this->Data = pd->GetTCoords(); |
| 275 | } |
| 276 | break; |
| 277 | case VTK_PLOT_TENSORS: |
| 278 | if (pd->GetTensors()) |
| 279 | { |
| 280 | this->Data = pd->GetTensors(); |
| 281 | } |
| 282 | break; |
| 283 | case VTK_PLOT_FIELD_DATA: |
| 284 | int arrayNum = (this->FieldDataArray < pd->GetNumberOfArrays() ? this->FieldDataArray |
| 285 | : pd->GetNumberOfArrays() - 1); |
| 286 | this->Data = pd->GetArray(arrayNum); |
| 287 | break; |
| 288 | } |
| 289 | |
| 290 | // Determine the number of components |
| 291 | if (this->Data) |
| 292 | { |
| 293 | this->NumberOfComponents = this->Data->GetNumberOfComponents(); |
| 294 | if (this->PlotComponent >= 0) |
| 295 | { |
| 296 | this->ActiveComponent = |
| 297 | (this->PlotComponent < this->NumberOfComponents ? this->PlotComponent |
| 298 | : this->NumberOfComponents - 1); |
| 299 | this->StartComp = this->EndComp = this->ActiveComponent; |
| 300 | } |
| 301 | else |
no test coverage detected