------------------------------------------------------------------------------ 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.
| 358 | // FocalPoint, and the ViewUp vector. All the other methods are there |
| 359 | // simply for the sake of the users' convenience. |
| 360 | void 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 | //------------------------------------------------------------------------------ |
| 390 | void vtkCamera::ComputeCameraLightTransform() |
no test coverage detected