[vtkusers] General VTK questions

James Dessart james at rogue-research.com
Thu Jul 3 15:37:06 EDT 2003


I have some pretty straightforward questions to ask about rendered, 
actors and the like.  At least, I hope they're straightforward. :)  
First, I'll describe my problem, then ask the questions it makes me 
ask... I'm working in C++, if that helps.

I wrote a little sample app that creates a render window and displays 
an STL file in it.  In this little sample app, everything works 
wonderfully, interaction is smooth, etc.

Feeling good about this success, I used the main idea of the sample 
code to add some basic VTK code to a bigger application.  I can set the 
colour of the render window quite nicely, it responds very well to 
that.  However, when I add the STL-based LOD actor to the renderer, I 
see nothing at all.  The code to load it is identical.

Now, I add this actor after adding the renderer to the render window in 
my application, and before in my sample app.  Should this affect the 
outcome?  In other words, do I need to add all my actors to my renderer 
before adding the renderer to the render window?

What situations would lead to an actor not being rendered by a renderer 
it has just been added to?  I made sure I called Render after adding 
the actor, so it shouldn't be that.  And the code to add the actor is 
essentially copied and pasted from the smaller app.

I stepped through the code at one point, and noticed that at some point 
the renderer loses track of the fact that it has an actor, or so it 
seems.  When I just modified that value in the debugger, to force it to 
render the actor, I still got nothing.  But I know the renderer had 
that actor.

Any help, hints, magical formulas that anyone could lend would be quite 
handy.

Thanks,
James




More information about the vtkusers mailing list