Copy/duplicate vtkActor

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Copy/duplicate vtkActor

Aramos
Hello. 
In my VTK application I need to create complex 3D models, which I already do. My problem originates in me wanting to make a copy of that actor. Right now I have several vtkActors pointing to the same reference, so any modification made to one of the copies in the vtkRenderer will change every copy of that actor. Is there any way to copy/duplicate an actor, using the already performed calculations to generate a vtkActor faster, and keep them independent from each other?

Thanks and best regards,
Alberto

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Copy/duplicate vtkActor

StephenWei
It seems there is no DeepCopy interface in class vtkActor.
We can create our own DeepCopy refers to `void vtkActor::ShallowCopy(vtkProp
*prop)`:
Create independent mapper, Property, Texture and etc for the new vtkActor
object. And set origin, position, Orientation and UserTransform for it.



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers