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

Method Scale

Interaction/Widgets/vtkParallelopipedRepresentation.cxx:1456–1472  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1454
1455//------------------------------------------------------------------------------
1456void vtkParallelopipedRepresentation::Scale(int vtkNotUsed(X), int Y)
1457{
1458 double* pts = static_cast<vtkDoubleArray*>(this->Points->GetData())->GetPointer(0);
1459 double* center = static_cast<vtkDoubleArray*>(this->Points->GetData())->GetPointer(3 * 14);
1460 double sf = (Y > this->LastEventPosition[1] ? 1.03 : 0.97);
1461
1462 for (int i = 0; i < 16; i++, pts += 3)
1463 {
1464 pts[0] = sf * (pts[0] - center[0]) + center[0];
1465 pts[1] = sf * (pts[1] - center[1]) + center[1];
1466 pts[2] = sf * (pts[2] - center[2]) + center[2];
1467 }
1468
1469 // Synchronize the handle representations with our recently updated
1470 // "Points" data-structure.
1471 this->PositionHandles();
1472}
1473
1474//------------------------------------------------------------------------------
1475void vtkParallelopipedRepresentation::PlaceWidget(double bounds[6])

Callers

nothing calls this directly

Calls 3

PositionHandlesMethod · 0.95
GetPointerMethod · 0.45
GetDataMethod · 0.45

Tested by

no test coverage detected