| 432 | static void AimZ(FILE* filePtr, RtPoint); |
| 433 | |
| 434 | void vtkRIBExporter::WriteCamera(vtkCamera* aCamera) |
| 435 | { |
| 436 | RtPoint direction; |
| 437 | double position[3], focalPoint[3]; |
| 438 | |
| 439 | aCamera->GetPosition(position); |
| 440 | aCamera->GetFocalPoint(focalPoint); |
| 441 | |
| 442 | direction[0] = focalPoint[0] - position[0]; |
| 443 | direction[1] = focalPoint[1] - position[1]; |
| 444 | direction[2] = focalPoint[2] - position[2]; |
| 445 | vtkMath::Normalize(direction); |
| 446 | |
| 447 | RtFloat angle = aCamera->GetViewAngle(); |
| 448 | vtk::print(this->FilePtr, "Projection \"perspective\" \"fov\" [{:f}]\n", angle); |
| 449 | PlaceCamera(this->FilePtr, position, direction, aCamera->GetRoll()); |
| 450 | |
| 451 | vtk::print(this->FilePtr, "Orientation \"rh\"\n"); |
| 452 | } |
| 453 | |
| 454 | /* |
| 455 | * PlaceCamera(): establish a viewpoint, viewing direction and orientation |
no test coverage detected