[vtkusers] Questions on building an OBBTree, really need your help!
Di Wang
di at ou.edu
Wed Mar 22 02:39:56 EST 2006
Dear Users,
We can use the following code to build a vtkOBBTree:
vtkSphereSource *sphere = vtkSphereSource::New();
sphere->SetRadius ( 100 );
sphere->SetThetaResolution ( 30 );
sphere->SetPhiResolution ( 30 );
sphere->SetCenter ( 0, 0, 0 );
sphere->Update();
vtkOBBTree *obbTree = vtkOBBTree::New();
obbTree->SetDataSet(sphere->GetOutput());
obbTree->BuildLocator();
Here the sphere is a single object, so is that possible to build an OBBTree
using multiple objects, especially, using the objects from a vtkAssembly? Is
there some way that we can convert a vtkAssembly to a vtkDataSet (so
SetDataSet can be used properly to build an OBBTree)? If you have some
experience with this problem before, could you give me some idea?
Thank you very much!
Dean
More information about the vtkusers
mailing list