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

Method CopyTo

Rendering/Parallel/vtkSynchronizedRenderers.cxx:638–666  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

636
637//------------------------------------------------------------------------------
638void 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

Callers 1

SlaveStartRenderMethod · 0.45

Calls 11

GetActiveCameraMethod · 0.80
SetParallelProjectionMethod · 0.80
SetViewUpMethod · 0.80
SetWindowCenterMethod · 0.80
SetViewAngleMethod · 0.80
SetParallelScaleMethod · 0.80
assertFunction · 0.50
SetPositionMethod · 0.45
SetFocalPointMethod · 0.45
SetClippingRangeMethod · 0.45
SetElementMethod · 0.45

Tested by

no test coverage detected