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

Method ComputeViewTransform

Rendering/Core/vtkCamera.cxx:360–387  ·  view source on GitHub ↗

------------------------------------------------------------------------------ The ViewTransform depends on only three ivars: the Position, the FocalPoint, and the ViewUp vector. All the other methods are there simply for the sake of the users' convenience.

Source from the content-addressed store, hash-verified

358// FocalPoint, and the ViewUp vector. All the other methods are there
359// simply for the sake of the users' convenience.
360void vtkCamera::ComputeViewTransform()
361{
362 // main view through the camera
363 this->Transform->Identity();
364 if (this->UserViewTransform)
365 {
366 this->Transform->Concatenate(this->UserViewTransform);
367 }
368 if (!this->UseOffAxisProjection)
369 {
370 this->Transform->SetupCamera(this->Position, this->FocalPoint, this->ViewUp);
371 }
372 else
373 {
374 double pe[3] = { 0.0 };
375 this->GetStereoEyePosition(pe);
376
377 // Create the view point offset matrix
378 vtkSmartPointer<vtkMatrix4x4> T = vtkSmartPointer<vtkMatrix4x4>::New();
379 T->SetElement(0, 3, -pe[0]);
380 T->SetElement(1, 3, -pe[1]);
381 T->SetElement(2, 3, -pe[2]);
382
383 this->Transform->Concatenate(T);
384 }
385 this->ViewTransform->Identity();
386 this->ViewTransform->Concatenate(this->Transform->GetMatrix());
387}
388
389//------------------------------------------------------------------------------
390void vtkCamera::ComputeCameraLightTransform()

Callers 10

vtkCameraMethod · 0.95
SetPositionMethod · 0.95
SetUserViewTransformMethod · 0.95
SetFocalPointMethod · 0.95
SetViewUpMethod · 0.95
SetDistanceMethod · 0.95
SetEyePositionMethod · 0.95
SetEyeTransformMatrixMethod · 0.95
ExecuteMethod · 0.45

Calls 7

GetStereoEyePositionMethod · 0.95
SetupCameraMethod · 0.80
NewFunction · 0.70
IdentityMethod · 0.45
ConcatenateMethod · 0.45
SetElementMethod · 0.45
GetMatrixMethod · 0.45

Tested by

no test coverage detected