------------------------------------------------------------------------------
| 636 | |
| 637 | //------------------------------------------------------------------------------ |
| 638 | void vtkSynchronizedRenderers::RendererInfo::CopyTo(vtkRenderer* ren) |
| 639 | { |
| 640 | vtkCamera* cam = ren->GetActiveCamera(); |
| 641 | ren->SetDraw(this->Draw); |
| 642 | cam->SetParallelProjection(this->CameraParallelProjection); |
| 643 | // ren->SetViewport(this->Viewport); |
| 644 | cam->SetPosition(this->CameraPosition); |
| 645 | cam->SetFocalPoint(this->CameraFocalPoint); |
| 646 | cam->SetViewUp(this->CameraViewUp); |
| 647 | cam->SetWindowCenter(this->CameraWindowCenter[0], this->CameraWindowCenter[1]); |
| 648 | cam->SetClippingRange(this->CameraClippingRange); |
| 649 | cam->SetViewAngle(this->CameraViewAngle); |
| 650 | cam->SetParallelScale(this->CameraParallelScale); |
| 651 | |
| 652 | // We reuse vtkMatrix4x4 objects present on the camera and then use |
| 653 | // vtkMatrix4x4::SetElement(). This avoids modifying the mtime of the |
| 654 | // camera unless anything truly changed. |
| 655 | vtkMatrix4x4* eyeTransformationMatrix = cam->GetEyeTransformMatrix(); |
| 656 | vtkMatrix4x4* modelTransformationMatrix = cam->GetModelTransformMatrix(); |
| 657 | assert(eyeTransformationMatrix && modelTransformationMatrix); |
| 658 | for (int i = 0; i < 4; ++i) |
| 659 | { |
| 660 | for (int j = 0; j < 4; ++j) |
| 661 | { |
| 662 | eyeTransformationMatrix->SetElement(i, j, this->EyeTransformMatrix[i * 4 + j]); |
| 663 | modelTransformationMatrix->SetElement(i, j, this->ModelTransformMatrix[i * 4 + j]); |
| 664 | } |
| 665 | } |
| 666 | } |
| 667 | |
| 668 | //**************************************************************************** |
| 669 | // vtkSynchronizedRenderers::vtkRawImage Methods |
no test coverage detected