[vtkusers] Loading VRML file into a vtkActor

Vidyadhar vidyadhar at lucidindia.com
Mon Sep 10 23:43:05 EDT 2007


Hi,
vtkPolyData does not store those material properties. Coloring and shading information is part of the vtkProperty associated with vtkActor which you can access in similar fashion.
HTH
Vidiyadhar

----- Original Message ----- 
  From: Shriram Iyer 
  To: Vidyadhar 
  Cc: vtkusers 
  Sent: Friday, September 07, 2007 7:21 PM
  Subject: Re: [vtkusers] Loading VRML file into a vtkActor


  Thanks Vidyadhar. Does the vtkPolydata we get by doing this retain the coloring and shading information present in the original 3DS model?

  Shriram


  On 9/6/07, Vidyadhar <vidyadhar at lucidindia.com> wrote:
    Hi,
    Both importers have GetRenderer methods which give access to renderer. From that you can retrieve vtkActorCollection. Traverse the collection to retrieve each actor. From actor you can retrieve its mapper (some polydata mapper) and from mapper get its input which will be the polydata mesh. I have not use this with vtkVRMLImporter but with vtk3DSImporter.
    Vidyadhar
      ----- Original Message ----- 
      From: Shriram Iyer 
      To: vtkusers at vtk.org 
      Sent: Thursday, September 06, 2007 4:45 AM
      Subject: [vtkusers] Loading VRML file into a vtkActor


      Hi All,

      I tried out the vtkVRMLImporter test. I want to be able to load a VRML file, change its visibility, and move it around. Is there a way to get the output of the importer into a polydatamapper and then into an actor? I tried doing this with 3DS files too using vtk3DSImporter but was unsuccessful. 

      Any help would be greatly appreciated.

      Shriram


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


More information about the vtkusers mailing list