------------------------------------------------------------------------------
| 565 | |
| 566 | //------------------------------------------------------------------------------ |
| 567 | void vtkInteractorStyleImage::SetImageOrientation( |
| 568 | const double leftToRight[3], const double bottomToTop[3]) |
| 569 | { |
| 570 | if (this->CurrentRenderer) |
| 571 | { |
| 572 | // the cross product points out of the screen |
| 573 | double vector[3]; |
| 574 | vtkMath::Cross(leftToRight, bottomToTop, vector); |
| 575 | double focus[3]; |
| 576 | vtkCamera* camera = this->CurrentRenderer->GetActiveCamera(); |
| 577 | camera->GetFocalPoint(focus); |
| 578 | double d = camera->GetDistance(); |
| 579 | camera->SetPosition( |
| 580 | focus[0] + d * vector[0], focus[1] + d * vector[1], focus[2] + d * vector[2]); |
| 581 | camera->SetFocalPoint(focus); |
| 582 | camera->SetViewUp(bottomToTop); |
| 583 | } |
| 584 | } |
| 585 | |
| 586 | //------------------------------------------------------------------------------ |
| 587 | // This is a way of dealing with images as if they were layers. |
no test coverage detected