[vtkusers] Speed up vtkRenderer::AddActor
Yang Yang
yyang109 at gmail.com
Thu Jul 8 03:52:36 EDT 2010
Dear users,
I wonder if there is a way to speed up the method vtkRenderer::AddActor. I
found that when I call vtkRenderer::AddActor(vtkProp*), it will in
turn callvtkViewport::AddViewProp(vtkProp*),
vtkViewport::HasViewProp(vtkProp*) and then
vtkCollection::IsItemPresent(vtkObject*). In IsItemPresent method it loops
over all the existing actors and check if the argument actor already exists.
If I want to add for example a million actors to the renderer, this check
will take a huge amount of time. However I don't need this check, because in
my code in the higher level I garanteed that there will be no duplicate
actors added to the renderer. So My question is, is there any way to bypass
the check IsItemPresent when calling vtkRenderer::AddActor? or is there any
other fast way to add a huge number of actors to the renderer?
Any suggestion or clue is highly appreciated!
Best
Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100708/0df04a8f/attachment.htm>
More information about the vtkusers
mailing list