[vtkusers] Texture mapping on a sphere. Bugs?
Ali Can
canali at ecse.rpi.edu
Thu Oct 3 13:20:21 EDT 2002
A beginner needs help:
I want to map a texture on a sphere but encountered the following problems:
Please see http://www.cs.rpi.edu/~cana/Problems.htm
1) The ascept ratio is lost, although I am using the same scale factor for each dimension
xform[1]->SetScale(1.3, 1.3, 1.3);
2) There is a leak in the texture.... Please see the above web site.
3) I couldn't find any documentation about what the units are for the command
xform->SetPosition(float, float, float);
What are the units of these floats; rad, degree, pixel?
More importantly, if you can direct me to web adresses that I can find such information that would be great.
I used the following classes.
sphere = vtkSphereSource::New();
tmapper = vtkTextureMapToSphere::New();
vtkTransformTextureCoords *xform;
vtkDataSetMapper *sphereMapper;
texture->SetInput(picReader->GetOutput());
texture->InterpolateOff();
texture->RepeatOff();
sphereActor->SetMapper(sphereMapper);
sphereActor->SetTexture(texture);
Thanks,
Ali Can,
Woods Hole Oceanographic Institution,
Deep Submergence laboratory,
Blake 206, MS #7,
Woods Hole, MA, 02543.
Tel: (508) 289-3740 Fax: (508) 457-2191
Email: acan at whoi.edu Web: http://www.cs.rpi.edu/~cana/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20021003/879388ca/attachment.htm>
More information about the vtkusers
mailing list