[vtkusers] Modifing a mapper

Seongho Kim seongho at ame.arizona.edu
Mon Jul 24 06:15:08 EDT 2000


Hi,

I have a question about how to modify a mapper or source for an actor.  In
my program, I want to modify the geometry of an actor interactively like a
3D object drawing tool.
In the program, a use may drag a mouse to draw or modify an 3D object.  I
should modify the geometry of an existing actor interactively.

Here is my question.
Suppose, I have an actor (actor1) which has been already set by a mapper1.
Of course the mapper was created by a source (source1).

Now I want to change the actor1's geometry.  What should I do to do it
without deleting and recreating the actor1 ?
If I just create new source and mapper and do actor1->SetMapper(newMapper),
then I think the previous mapper1 and source1 will remain in the memory.
Or, If I modify the existing source1 and mapper1 and do
actor1->SetMapper(mapper1), then I think the reference counts of the mapper1
and source1 will be increased.  So if I modify the actors geometry
continuously (like by mouse dragging), then the reference count will be
continuously increased.

Can anyone give a good suggestion to me?

Thanks a lot.
Bye

----------------------------------------------------------------------
Seongho Kim

Tel) 520-290-6721 (H)
      520-621-2777 (O)
email) seongho at ame.arizona.edu





More information about the vtkusers mailing list