[vtkusers] Texture Mapping with 2D Texture Coordinates

youpie meriadegp at yahoo.fr
Thu Nov 17 04:59:09 EST 2011


creat a vtkFloatArray with size of vtkPoints size and associate the good
coordinate texture for each point.
After : polydata->getPointData->setTcoord(you vtkFloatArray) 

For load the texture, use a vtkTexture and the good vtkReader for you
picture format vtkPGNReader ( for PGN picture (for instance).

 char* fname1 =
            vtkTestUtilities::ExpandDataFileName(1, new char*(),
"myPicture.png");

    vtkPNGReader * imageReader = vtkPNGReader::New();
    imageReader->SetFileName(fname1);

texture->SetInputConnection(imageReaderRed->GetOutputPort());

--
View this message in context: http://vtk.1045678.n5.nabble.com/Texture-Mapping-with-2D-Texture-Coordinates-tp4997298p5000665.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list