[vtkusers] set radius of sphere inside actor

Luis M Bernardo bernardo at OCF.Berkeley.EDU
Tue Aug 21 16:56:15 EDT 2001


Hello,
I would like to know whether it is possible to change the radius of a
sphere after we put the sphere "inside" the actor. Something like this:

vtkActor actor* = vtkActor::New();
vtkPolyDataMapper mapper* = vtkPolyDataMapper::New();
actor->SetMapper(mapper);
vtkSphereSource sphere* = vtkSphereSource::New();
mapper-SetInput(sphere->GetOutput());

I thought about starting like this:
vtkPolyDataMapper* m = (vtkPolyDataMapper*) actor->GetMapper();
vtkPolyData* d = m->GetInput();

but I don't knonw what to do next... this boils down to re-construct a
vtkSphereSource from its vtkPolyData, I think.

Thanks,
Luis







More information about the vtkusers mailing list