[vtkusers] Need help integrating VTK with an existing OpenGL application (translating glFrustum and gluLookAt calls to VTK)

Weiguang Guan guanw at rhpcs.mcmaster.ca
Thu Jan 3 15:08:59 EST 2008


Hi Mark,

If you decide to move on to vtk, then you shouldn't called gl commands 
directly. vtkCamera contains methods that implement what you want to do.

Weiguang

On Thu, 3 Jan 2008, Mark Waligora wrote:

> Hey all,
> I've done quite a bit of searching and reading and am having some trouble
> getting started integrating VTK into my application.  I'm a new user, but
> I've spent enough time looking that I don't think I'm missing anything too
> obvious.
>
> I have a fairly simple visualization application written with OpenGL.  I
> want to visualize some more complicated data sets, so I wanted to write a
> version that works with VTK.
>
> My visualization application is fed in data from a motion capture system, so
> right now, every time my application loop updates, it reads the data from
> the mo-cap system, and updates the rendering with very specific calls to
> glFrustum and gluLookAt.  The front face of the frustum volume is almost
> never centered around the z axis, so I can't simulate the frustum creation
> by simply providing a vtkCamera with a position, direction, and viewing
> angle.  I need more control of the frustum shape than that functionality
> seems to provide.
>
> Can anyone advise me on how to create a simple vtk application with no user
> control where the frustum and camera position are automatically updated by
> the program every cycle of the main program loop?  From what I can tell, I
> don't want to use an interactor since the user will not be interacting with
> the application (the user interacts with the motion capture system, and the
> application simply queries data from the motion capture system when it is
> rendering).  Again, I need to be able to create frustums that aren't
> centered around the z axis.
>
> Thanks in advance!
>
> -Mark Waligora
>



More information about the vtkusers mailing list