------------------------------------------------------------------------------
| 1346 | |
| 1347 | //------------------------------------------------------------------------------ |
| 1348 | bool vtkCoordinateFrameRepresentation::PickOrigin(int X, int Y, bool snapToMeshPoint) |
| 1349 | { |
| 1350 | this->HardwarePicker->SetSnapToMeshPoint(snapToMeshPoint); |
| 1351 | vtkAssemblyPath* path = this->GetAssemblyPath(X, Y, 0., this->HardwarePicker); |
| 1352 | if (path == nullptr) // actors of renderer were not touched |
| 1353 | { |
| 1354 | if (this->PickCameraFocalInfo) |
| 1355 | { |
| 1356 | double pos[3]; |
| 1357 | this->HardwarePicker->GetPickPosition(pos); |
| 1358 | this->SetOrigin(pos); |
| 1359 | this->BuildRepresentation(); |
| 1360 | } |
| 1361 | return this->PickCameraFocalInfo; |
| 1362 | } |
| 1363 | else // actors of renderer were touched |
| 1364 | { |
| 1365 | double pos[3]; |
| 1366 | this->HardwarePicker->GetPickPosition(pos); |
| 1367 | if (!std::isnan(pos[0]) || !std::isnan(pos[1]) || !std::isnan(pos[2])) |
| 1368 | { |
| 1369 | this->SetOrigin(pos); |
| 1370 | this->BuildRepresentation(); |
| 1371 | return true; |
| 1372 | } |
| 1373 | else |
| 1374 | { |
| 1375 | return false; |
| 1376 | } |
| 1377 | } |
| 1378 | } |
| 1379 | |
| 1380 | //------------------------------------------------------------------------------ |
| 1381 | bool vtkCoordinateFrameRepresentation::PickNormal(int X, int Y, bool snapToMeshPoint) |
no test coverage detected