[vtkusers] examples for vtkVRMLImporter

sebastien MARAUX maraux at ondim.fr
Thu Dec 12 03:53:31 EST 2002


hello,

This is an example. I don t know if VRMLImporter manages
textures others than textures in raw format in the vrml file.

With this code you obtain a vtkPolyData of your vrml file.

//--------------------------------------------------------------------------
----

  // Future Imported VRML File
  vtkPolyData *vrmlPolyData;

  // VRML Import
  vtkVRMLImporter *importer=vtkVRMLImporter::New();
  importer->SetFileName(VRMLFileName);
  importer->Read();

  vtkRenderer *renderer;
  renderer = importer->GetRenderer();

  if (renderer->GetActors()->GetNumberOfItems() > 0) {
   vrmlPolyData = (vtkPolyData *)
renderer->GetActors()->GetLastActor()->GetMapper()->GetInput();
  }

//--------------------------------------------------------------------------
---

It is all I can do for you.
Hope this helps ?

Sebastien MARAUX

----- Original Message -----
From: jason elliott
To: vtkusers at public.kitware.com
Sent: Thursday, December 12, 2002 3:38 AM
Subject: [vtkusers] examples for vtkVRMLImporter


Hello all,

Is anyone familiar with the vtkVRMLImporter class.
I am trying to find some example code to import a *.wrl file and render it.

thanks in advance

Jason



MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*.
_______________________________________________ This is the private VTK
discussion list. Please keep messages on-topic. Check the FAQ at: Follow
this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers




More information about the vtkusers mailing list