[vtkusers] texture mapping
Antoine Boivin
a.boivin at m2m-ndt.com
Wed Jun 1 10:37:26 EDT 2005
Hi Fabio
You can create a vtkFloatArray, insert the TCoord value for each point
and give this array to the polydata.
in Java :
vtkPolyData pdata = new vtkPolyData();
..... // create Points and Polygons
vtkFloatArray tcoords = new vtkFloatArray();
tcoords.SetNumberOfComponents(2);
tcoords.SetNumberOfTuples(pdata.GetNumberOfPoints());
for (int i = 0; i < tcoords.setNumberOfPoints()){
tcoords.InsertTuple2(i, valuex, valuey);
}
pdata.GetPointData().SetTCoords(tcoords);
I don't know what language you use but you can translate.
Antoine
----- Original Message -----
From: "fabio depascalis" <fabio.depascalis at gmail.com>
To: <vtkusers at vtk.org>
Sent: Wednesday, June 01, 2005 2:40 PM
Subject: [vtkusers] texture mapping
Hi
I have a polydata object describing my model and a tiff-file to
describe the texture for it;
I want the texture cover only a part of my polydata, and i know that
all the points of the dataset must have TCoords;
so how set the tcoords for the polydata points on which i don't want
map the image?
Thanks
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list