Several Questions and an Update

Joseph Toman toman at marge.cyber-dyne.com
Wed Mar 15 14:23:22 EST 2000



Questions, questions, what to ask first? 

1) I'm trying to convert some OpenGL code to VTK calls. My first
problem is mapping the OpenGL coordinate systems to VTK. The books and
VTK headers aren't quite clear about what coordinate systems the
various objects and methods use. This is quite important to me as it's
a GIS application I'm working on and it has to be fairly accurate. For
instance, vtkCamera::SetWindowCenter, is it viewport coordinates,
world coordinates, or what? I would guess normalized viewport, but
that's just a guess. And does it just translate the camera over, or
modify the viewport origin, or ... ?

2) And on the same theme, what do I need to do to recreate the effect
of a call to glOrtho, besides vtkCamera::ParallelProjectionOn ? As I
understand it this call not only sets the orthographic projection on,
but it also sets the mapping between world and viewport coordinates.
It seems as though, unlike in OpenGL, scaling has to be done on a per
actor basis. The whole setup of transformations can't be accomplished
on the renderer/camera side. True?

3) Unrelated to the above:  Is there anything in VTK that is similar
to OpenGL's feedback mode? What I'm looking for is something that will
take some polydata, render it given a mapper, camera, etc. and then
return the visible triangles back to me for further processing. This is
a first stab at a printing solution. No, stretched bitmaps won't work,
on large plotters they get too jaggy, and the memory requirements are
prohibitive.

4) I had previously said that I was unable to compile the 3.1 distribution
on my Linux box running Debian 2.1 and kernel 2.2.14 . I reinstalled the
compiler from the current frozen distribution (ugh!) and built 3.1 fine.
On a K6-2 350Mhz / Voodoo3 2000 the tcl examples run fairly slowly, but
I attribute that to not having any hardware acceleration for windowed apps
in Mesa. 

5) Any thought on turning vtk into a namespace? Functionally that's what
prepending 'vtk' to every class name does, and it seems like it would be
a little easier to read if every class wasn't named vtkBob, vtkJoe, etc.
by using 'using namespace vtk'. Also it formalizes the use of the prefix
in the standard way for the language. Some preprocessor macro magic could make
it invisible for legacy code and those with broken compilers. 

						J. Toman
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list