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

Method Scale

Interaction/Widgets/vtkBoxWidget.cxx:1034–1057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1032}
1033
1034void vtkBoxWidget::Scale(double* vtkNotUsed(p1), double* vtkNotUsed(p2), int vtkNotUsed(X), int Y)
1035{
1036 double* pts = static_cast<vtkDoubleArray*>(this->Points->GetData())->GetPointer(0);
1037 double* center = static_cast<vtkDoubleArray*>(this->Points->GetData())->GetPointer(3 * 14);
1038 double sf;
1039
1040 if (Y > this->Interactor->GetLastEventPosition()[1])
1041 {
1042 sf = 1.03;
1043 }
1044 else
1045 {
1046 sf = 0.97;
1047 }
1048
1049 // Move the corners
1050 for (int i = 0; i < 8; i++, pts += 3)
1051 {
1052 pts[0] = sf * (pts[0] - center[0]) + center[0];
1053 pts[1] = sf * (pts[1] - center[1]) + center[1];
1054 pts[2] = sf * (pts[2] - center[2]) + center[2];
1055 }
1056 this->PositionHandles();
1057}
1058
1059void vtkBoxWidget::ComputeNormals()
1060{

Callers 15

OnMouseMoveMethod · 0.95
MoveMethod · 0.45
PaintMethod · 0.45
PaintCellMethod · 0.45
GetTextureTransformFunction · 0.45
exitFieldMethod · 0.45

Calls 3

PositionHandlesMethod · 0.95
GetPointerMethod · 0.45
GetDataMethod · 0.45

Tested by 5

PaintMethod · 0.36
PaintCellMethod · 0.36
TestLineWidget2bFunction · 0.36