[vtkusers] Problems changing camera location with ParallelProjectionOn()
Vidyadhar
vidyadhar at lucidindia.com
Wed Jul 16 00:07:09 EDT 2008
Hi,
In parallel projection mode, camera position does not affect transformation
from world to view. It only determines view direction. Their is no angular
extents also (because all projecting lines are parallel). So changing
angular extents or dollying camera does not affect the transformation. Zoom
is essentially adjusting size of the rectangle over which projection takes
place and parallel scale determines zoom level. So position and focal point
are used only to determine projection direction and changing zoom level does
not affect camera position. From my experience, when camera position, focal
point and viewup are set and ResetCamera is called on renderer, camera
position does change based on the scene bounds so that near and far clipping
planes will be proper.
I am not an expert on these transformations so I hope somebody else may
correct me if any or all of above is wrong.
HTH
Vidyadhar
----- Original Message -----
From: "dream_noir" <kyle.charbonneau at gmail.com>
To: <vtkusers at vtk.org>
Sent: Monday, July 14, 2008 11:26 PM
Subject: [vtkusers] Problems changing camera location with
ParallelProjectionOn()
>
> 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.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list