[vtkusers] Get an vtkImplicitBoolean object from vtkActors
Zhu Yong
yong_zhy at hotmail.com
Wed Mar 3 08:48:55 EST 2004
Hi VTKers,
I have some actors in render window, now I want to get the implicit
functions wich define those actors and then take UNION operation of all
those implicit functions. Then use EvaluateFunction(float x[3]) method to
evaluate function value at some points.
I have tried two ways: use vtkImplicitVolume and vtkImplicitDataSet, but
seems neither works. The function value are the same for different points.
anyone can help me?
=====================
use vtkImplicitVolume
============
vtkImplicitBoolean * boolean = vtkImplicitBoolean::New();
boolean->SetOperationTypeToUnion();
vtkImplicitVolume * vol1 = vtkImplicitVolume::New();
vol1->SetVolume((vtkImageData*)actor1->GetMapper()->GetInput());
vtkImplicitVolume * vol2 = vtkImplicitVolume::New();
vol2->SetVolume((vtkImageData*)actor2->GetMapper()->GetInput());
boolean->AddFunction(vol1);
boolean->AddFunction(vol2);
=====================
use vtkImplicitDataSet
============
vtkImplicitBoolean * boolean = vtkImplicitBoolean::New();
boolean->SetOperationTypeToUnion();
vtkImplicitDataSet * data1 = vtkImplicitDataSet::New();
data1->SetDataSet(actor1->GetMapper()->GetInput());
vtkImplicitDataSet * data2 = vtkImplicitDataSet::New();
data2->SetDataSet(actor2->GetMapper()->GetInput());
boolean->AddFunction(data1);
boolean->AddFunction(data2);
_________________________________________________________________
Find it on the web with MSN Search. http://search.msn.com.sg/
More information about the vtkusers
mailing list