[vtkusers] Deep copy of vtk Object vtkModifiedBSPTree

Biddiscombe, John A. biddisco at cscs.ch
Thu Dec 3 02:54:55 EST 2015


Making copies of the tree is a very bad idea as the locator stores a lot of extra info for accelerating ray-traces. 

If you could send a stack trace of where you are getting errors I might be able to suggest something. I had a quick look over the intersection code (which I wrote originally back in 1997 or thereabouts - so I'm a bit rusty with it) but I do not see any obvious misuses of vars. The initial build tree is not thread safe, so you should ensure that two threads are not calling the first ray intersection simultaneously if buildtree has not already been called.

JB

-----Original Message-----
From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Normand Robert
Sent: 01 December 2015 04:07
To: vtkusers at vtk.org
Subject: [vtkusers] Deep copy of vtk Object vtkModifiedBSPTree

Hi

I wish to use vtkModifiedBSPTree with OpenMP by making copies of vtkModifiedBSPTree instances local to each thread but there does not seem to be any methods to copy this object. I naively thought that all vtk objects would have ShallowCopy() or DeepCopy(). I have to do this because using IntersectWithLine() in different threads for the same object instance causes crashes. Is there a solution to this?

Regards
Normand Robert PhD
Sunnybrook Research Institute
University of Toronto

_______________________________________________
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:
http://public.kitware.com/mailman/listinfo/vtkusers


More information about the vtkusers mailing list