| 417 | } while (false) |
| 418 | |
| 419 | void vtkBoxWidget::PositionHandles() |
| 420 | { |
| 421 | double* pts = static_cast<vtkDoubleArray*>(this->Points->GetData())->GetPointer(0); |
| 422 | double* p0 = pts; |
| 423 | double* p1 = pts + 3 * 1; |
| 424 | double* p2 = pts + 3 * 2; |
| 425 | double* p3 = pts + 3 * 3; |
| 426 | // double *p4 = pts + 3*4; |
| 427 | double* p5 = pts + 3 * 5; |
| 428 | double* p6 = pts + 3 * 6; |
| 429 | double* p7 = pts + 3 * 7; |
| 430 | double x[3]; |
| 431 | |
| 432 | VTK_AVERAGE(p0, p7, x); |
| 433 | this->Points->SetPoint(8, x); |
| 434 | VTK_AVERAGE(p1, p6, x); |
| 435 | this->Points->SetPoint(9, x); |
| 436 | VTK_AVERAGE(p0, p5, x); |
| 437 | this->Points->SetPoint(10, x); |
| 438 | VTK_AVERAGE(p2, p7, x); |
| 439 | this->Points->SetPoint(11, x); |
| 440 | VTK_AVERAGE(p1, p3, x); |
| 441 | this->Points->SetPoint(12, x); |
| 442 | VTK_AVERAGE(p5, p7, x); |
| 443 | this->Points->SetPoint(13, x); |
| 444 | VTK_AVERAGE(p0, p6, x); |
| 445 | this->Points->SetPoint(14, x); |
| 446 | |
| 447 | int i; |
| 448 | for (i = 0; i < 7; ++i) |
| 449 | { |
| 450 | this->HandleGeometry[i]->SetCenter(this->Points->GetPoint(8 + i)); |
| 451 | } |
| 452 | |
| 453 | this->Points->GetData()->Modified(); |
| 454 | this->HexFacePolyData->Modified(); |
| 455 | this->HexPolyData->Modified(); |
| 456 | this->GenerateOutline(); |
| 457 | } |
| 458 | #undef VTK_AVERAGE |
| 459 | |
| 460 | void vtkBoxWidget::HandlesOn() |
no test coverage detected