| 1191 | } |
| 1192 | |
| 1193 | void 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 | |
| 1222 | void vtkBoxWidget::GetTransform(vtkTransform* t) |
| 1223 | { |
no test coverage detected