MCPcopy Create free account
hub / github.com/Kitware/VTK / PositionHandles

Method PositionHandles

Interaction/Widgets/vtkBoxWidget.cxx:419–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417 } while (false)
418
419void 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
460void vtkBoxWidget::HandlesOn()

Callers 7

MoveFaceMethod · 0.95
TranslateMethod · 0.95
ScaleMethod · 0.95
RotateMethod · 0.95
PlaceWidgetMethod · 0.95
GetTransformMethod · 0.95
SetTransformMethod · 0.95

Calls 7

GenerateOutlineMethod · 0.95
GetPointerMethod · 0.45
GetDataMethod · 0.45
SetPointMethod · 0.45
SetCenterMethod · 0.45
GetPointMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected