[vtkusers] How to set camera so that the image fill up the screen horizontally

chrisyeshi chrisyeshi at gmail.com
Wed Mar 9 12:31:12 EST 2011


So, I need the image the fit the width of the screen. It doesn't matter if
the image is too high for the screen.
It needs to be done both in Parallel and Perspective modes.

I have read the vtkRenderer::ResetCamera() method. There are two places I
don't understand.

1)   double w1 = bounds[1] - bounds[0];
  double w2 = bounds[3] - bounds[2];
  double w3 = bounds[5] - bounds[4];
  w1 *= w1;
  w2 *= w2;
  w3 *= w3;
  double radius = w1 + w2 + w3;

Why do we get the radius this way? What is it?

2) this->ActiveCamera->SetParallelScale(radius);

Why is the radius the ParallelScale? And why there is no perspective zoom
settings?

Thanks in advance!

--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-set-camera-so-that-the-image-fill-up-the-screen-horizontally-tp3415966p3415966.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list