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

Method PlaceWidget

Interaction/Widgets/vtkBoxWidget.cxx:1193–1220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1191}
1192
1193void vtkBoxWidget::PlaceWidget(double bds[6])
1194{
1195 int i;
1196 double bounds[6], center[3];
1197
1198 this->AdjustBounds(bds, bounds, center);
1199
1200 this->Points->SetPoint(0, bounds[0], bounds[2], bounds[4]);
1201 this->Points->SetPoint(1, bounds[1], bounds[2], bounds[4]);
1202 this->Points->SetPoint(2, bounds[1], bounds[3], bounds[4]);
1203 this->Points->SetPoint(3, bounds[0], bounds[3], bounds[4]);
1204 this->Points->SetPoint(4, bounds[0], bounds[2], bounds[5]);
1205 this->Points->SetPoint(5, bounds[1], bounds[2], bounds[5]);
1206 this->Points->SetPoint(6, bounds[1], bounds[3], bounds[5]);
1207 this->Points->SetPoint(7, bounds[0], bounds[3], bounds[5]);
1208
1209 for (i = 0; i < 6; i++)
1210 {
1211 this->InitialBounds[i] = bounds[i];
1212 }
1213 this->InitialLength = sqrt((bounds[1] - bounds[0]) * (bounds[1] - bounds[0]) +
1214 (bounds[3] - bounds[2]) * (bounds[3] - bounds[2]) +
1215 (bounds[5] - bounds[4]) * (bounds[5] - bounds[4]));
1216
1217 this->PositionHandles();
1218 this->ComputeNormals();
1219 this->SizeHandles();
1220}
1221
1222void vtkBoxWidget::GetTransform(vtkTransform* t)
1223{

Callers 1

vtkBoxWidgetMethod · 0.95

Calls 6

PositionHandlesMethod · 0.95
ComputeNormalsMethod · 0.95
SizeHandlesMethod · 0.95
sqrtFunction · 0.50
AdjustBoundsMethod · 0.45
SetPointMethod · 0.45

Tested by

no test coverage detected