[vtkusers] Problems changing camera location with ParallelProjectionOn()

dream_noir kyle.charbonneau at gmail.com
Mon Jul 14 13:56:49 EDT 2008


I have another issue involving vtkCamera and an orthographic view. I'm
turning it on using ParallelProjectionOn() which helps to simplify the view
I get. It works great but it creates another issue. I'm issuing a SetViewUp,
SetFocalPoint and SetPosition to the camera to get it in the right location.
This works perfectly when ParallelProjection is off, but not when it is on.
The view up vector and focal point are correct it seems, but the position is
off. The position instead lies somewhere on the line between the focal point
and correct position, except much closer to the focal point itself than the
position is, so if I zoom out it is in the correct place with no other
adjustments. Looking at the code for vtkCamera nothing seems to be done
differently in SetPosition if ParallelProjection is on, so I'm a bit puzzled
by this behaviour.

Also, by printing out info on the camera I can see the position gets set
correctly it just doesn't effect the camera location. When I manually zoom
the camera out it doesn't change what is printed out as the location either.
So it seems the true location of the camera is somehow different from what
it thinks it is internally with ParallelProjetion on? I'd think I was
somehow getting the wrong camera (I use the GetActiveCamera method on my
vtkRenderer) but the ViewUp and FocalPoint work fine. 

If anyone has any idea why this might be I'd appreciate it. Thanks.
-- 
View this message in context: http://www.nabble.com/Problems-changing-camera-location-with-ParallelProjectionOn%28%29-tp18449397p18449397.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list