[vtkusers] How to get a pointer to the instance of vtk***Source from vtkActor

ohsuga at nucl.phys.titech.ac.jp ohsuga at nucl.phys.titech.ac.jp
Tue Apr 4 01:51:45 EDT 2006


Dear all,
 
In the following example, 
I'd like to get a pointer to the instance of vtkSphereSource class from a
pointer to the instance of vtkActor class.
How Can I do this?
I mean I only know sphereActor and would like to reset the PhiResolution of
sphere.
-----------------------------------------------------------
vtkSphereSource* sphere = vtkSphereSource::New();
    sphere->SetRadius(3);
    sphere->SetPhiResolution(10);
    sphere->SetThetaResolution(10);
vtkPolyDataMapper* sphereMapper = vtkPolyDataMapper::New();
    sphereMapper->SetInput(sphere->GetOutput());
vtkActor* sphereActor = vtkActor::New();
    sphereActor->SetMapper(sphereMapper);
------------------------------------------------------------
 
Thank you very much in advance.
 
Cheers,
Masa
-- 
ohsuga at nucl.phys.titech.ac.jp



More information about the vtkusers mailing list