[vtk-developers] camera's elevation or pitch don't modify up vector
David Gobbi
dgobbi at irus.rri.on.ca
Wed Feb 28 13:07:17 EST 2001
On Wed, 28 Feb 2001, Michael Halle wrote:
> I've been writing some camera manipulation code, and some unexpected
> results led me to notice that vtkCamera::Elevation and
> vtkCamera::Pitch change the camera's sense of what "up" is, but don't
> change the up vector. Roll does, however.
>
> I guess the problem is that vtkCamera is a funny data structure. It's
> hard (conceptually) to figure out what the state variables and what
> the derived variables are. I have no idea what will break if a fix
> gets added for the above problem. The difficulty is compounded by the
> fact that even if I wanted to do "the right thing" for my application
> by setting up my own transformations, I can't apply them to a
> vtkCamera.
Hi Mike,
I want very badly to make this happen (i.e. allow people to set their
own camera transformations) but I haven't found a way to do it that
wouldn't break backwards compatibility. The vtkActor has a half-solution
via the UserTransform (I call it a half-solution because the UserTransform
is not reflected in the values of the Actor ivars (Position,
Orientation, etc).
A similar half-solution would be possible for the 'view' portion of
vtkCamera matrix, but a huge amount of VTK code ignores the camera's
matrix and instead expects the ivars to tell the whole story so all
that code would have to be rewritten.
The one change I would most like to see in VTK 4 is an abolition of
the vtkActor and vtkCamera position/oriention ivars. The way that
OpenGL does things (user sets up the matrix themselves using
LookAt and similar methods) makes much more sense to me, and is
undoubtedly _much_ more flexible. I don't see this happening though,
too much existing code would break.
- David
More information about the vtk-developers
mailing list