------------------------------------------------------------------------------ Description: Put component `i' of the attribute at all points of cell `c' in `values'. \pre valid_component: (i>=0) && (i IsAtEnd() \pre values_exist: values!=0 \pre valid_values: sizeof(values)>=c->GetCell()->GetNumberOfPoints()
| 314 | // \pre values_exist: values!=0 |
| 315 | // \pre valid_values: sizeof(values)>=c->GetCell()->GetNumberOfPoints() |
| 316 | void vtkBridgeAttribute::GetComponent(int i, vtkGenericCellIterator* c, double* values) |
| 317 | { |
| 318 | assert("pre: c_exists" && c != nullptr); |
| 319 | assert("pre: c_valid" && !c->IsAtEnd()); |
| 320 | |
| 321 | int j; |
| 322 | int size; |
| 323 | vtkBridgeCellIterator* c2 = static_cast<vtkBridgeCellIterator*>(c); |
| 324 | |
| 325 | if (this->Pd != nullptr) |
| 326 | { |
| 327 | j = 0; |
| 328 | size = c2->GetCell()->GetNumberOfPoints(); |
| 329 | while (j < size) |
| 330 | { |
| 331 | vtkIdType id = static_cast<vtkBridgeCell*>(c2->GetCell())->Cell->GetPointId(j); |
| 332 | values[j] = this->Data->GetArray(this->AttributeNumber)->GetComponent(id, i); |
| 333 | ++j; |
| 334 | } |
| 335 | } |
| 336 | else |
| 337 | { |
| 338 | values[0] = |
| 339 | this->Data->GetArray(this->AttributeNumber)->GetComponent(c2->GetCell()->GetId(), i); |
| 340 | // duplicate: |
| 341 | size = c2->GetCell()->GetNumberOfPoints(); |
| 342 | j = 1; |
| 343 | while (j < size) |
| 344 | { |
| 345 | values[j] = values[0]; |
| 346 | ++j; |
| 347 | } |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | //------------------------------------------------------------------------------ |
| 352 | // Description: |
nothing calls this directly
no test coverage detected