[vtkusers] Simple vtkParametricTorus question

Haider Syed hsyed88 at gmail.com
Wed Sep 15 13:23:14 EDT 2010


I have set up a very basic vtkParametricTorus and can't figure out how to
move the "center" of the torus to an x,y,z location of my choice.

vtkParametricTorus *torus=vtkParametricTorus::New();
    torus->SetRingRadius(tumor_rad);
    torus->SetCrossSectionRadius(0.00028);

    vtkParametricFunctionSource *ptorus=vtkParametricFunctionSource::New();
    ptorus->SetParametricFunction(torus);

    vtkPolyDataMapper *torusMapper=vtkPolyDataMapper::New();
    torusMapper->SetInput(ptorus->GetOutput());

    vtkActor *torusActor=vtkActor::New();
    torusActor->SetMapper(torusMapper);

Please help.

Thanks,
Haider
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100915/33e4d211/attachment.htm>


More information about the vtkusers mailing list