[vtkusers] Picker to get texture coordinates

Donny Zimmerman zmanvortex at gmail.com
Thu Sep 15 21:17:02 EDT 2016


I am using vtk to texture polygons (triangles). I use a single texture and
calculate what area of the texture is mapped to each polygon and then
assign the correct u,v texture coordinates to the polygon points.

Using a spot that is picked on the textured polygon, I need to find the
coordinates of the 2D vtkImageData (x,y) that was used to create the
texture. I am having trouble wrapping my head around a way to do this.

I am looking at using vtkWorldPointPicker, reverse my transformation to get
the pre-transformed world coordinate, and then use my u,v texture
coordinate calculation to find the x,y coordinate of the vtkImageData.

I can't use the nearest polydata point that was picked because there are
only 3 per polydata which would be at the edge of the texture.

Is there an easier solution?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160915/b30f6b78/attachment.html>


More information about the vtkusers mailing list