[vtkusers] Easy Rendering
David Doria
daviddoria+vtk at gmail.com
Wed Nov 18 10:26:49 EST 2009
On Wed, Nov 18, 2009 at 10:04 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
> Check out vtkRenderView and vtkRenderedSurfaceRepresentation. Using
> these classes will lead to something not quite as short as your
> example, but they at least relieves you of having to set up a mapper
> and actor.
>
> Cory
Cory,
I had not seen those. They are a little bit closer to what I was going
for. Here is a demo:
http://www.vtk.org/Wiki/A_little_bit_easier_rendering
The differences from what I had made are:
1) Fewer include files. You only have to include 1 file
(EasyRenderer.h) because you only want to do 1 thing (render objects)
With the existing method, you have to include two things
#include "vtkRenderedSurfaceRepresentation.h"
#include "vtkRenderWindowInteractor.h"
which have much less friendly/intuitive names.
2) Less "nonsense". You simply AddObjects and then Render. This
corresponds to exactly what the user wanted to do. With the existing
method, you have to Update, then ResetCamera, then get the interactor,
then start. This is much less in line with what the user was thinking.
These may be subtle points, but I really think it would help attract
new users to the basic functionalities of VTK.
Thanks,
David
More information about the vtkusers
mailing list