[vtkusers] Texture Coordinates

Eric E. Monson emonson at cs.duke.edu
Fri Jul 23 05:56:41 EDT 2010


Hello Ayman,

The texture coordinates should be associated with the PointData of your PolyData, rather than the actor. You should be able to check and see if there is anything assigned (but I've never tried this as a test for existence, only to get the coordinates I knew were there):

polydata->GetPointData()->GetTCoords()

Talk to you later,
-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Jul 22, 2010, at 6:52 PM, Ayman Habib wrote:

> Hi all,
>  
> I'm trying to apply texture to some geometry in a vtk window. According to the documentation this can be done by calling
> vtkActor->SetTexture(vtkTexture) this however assumes that the Actor has Texture Coordinates already so my question is how to detect if an Actor has TextureCoordinates available (in order to give a better feedback in case it doesn't)?. My Actors have associated vtkPolyData that is  constructed from a Reader (.vtp, .obj) in case it matters.
>  
> Thanks all for your help,
> -Ayman
>  
>  
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100723/e216f680/attachment.htm>


More information about the vtkusers mailing list